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.kernel.search.Hits;
021 import com.liferay.portal.service.ServiceContext;
022
023 import java.io.File;
024 import java.io.InputStream;
025
026 import java.util.Date;
027
028
031 @Transactional(rollbackFor = {PortalException.class, SystemException.class})
032 public interface DLLocalService {
033
034 public void addFile(
035 long companyId, String portletId, long groupId, long repositoryId,
036 String fileName, boolean validateFileExtension, long fileEntryId,
037 String properties, Date modifiedDate, ServiceContext serviceContext,
038 InputStream is)
039 throws PortalException, SystemException;
040
041 public void checkRoot(long companyId) throws SystemException;
042
043 public InputStream getFileAsStream(
044 long companyId, long repositoryId, String fileName)
045 throws PortalException, SystemException;
046
047 public InputStream getFileAsStream(
048 long companyId, long repositoryId, String fileName,
049 String versionNumber)
050 throws PortalException, SystemException;
051
052 public boolean hasFile(
053 long companyId, long repositoryId, String fileName,
054 String versionNumber)
055 throws PortalException, SystemException;
056
057 public void move(String srcDir, String destDir) throws SystemException;
058
059 public Hits search(
060 long companyId, String portletId, long groupId,
061 long userId, long[] repositoryIds, String keywords, int start,
062 int end)
063 throws SystemException;
064
065 public void updateFile(
066 long companyId, String portletId, long groupId, long repositoryId,
067 String fileName, String fileExtension,
068 boolean validateFileExtension, String versionNumber,
069 String sourceFileName, long fileEntryId, String properties,
070 Date modifiedDate, ServiceContext serviceContext, InputStream is)
071 throws PortalException, SystemException;
072
073 public void validate(
074 String fileName, boolean validateFileExtension, byte[] bytes)
075 throws PortalException, SystemException;
076
077 public void validate(
078 String fileName, boolean validateFileExtension, File file)
079 throws PortalException, SystemException;
080
081 public void validate(
082 String fileName, boolean validateFileExtension, InputStream is)
083 throws PortalException, SystemException;
084
085 public void validate(
086 String fileName, String fileExtension, String sourceFileName,
087 boolean validateFileExtension, InputStream is)
088 throws PortalException, SystemException;
089
090 }