1
14
15 package com.liferay.documentlibrary.service;
16
17 import com.liferay.portal.kernel.annotation.Transactional;
18 import com.liferay.portal.kernel.exception.PortalException;
19 import com.liferay.portal.kernel.exception.SystemException;
20 import com.liferay.portal.kernel.search.Hits;
21 import com.liferay.portal.service.ServiceContext;
22
23 import java.io.File;
24 import java.io.InputStream;
25
26 import java.util.Date;
27
28 @Transactional(rollbackFor = {PortalException.class, SystemException.class})
29
34 public interface DLLocalService {
35
36 public void addFile(
37 long companyId, String portletId, long groupId, long repositoryId,
38 String fileName, boolean validateFileExtension, long fileEntryId,
39 String properties, Date modifiedDate, ServiceContext serviceContext,
40 InputStream is)
41 throws PortalException, SystemException;
42
43 public void checkRoot(long companyId) throws SystemException;
44
45 public InputStream getFileAsStream(
46 long companyId, long repositoryId, String fileName)
47 throws PortalException, SystemException;
48
49 public InputStream getFileAsStream(
50 long companyId, long repositoryId, String fileName,
51 String versionNumber)
52 throws PortalException, SystemException;
53
54 public boolean hasFile(
55 long companyId, long repositoryId, String fileName,
56 String versionNumber)
57 throws PortalException, SystemException;
58
59 public void move(String srcDir, String destDir) throws SystemException;
60
61 public Hits search(
62 long companyId, String portletId, long groupId,
63 long userId, long[] repositoryIds, String keywords, int start,
64 int end)
65 throws SystemException;
66
67 public void updateFile(
68 long companyId, String portletId, long groupId, long repositoryId,
69 String fileName, boolean validateFileExtension,
70 String versionNumber, String sourceFileName, long fileEntryId,
71 String properties, Date modifiedDate, ServiceContext serviceContext,
72 InputStream is)
73 throws PortalException, SystemException;
74
75 public void validate(
76 String fileName, boolean validateFileExtension, byte[] bytes)
77 throws PortalException, SystemException;
78
79 public void validate(
80 String fileName, boolean validateFileExtension, File file)
81 throws PortalException, SystemException;
82
83 public void validate(
84 String fileName, boolean validateFileExtension, InputStream is)
85 throws PortalException, SystemException;
86
87 public void validate(String fileName, String sourceFileName, InputStream is)
88 throws PortalException, SystemException;
89
90 }