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