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.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class DLFileEntryLocalServiceUtil {
035
040
041
048 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
049 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addDLFileEntry(dlFileEntry);
052 }
053
054
060 public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
061 long fileEntryId) {
062 return getService().createDLFileEntry(fileEntryId);
063 }
064
065
072 public static void deleteDLFileEntry(long fileEntryId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteDLFileEntry(fileEntryId);
076 }
077
078
084 public static void deleteDLFileEntry(
085 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
086 throws com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteDLFileEntry(dlFileEntry);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161
169 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
170 long fileEntryId)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService().getDLFileEntry(fileEntryId);
174 }
175
176 public static com.liferay.portal.model.PersistedModel getPersistedModel(
177 java.io.Serializable primaryKeyObj)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 return getService().getPersistedModel(primaryKeyObj);
181 }
182
183
192 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntryByUuidAndGroupId(
193 java.lang.String uuid, long groupId)
194 throws com.liferay.portal.kernel.exception.PortalException,
195 com.liferay.portal.kernel.exception.SystemException {
196 return getService().getDLFileEntryByUuidAndGroupId(uuid, groupId);
197 }
198
199
211 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
212 int start, int end)
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().getDLFileEntries(start, end);
215 }
216
217
223 public static int getDLFileEntriesCount()
224 throws com.liferay.portal.kernel.exception.SystemException {
225 return getService().getDLFileEntriesCount();
226 }
227
228
235 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
236 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
237 throws com.liferay.portal.kernel.exception.SystemException {
238 return getService().updateDLFileEntry(dlFileEntry);
239 }
240
241
249 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
250 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
251 boolean merge)
252 throws com.liferay.portal.kernel.exception.SystemException {
253 return getService().updateDLFileEntry(dlFileEntry, merge);
254 }
255
256
261 public static java.lang.String getBeanIdentifier() {
262 return getService().getBeanIdentifier();
263 }
264
265
270 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
271 getService().setBeanIdentifier(beanIdentifier);
272 }
273
274 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
275 long userId, long groupId, long repositoryId, long folderId,
276 java.lang.String sourceFileName, java.lang.String mimeType,
277 java.lang.String title, java.lang.String description,
278 java.lang.String changeLog, long fileEntryTypeId,
279 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
280 java.io.File file, java.io.InputStream is, long size,
281 com.liferay.portal.service.ServiceContext serviceContext)
282 throws com.liferay.portal.kernel.exception.PortalException,
283 com.liferay.portal.kernel.exception.SystemException {
284 return getService()
285 .addFileEntry(userId, groupId, repositoryId, folderId,
286 sourceFileName, mimeType, title, description, changeLog,
287 fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
288 }
289
290 public static void addFileEntryResources(
291 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
292 boolean addGroupPermissions, boolean addGuestPermissions)
293 throws com.liferay.portal.kernel.exception.PortalException,
294 com.liferay.portal.kernel.exception.SystemException {
295 getService()
296 .addFileEntryResources(dlFileEntry, addGroupPermissions,
297 addGuestPermissions);
298 }
299
300 public static void addFileEntryResources(
301 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
302 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
303 throws com.liferay.portal.kernel.exception.PortalException,
304 com.liferay.portal.kernel.exception.SystemException {
305 getService()
306 .addFileEntryResources(dlFileEntry, groupPermissions,
307 guestPermissions);
308 }
309
310 public static void cancelCheckOut(long userId, long fileEntryId)
311 throws com.liferay.portal.kernel.exception.PortalException,
312 com.liferay.portal.kernel.exception.SystemException {
313 getService().cancelCheckOut(userId, fileEntryId);
314 }
315
316 public static void checkInFileEntry(long userId, long fileEntryId,
317 boolean majorVersion, java.lang.String changeLog,
318 com.liferay.portal.service.ServiceContext serviceContext)
319 throws com.liferay.portal.kernel.exception.PortalException,
320 com.liferay.portal.kernel.exception.SystemException {
321 getService()
322 .checkInFileEntry(userId, fileEntryId, majorVersion, changeLog,
323 serviceContext);
324 }
325
326 public static void checkInFileEntry(long userId, long fileEntryId,
327 java.lang.String lockUuid)
328 throws com.liferay.portal.kernel.exception.PortalException,
329 com.liferay.portal.kernel.exception.SystemException {
330 getService().checkInFileEntry(userId, fileEntryId, lockUuid);
331 }
332
333 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
334 long userId, long fileEntryId)
335 throws com.liferay.portal.kernel.exception.PortalException,
336 com.liferay.portal.kernel.exception.SystemException {
337 return getService().checkOutFileEntry(userId, fileEntryId);
338 }
339
340 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
341 long userId, long fileEntryId, java.lang.String owner,
342 long expirationTime)
343 throws com.liferay.portal.kernel.exception.PortalException,
344 com.liferay.portal.kernel.exception.SystemException {
345 return getService()
346 .checkOutFileEntry(userId, fileEntryId, owner, expirationTime);
347 }
348
349 public static void convertExtraSettings(java.lang.String[] keys)
350 throws com.liferay.portal.kernel.exception.PortalException,
351 com.liferay.portal.kernel.exception.SystemException {
352 getService().convertExtraSettings(keys);
353 }
354
355 public static void copyFileEntryMetadata(long companyId,
356 long fileEntryTypeId, long fileEntryId, long fromFileVersionId,
357 long toFileVersionId,
358 com.liferay.portal.service.ServiceContext serviceContext)
359 throws com.liferay.portal.kernel.exception.PortalException,
360 com.liferay.portal.kernel.exception.SystemException {
361 getService()
362 .copyFileEntryMetadata(companyId, fileEntryTypeId, fileEntryId,
363 fromFileVersionId, toFileVersionId, serviceContext);
364 }
365
366 public static void deleteFileEntries(long groupId, long folderId)
367 throws com.liferay.portal.kernel.exception.PortalException,
368 com.liferay.portal.kernel.exception.SystemException {
369 getService().deleteFileEntries(groupId, folderId);
370 }
371
372 public static void deleteFileEntry(long fileEntryId)
373 throws com.liferay.portal.kernel.exception.PortalException,
374 com.liferay.portal.kernel.exception.SystemException {
375 getService().deleteFileEntry(fileEntryId);
376 }
377
378 public static void deleteFileEntry(long userId, long fileEntryId)
379 throws com.liferay.portal.kernel.exception.PortalException,
380 com.liferay.portal.kernel.exception.SystemException {
381 getService().deleteFileEntry(userId, fileEntryId);
382 }
383
384 public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByAnyImageId(
385 long imageId)
386 throws com.liferay.portal.kernel.exception.SystemException {
387 return getService().fetchFileEntryByAnyImageId(imageId);
388 }
389
390 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getExtraSettingsFileEntries(
391 int start, int end)
392 throws com.liferay.portal.kernel.exception.SystemException {
393 return getService().getExtraSettingsFileEntries(start, end);
394 }
395
396 public static java.io.File getFile(long userId, long fileEntryId,
397 java.lang.String version, boolean incrementCounter)
398 throws com.liferay.portal.kernel.exception.PortalException,
399 com.liferay.portal.kernel.exception.SystemException {
400 return getService()
401 .getFile(userId, fileEntryId, version, incrementCounter);
402 }
403
404 public static java.io.InputStream getFileAsStream(long userId,
405 long fileEntryId, java.lang.String version)
406 throws com.liferay.portal.kernel.exception.PortalException,
407 com.liferay.portal.kernel.exception.SystemException {
408 return getService().getFileAsStream(userId, fileEntryId, version);
409 }
410
411 public static java.io.InputStream getFileAsStream(long userId,
412 long fileEntryId, java.lang.String version, boolean incrementCounter)
413 throws com.liferay.portal.kernel.exception.PortalException,
414 com.liferay.portal.kernel.exception.SystemException {
415 return getService()
416 .getFileAsStream(userId, fileEntryId, version,
417 incrementCounter);
418 }
419
420 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
421 int start, int end)
422 throws com.liferay.portal.kernel.exception.SystemException {
423 return getService().getFileEntries(start, end);
424 }
425
426 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
427 long groupId, long folderId, int start, int end,
428 com.liferay.portal.kernel.util.OrderByComparator obc)
429 throws com.liferay.portal.kernel.exception.SystemException {
430 return getService().getFileEntries(groupId, folderId, start, end, obc);
431 }
432
433 public static int getFileEntriesCount()
434 throws com.liferay.portal.kernel.exception.SystemException {
435 return getService().getFileEntriesCount();
436 }
437
438 public static int getFileEntriesCount(long groupId, long folderId)
439 throws com.liferay.portal.kernel.exception.SystemException {
440 return getService().getFileEntriesCount(groupId, folderId);
441 }
442
443 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
444 long fileEntryId)
445 throws com.liferay.portal.kernel.exception.PortalException,
446 com.liferay.portal.kernel.exception.SystemException {
447 return getService().getFileEntry(fileEntryId);
448 }
449
450 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
451 long groupId, long folderId, java.lang.String title)
452 throws com.liferay.portal.kernel.exception.PortalException,
453 com.liferay.portal.kernel.exception.SystemException {
454 return getService().getFileEntry(groupId, folderId, title);
455 }
456
457 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByName(
458 long groupId, long folderId, java.lang.String name)
459 throws com.liferay.portal.kernel.exception.PortalException,
460 com.liferay.portal.kernel.exception.SystemException {
461 return getService().getFileEntryByName(groupId, folderId, name);
462 }
463
464 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
465 java.lang.String uuid, long groupId)
466 throws com.liferay.portal.kernel.exception.PortalException,
467 com.liferay.portal.kernel.exception.SystemException {
468 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
469 }
470
471 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
472 long groupId, int start, int end)
473 throws com.liferay.portal.kernel.exception.SystemException {
474 return getService().getGroupFileEntries(groupId, start, end);
475 }
476
477 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
478 long groupId, int start, int end,
479 com.liferay.portal.kernel.util.OrderByComparator obc)
480 throws com.liferay.portal.kernel.exception.SystemException {
481 return getService().getGroupFileEntries(groupId, start, end, obc);
482 }
483
484 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
485 long groupId, long userId, int start, int end)
486 throws com.liferay.portal.kernel.exception.SystemException {
487 return getService().getGroupFileEntries(groupId, userId, start, end);
488 }
489
490 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
491 long groupId, long userId, int start, int end,
492 com.liferay.portal.kernel.util.OrderByComparator obc)
493 throws com.liferay.portal.kernel.exception.SystemException {
494 return getService().getGroupFileEntries(groupId, userId, start, end, obc);
495 }
496
497 public static int getGroupFileEntriesCount(long groupId)
498 throws com.liferay.portal.kernel.exception.SystemException {
499 return getService().getGroupFileEntriesCount(groupId);
500 }
501
502 public static int getGroupFileEntriesCount(long groupId, long userId)
503 throws com.liferay.portal.kernel.exception.SystemException {
504 return getService().getGroupFileEntriesCount(groupId, userId);
505 }
506
507 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
508 throws com.liferay.portal.kernel.exception.SystemException {
509 return getService().getNoAssetFileEntries();
510 }
511
512 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getOrphanedFileEntries()
513 throws com.liferay.portal.kernel.exception.SystemException {
514 return getService().getOrphanedFileEntries();
515 }
516
517 public static boolean hasExtraSettings()
518 throws com.liferay.portal.kernel.exception.SystemException {
519 return getService().hasExtraSettings();
520 }
521
522 public static boolean hasFileEntryLock(long userId, long fileEntryId)
523 throws com.liferay.portal.kernel.exception.PortalException,
524 com.liferay.portal.kernel.exception.SystemException {
525 return getService().hasFileEntryLock(userId, fileEntryId);
526 }
527
528 public static boolean isFileEntryCheckedOut(long fileEntryId)
529 throws com.liferay.portal.kernel.exception.PortalException,
530 com.liferay.portal.kernel.exception.SystemException {
531 return getService().isFileEntryCheckedOut(fileEntryId);
532 }
533
534 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
535 long userId, long fileEntryId, long newFolderId,
536 com.liferay.portal.service.ServiceContext serviceContext)
537 throws com.liferay.portal.kernel.exception.PortalException,
538 com.liferay.portal.kernel.exception.SystemException {
539 return getService()
540 .moveFileEntry(userId, fileEntryId, newFolderId,
541 serviceContext);
542 }
543
544 public static void revertFileEntry(long userId, long fileEntryId,
545 java.lang.String version,
546 com.liferay.portal.service.ServiceContext serviceContext)
547 throws com.liferay.portal.kernel.exception.PortalException,
548 com.liferay.portal.kernel.exception.SystemException {
549 getService()
550 .revertFileEntry(userId, fileEntryId, version, serviceContext);
551 }
552
553 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
554 long userId, long fileEntryId, java.lang.String sourceFileName,
555 java.lang.String mimeType, java.lang.String title,
556 java.lang.String description, java.lang.String changeLog,
557 boolean majorVersion, long fileEntryTypeId,
558 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
559 java.io.File file, java.io.InputStream is, long size,
560 com.liferay.portal.service.ServiceContext serviceContext)
561 throws com.liferay.portal.kernel.exception.PortalException,
562 com.liferay.portal.kernel.exception.SystemException {
563 return getService()
564 .updateFileEntry(userId, fileEntryId, sourceFileName,
565 mimeType, title, description, changeLog, majorVersion,
566 fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
567 }
568
569 public static void updateSmallImage(long smallImageId, long largeImageId)
570 throws com.liferay.portal.kernel.exception.PortalException,
571 com.liferay.portal.kernel.exception.SystemException {
572 getService().updateSmallImage(smallImageId, largeImageId);
573 }
574
575 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
576 long userId, long fileVersionId, int status,
577 java.util.Map<java.lang.String, java.io.Serializable> workflowContext,
578 com.liferay.portal.service.ServiceContext serviceContext)
579 throws com.liferay.portal.kernel.exception.PortalException,
580 com.liferay.portal.kernel.exception.SystemException {
581 return getService()
582 .updateStatus(userId, fileVersionId, status,
583 workflowContext, serviceContext);
584 }
585
586 public static boolean verifyFileEntryCheckOut(long fileEntryId,
587 java.lang.String lockUuid)
588 throws com.liferay.portal.kernel.exception.PortalException,
589 com.liferay.portal.kernel.exception.SystemException {
590 return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
591 }
592
593 public static DLFileEntryLocalService getService() {
594 if (_service == null) {
595 _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
596
597 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
598 "_service");
599 MethodCache.remove(DLFileEntryLocalService.class);
600 }
601
602 return _service;
603 }
604
605 public void setService(DLFileEntryLocalService service) {
606 MethodCache.remove(DLFileEntryLocalService.class);
607
608 _service = service;
609
610 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
611 "_service");
612 MethodCache.remove(DLFileEntryLocalService.class);
613 }
614
615 private static DLFileEntryLocalService _service;
616 }