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, long fileEntryId, String properties,
47 Date modifiedDate, String[] tagsCategories, String[] tagsEntries,
48 InputStream is)
49 throws PortalException, SystemException;
50
51 public void checkRoot(long companyId) throws SystemException;
52
53 public InputStream getFileAsStream(
54 long companyId, long repositoryId, String fileName)
55 throws PortalException, SystemException;
56
57 public InputStream getFileAsStream(
58 long companyId, long repositoryId, String fileName,
59 double versionNumber)
60 throws PortalException, SystemException;
61
62 public boolean hasFile(
63 long companyId, long repositoryId, String fileName,
64 double versionNumber)
65 throws PortalException, SystemException;
66
67 public void move(String srcDir, String destDir) throws SystemException;
68
69 public Hits search(
70 long companyId, String portletId, long groupId,
71 long userId, long[] repositoryIds, String keywords, int start,
72 int end)
73 throws SystemException;
74
75 public void updateFile(
76 long companyId, String portletId, long groupId, long repositoryId,
77 String fileName, double versionNumber, String sourceFileName,
78 long fileEntryId, String properties, Date modifiedDate,
79 String[] tagsCategories, String[] tagsEntries, InputStream is)
80 throws PortalException, SystemException;
81
82 public void validate(String fileName, File file)
83 throws PortalException, SystemException;
84
85 public void validate(String fileName, byte[] bytes)
86 throws PortalException, SystemException;
87
88 public void validate(String fileName, InputStream is)
89 throws PortalException, SystemException;
90
91 public void validate(String fileName, String sourceFileName, InputStream is)
92 throws PortalException;
93
94 }