001
014
015 package com.liferay.documentlibrary.service;
016
017 import com.liferay.portal.kernel.annotation.Transactional;
018 import com.liferay.portal.kernel.exception.PortalException;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.service.ServiceContext;
021
022 import java.io.File;
023
024 import java.util.Date;
025
026
029 @Transactional(rollbackFor = {PortalException.class, SystemException.class})
030 public interface DLService {
031
032 public void addDirectory(long companyId, long repositoryId, String dirName)
033 throws PortalException, SystemException;
034
035 public void addFile(
036 long companyId, String portletId, long groupId, long repositoryId,
037 String fileName, long fileEntryId, String properties,
038 Date modifiedDate, ServiceContext serviceContext, byte[] bytes)
039 throws PortalException, SystemException;
040
041 public void addFile(
042 long companyId, String portletId, long groupId, long repositoryId,
043 String fileName, long fileEntryId, String properties,
044 Date modifiedDate, ServiceContext serviceContext, File file)
045 throws PortalException, SystemException;
046
047 public void deleteDirectory(
048 long companyId, String portletId, long repositoryId, String dirName)
049 throws PortalException, SystemException;
050
051 public void deleteFile(
052 long companyId, String portletId, long repositoryId,
053 String fileName)
054 throws PortalException, SystemException;
055
056 public void deleteFile(
057 long companyId, String portletId, long repositoryId,
058 String fileName, String versionNumber)
059 throws PortalException, SystemException;
060
061 public byte[] getFile(long companyId, long repositoryId, String fileName)
062 throws PortalException, SystemException;
063
064 public byte[] getFile(
065 long companyId, long repositoryId, String fileName,
066 String versionNumber)
067 throws PortalException, SystemException;
068
069 public String[] getFileNames(
070 long companyId, long repositoryId, String dirName)
071 throws PortalException, SystemException;
072
073 public long getFileSize(
074 long companyId, long repositoryId, String fileName)
075 throws PortalException, SystemException;
076
077 public void updateFile(
078 long companyId, String portletId, long groupId, long repositoryId,
079 long newRepositoryId, String fileName, long fileEntryId)
080 throws PortalException, SystemException;
081
082 public void updateFile(
083 long companyId, String portletId, long groupId, long repositoryId,
084 String fileName, String versionNumber, String sourceFileName,
085 long fileEntryId, String properties, Date modifiedDate,
086 ServiceContext serviceContext, byte[] bytes)
087 throws PortalException, SystemException;
088
089 public void updateFile(
090 long companyId, String portletId, long groupId, long repositoryId,
091 String fileName, String versionNumber, String sourceFileName,
092 long fileEntryId, String properties, Date modifiedDate,
093 ServiceContext serviceContext, File file)
094 throws PortalException, SystemException;
095
096 public void updateFile(
097 long companyId, String portletId, long groupId, long repositoryId,
098 String fileName, String newFileName, boolean reindex)
099 throws PortalException, SystemException;
100
101 }