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