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.search.Hits;
28
29 import java.io.File;
30 import java.io.InputStream;
31
32 import java.util.Date;
33
34
40 public class DLLocalServiceUtil {
41
42 public static void addFile(
43 long companyId, String portletId, long groupId, long repositoryId,
44 String fileName, long fileEntryId, String properties,
45 Date modifiedDate, String[] tagsEntries, InputStream is)
46 throws PortalException, SystemException {
47
48 _service.addFile(
49 companyId, portletId, groupId, repositoryId, fileName, fileEntryId,
50 properties, modifiedDate, tagsEntries, is);
51 }
52
53 public static void checkRoot(long companyId) throws SystemException {
54 _service.checkRoot(companyId);
55 }
56
57 public static InputStream getFileAsStream(
58 long companyId, long repositoryId, String fileName)
59 throws PortalException, SystemException {
60
61 return _service.getFileAsStream(companyId, repositoryId, fileName);
62 }
63
64 public static InputStream getFileAsStream(
65 long companyId, long repositoryId, String fileName,
66 double versionNumber)
67 throws PortalException, SystemException {
68
69 return _service.getFileAsStream(
70 companyId, repositoryId, fileName, versionNumber);
71 }
72
73 public static boolean hasFile(
74 long companyId, long repositoryId, String fileName,
75 double versionNumber)
76 throws PortalException, SystemException {
77
78 return _service.hasFile(
79 companyId, repositoryId, fileName, versionNumber);
80 }
81
82 public static void move(String srcDir, String destDir)
83 throws SystemException {
84
85 _service.move(srcDir, destDir);
86 }
87
88 public static Hits search(
89 long companyId, String portletId, long groupId,
90 long userId, long[] repositoryIds, String keywords, int start,
91 int end)
92 throws SystemException {
93
94 return _service.search(
95 companyId, portletId, groupId, userId, repositoryIds, keywords,
96 start, end);
97 }
98
99 public static void updateFile(
100 long companyId, String portletId, long groupId, long repositoryId,
101 String fileName, double versionNumber, String sourceFileName,
102 long fileEntryId, String properties, Date modifiedDate,
103 String[] tagsEntries, InputStream is)
104 throws PortalException, SystemException {
105
106 _service.updateFile(
107 companyId, portletId, groupId, repositoryId, fileName,
108 versionNumber, sourceFileName, fileEntryId, properties,
109 modifiedDate, tagsEntries, is);
110 }
111
112 public static void validate(String fileName, File file)
113 throws PortalException {
114
115 _service.validate(fileName, file);
116 }
117
118 public static void validate(String fileName, byte[] bytes)
119 throws PortalException {
120
121 _service.validate(fileName, bytes);
122 }
123
124 public static void validate(String fileName, InputStream is)
125 throws PortalException {
126
127 _service.validate(fileName, is);
128 }
129
130 public static void validate(
131 String fileName, String sourceFileName, InputStream is)
132 throws PortalException {
133
134 _service.validate(fileName, sourceFileName, is);
135 }
136
137 public void setService(DLLocalService service) {
138 _service = service;
139 }
140
141 private static DLLocalService _service;
142
143 }