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