001
014
015 package com.liferay.portlet.documentlibrary.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
033 public class DLFileEntryServiceUtil {
034
039
040
045 public static java.lang.String getBeanIdentifier() {
046 return getService().getBeanIdentifier();
047 }
048
049
054 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055 getService().setBeanIdentifier(beanIdentifier);
056 }
057
058 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
059 long groupId, long repositoryId, long folderId,
060 java.lang.String sourceFileName, java.lang.String mimeType,
061 java.lang.String title, java.lang.String description,
062 java.lang.String changeLog, long fileEntryTypeId,
063 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
064 java.io.File file, java.io.InputStream is, long size,
065 com.liferay.portal.service.ServiceContext serviceContext)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 return getService()
069 .addFileEntry(groupId, repositoryId, folderId,
070 sourceFileName, mimeType, title, description, changeLog,
071 fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
072 }
073
074 public static com.liferay.portlet.documentlibrary.model.DLFileVersion cancelCheckOut(
075 long fileEntryId)
076 throws com.liferay.portal.kernel.exception.PortalException,
077 com.liferay.portal.kernel.exception.SystemException {
078 return getService().cancelCheckOut(fileEntryId);
079 }
080
081 public static void checkInFileEntry(long fileEntryId, boolean major,
082 java.lang.String changeLog,
083 com.liferay.portal.service.ServiceContext serviceContext)
084 throws com.liferay.portal.kernel.exception.PortalException,
085 com.liferay.portal.kernel.exception.SystemException {
086 getService()
087 .checkInFileEntry(fileEntryId, major, changeLog, serviceContext);
088 }
089
090 public static void checkInFileEntry(long fileEntryId,
091 java.lang.String lockUuid)
092 throws com.liferay.portal.kernel.exception.PortalException,
093 com.liferay.portal.kernel.exception.SystemException {
094 getService().checkInFileEntry(fileEntryId, lockUuid);
095 }
096
097
100 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
101 long fileEntryId)
102 throws com.liferay.portal.kernel.exception.PortalException,
103 com.liferay.portal.kernel.exception.SystemException {
104 return getService().checkOutFileEntry(fileEntryId);
105 }
106
107 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
108 long fileEntryId,
109 com.liferay.portal.service.ServiceContext serviceContext)
110 throws com.liferay.portal.kernel.exception.PortalException,
111 com.liferay.portal.kernel.exception.SystemException {
112 return getService().checkOutFileEntry(fileEntryId, serviceContext);
113 }
114
115
119 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
120 long fileEntryId, java.lang.String owner, long expirationTime)
121 throws com.liferay.portal.kernel.exception.PortalException,
122 com.liferay.portal.kernel.exception.SystemException {
123 return getService().checkOutFileEntry(fileEntryId, owner, expirationTime);
124 }
125
126 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
127 long fileEntryId, java.lang.String owner, long expirationTime,
128 com.liferay.portal.service.ServiceContext serviceContext)
129 throws com.liferay.portal.kernel.exception.PortalException,
130 com.liferay.portal.kernel.exception.SystemException {
131 return getService()
132 .checkOutFileEntry(fileEntryId, owner, expirationTime,
133 serviceContext);
134 }
135
136 public static com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
137 long groupId, long repositoryId, long fileEntryId, long destFolderId,
138 com.liferay.portal.service.ServiceContext serviceContext)
139 throws com.liferay.portal.kernel.exception.PortalException,
140 com.liferay.portal.kernel.exception.SystemException {
141 return getService()
142 .copyFileEntry(groupId, repositoryId, fileEntryId,
143 destFolderId, serviceContext);
144 }
145
146 public static void deleteFileEntry(long fileEntryId)
147 throws com.liferay.portal.kernel.exception.PortalException,
148 com.liferay.portal.kernel.exception.SystemException {
149 getService().deleteFileEntry(fileEntryId);
150 }
151
152 public static void deleteFileEntry(long groupId, long folderId,
153 java.lang.String title)
154 throws com.liferay.portal.kernel.exception.PortalException,
155 com.liferay.portal.kernel.exception.SystemException {
156 getService().deleteFileEntry(groupId, folderId, title);
157 }
158
159 public static void deleteFileVersion(long fileEntryId,
160 java.lang.String version)
161 throws com.liferay.portal.kernel.exception.PortalException,
162 com.liferay.portal.kernel.exception.SystemException {
163 getService().deleteFileVersion(fileEntryId, version);
164 }
165
166 public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
167 long imageId)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException {
170 return getService().fetchFileEntryByImageId(imageId);
171 }
172
173 public static java.io.InputStream getFileAsStream(long fileEntryId,
174 java.lang.String version)
175 throws com.liferay.portal.kernel.exception.PortalException,
176 com.liferay.portal.kernel.exception.SystemException {
177 return getService().getFileAsStream(fileEntryId, version);
178 }
179
180 public static java.io.InputStream getFileAsStream(long fileEntryId,
181 java.lang.String version, boolean incrementCounter)
182 throws com.liferay.portal.kernel.exception.PortalException,
183 com.liferay.portal.kernel.exception.SystemException {
184 return getService()
185 .getFileAsStream(fileEntryId, version, incrementCounter);
186 }
187
188 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
189 long groupId, long folderId, int start, int end,
190 com.liferay.portal.kernel.util.OrderByComparator obc)
191 throws com.liferay.portal.kernel.exception.SystemException {
192 return getService().getFileEntries(groupId, folderId, start, end, obc);
193 }
194
195 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
196 long groupId, long folderId, long fileEntryTypeId, int start, int end,
197 com.liferay.portal.kernel.util.OrderByComparator obc)
198 throws com.liferay.portal.kernel.exception.SystemException {
199 return getService()
200 .getFileEntries(groupId, folderId, fileEntryTypeId, start,
201 end, obc);
202 }
203
204 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
205 long groupId, long folderId, java.lang.String[] mimeTypes, int start,
206 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
207 throws com.liferay.portal.kernel.exception.SystemException {
208 return getService()
209 .getFileEntries(groupId, folderId, mimeTypes, start, end, obc);
210 }
211
212 public static int getFileEntriesCount(long groupId, long folderId)
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().getFileEntriesCount(groupId, folderId);
215 }
216
217 public static int getFileEntriesCount(long groupId, long folderId,
218 long fileEntryTypeId)
219 throws com.liferay.portal.kernel.exception.SystemException {
220 return getService()
221 .getFileEntriesCount(groupId, folderId, fileEntryTypeId);
222 }
223
224 public static int getFileEntriesCount(long groupId, long folderId,
225 java.lang.String[] mimeTypes)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return getService().getFileEntriesCount(groupId, folderId, mimeTypes);
228 }
229
230 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
231 long fileEntryId)
232 throws com.liferay.portal.kernel.exception.PortalException,
233 com.liferay.portal.kernel.exception.SystemException {
234 return getService().getFileEntry(fileEntryId);
235 }
236
237 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
238 long groupId, long folderId, java.lang.String title)
239 throws com.liferay.portal.kernel.exception.PortalException,
240 com.liferay.portal.kernel.exception.SystemException {
241 return getService().getFileEntry(groupId, folderId, title);
242 }
243
244 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
245 java.lang.String uuid, long groupId)
246 throws com.liferay.portal.kernel.exception.PortalException,
247 com.liferay.portal.kernel.exception.SystemException {
248 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
249 }
250
251 public static com.liferay.portal.model.Lock getFileEntryLock(
252 long fileEntryId) {
253 return getService().getFileEntryLock(fileEntryId);
254 }
255
256 public static int getFoldersFileEntriesCount(long groupId,
257 java.util.List<java.lang.Long> folderIds, int status)
258 throws com.liferay.portal.kernel.exception.SystemException {
259 return getService()
260 .getFoldersFileEntriesCount(groupId, folderIds, status);
261 }
262
263 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
264 long groupId, long userId, long rootFolderId, int start, int end,
265 com.liferay.portal.kernel.util.OrderByComparator obc)
266 throws com.liferay.portal.kernel.exception.SystemException {
267 return getService()
268 .getGroupFileEntries(groupId, userId, rootFolderId, start,
269 end, obc);
270 }
271
272 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
273 long groupId, long userId, long rootFolderId,
274 java.lang.String[] mimeTypes, int status, int start, int end,
275 com.liferay.portal.kernel.util.OrderByComparator obc)
276 throws com.liferay.portal.kernel.exception.SystemException {
277 return getService()
278 .getGroupFileEntries(groupId, userId, rootFolderId,
279 mimeTypes, status, start, end, obc);
280 }
281
282 public static int getGroupFileEntriesCount(long groupId, long userId,
283 long rootFolderId)
284 throws com.liferay.portal.kernel.exception.SystemException {
285 return getService()
286 .getGroupFileEntriesCount(groupId, userId, rootFolderId);
287 }
288
289 public static int getGroupFileEntriesCount(long groupId, long userId,
290 long rootFolderId, java.lang.String[] mimeTypes, int status)
291 throws com.liferay.portal.kernel.exception.SystemException {
292 return getService()
293 .getGroupFileEntriesCount(groupId, userId, rootFolderId,
294 mimeTypes, status);
295 }
296
297 public static boolean hasFileEntryLock(long fileEntryId)
298 throws com.liferay.portal.kernel.exception.PortalException,
299 com.liferay.portal.kernel.exception.SystemException {
300 return getService().hasFileEntryLock(fileEntryId);
301 }
302
303 public static boolean isFileEntryCheckedOut(long fileEntryId)
304 throws com.liferay.portal.kernel.exception.PortalException,
305 com.liferay.portal.kernel.exception.SystemException {
306 return getService().isFileEntryCheckedOut(fileEntryId);
307 }
308
309 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
310 long fileEntryId, long newFolderId,
311 com.liferay.portal.service.ServiceContext serviceContext)
312 throws com.liferay.portal.kernel.exception.PortalException,
313 com.liferay.portal.kernel.exception.SystemException {
314 return getService()
315 .moveFileEntry(fileEntryId, newFolderId, serviceContext);
316 }
317
318 public static com.liferay.portal.model.Lock refreshFileEntryLock(
319 java.lang.String lockUuid, long expirationTime)
320 throws com.liferay.portal.kernel.exception.PortalException,
321 com.liferay.portal.kernel.exception.SystemException {
322 return getService().refreshFileEntryLock(lockUuid, expirationTime);
323 }
324
325 public static void revertFileEntry(long fileEntryId,
326 java.lang.String version,
327 com.liferay.portal.service.ServiceContext serviceContext)
328 throws com.liferay.portal.kernel.exception.PortalException,
329 com.liferay.portal.kernel.exception.SystemException {
330 getService().revertFileEntry(fileEntryId, version, serviceContext);
331 }
332
333 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
334 long fileEntryId, java.lang.String sourceFileName,
335 java.lang.String mimeType, java.lang.String title,
336 java.lang.String description, java.lang.String changeLog,
337 boolean majorVersion, long fileEntryTypeId,
338 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
339 java.io.File file, java.io.InputStream is, long size,
340 com.liferay.portal.service.ServiceContext serviceContext)
341 throws com.liferay.portal.kernel.exception.PortalException,
342 com.liferay.portal.kernel.exception.SystemException {
343 return getService()
344 .updateFileEntry(fileEntryId, sourceFileName, mimeType,
345 title, description, changeLog, majorVersion, fileEntryTypeId,
346 fieldsMap, file, is, size, serviceContext);
347 }
348
349 public static boolean verifyFileEntryCheckOut(long fileEntryId,
350 java.lang.String lockUuid)
351 throws com.liferay.portal.kernel.exception.PortalException,
352 com.liferay.portal.kernel.exception.SystemException {
353 return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
354 }
355
356 public static boolean verifyFileEntryLock(long fileEntryId,
357 java.lang.String lockUuid)
358 throws com.liferay.portal.kernel.exception.PortalException,
359 com.liferay.portal.kernel.exception.SystemException {
360 return getService().verifyFileEntryLock(fileEntryId, lockUuid);
361 }
362
363 public static DLFileEntryService getService() {
364 if (_service == null) {
365 _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
366
367 ReferenceRegistry.registerReference(DLFileEntryServiceUtil.class,
368 "_service");
369 }
370
371 return _service;
372 }
373
374
377 public void setService(DLFileEntryService service) {
378 }
379
380 private static DLFileEntryService _service;
381 }