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 public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchDLFileEntry(
162 long fileEntryId)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getService().fetchDLFileEntry(fileEntryId);
165 }
166
167
175 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
176 long fileEntryId)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 return getService().getDLFileEntry(fileEntryId);
180 }
181
182 public static com.liferay.portal.model.PersistedModel getPersistedModel(
183 java.io.Serializable primaryKeyObj)
184 throws com.liferay.portal.kernel.exception.PortalException,
185 com.liferay.portal.kernel.exception.SystemException {
186 return getService().getPersistedModel(primaryKeyObj);
187 }
188
189
198 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntryByUuidAndGroupId(
199 java.lang.String uuid, long groupId)
200 throws com.liferay.portal.kernel.exception.PortalException,
201 com.liferay.portal.kernel.exception.SystemException {
202 return getService().getDLFileEntryByUuidAndGroupId(uuid, groupId);
203 }
204
205
217 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
218 int start, int end)
219 throws com.liferay.portal.kernel.exception.SystemException {
220 return getService().getDLFileEntries(start, end);
221 }
222
223
229 public static int getDLFileEntriesCount()
230 throws com.liferay.portal.kernel.exception.SystemException {
231 return getService().getDLFileEntriesCount();
232 }
233
234
241 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
242 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
243 throws com.liferay.portal.kernel.exception.SystemException {
244 return getService().updateDLFileEntry(dlFileEntry);
245 }
246
247
255 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
256 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
257 boolean merge)
258 throws com.liferay.portal.kernel.exception.SystemException {
259 return getService().updateDLFileEntry(dlFileEntry, merge);
260 }
261
262
267 public static java.lang.String getBeanIdentifier() {
268 return getService().getBeanIdentifier();
269 }
270
271
276 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
277 getService().setBeanIdentifier(beanIdentifier);
278 }
279
280 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
281 long userId, long groupId, long repositoryId, long folderId,
282 java.lang.String sourceFileName, java.lang.String mimeType,
283 java.lang.String title, java.lang.String description,
284 java.lang.String changeLog, long fileEntryTypeId,
285 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
286 java.io.File file, java.io.InputStream is, long size,
287 com.liferay.portal.service.ServiceContext serviceContext)
288 throws com.liferay.portal.kernel.exception.PortalException,
289 com.liferay.portal.kernel.exception.SystemException {
290 return getService()
291 .addFileEntry(userId, groupId, repositoryId, folderId,
292 sourceFileName, mimeType, title, description, changeLog,
293 fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
294 }
295
296 public static void addFileEntryResources(
297 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
298 boolean addGroupPermissions, boolean addGuestPermissions)
299 throws com.liferay.portal.kernel.exception.PortalException,
300 com.liferay.portal.kernel.exception.SystemException {
301 getService()
302 .addFileEntryResources(dlFileEntry, addGroupPermissions,
303 addGuestPermissions);
304 }
305
306 public static void addFileEntryResources(
307 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
308 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
309 throws com.liferay.portal.kernel.exception.PortalException,
310 com.liferay.portal.kernel.exception.SystemException {
311 getService()
312 .addFileEntryResources(dlFileEntry, groupPermissions,
313 guestPermissions);
314 }
315
316 public static void cancelCheckOut(long userId, long fileEntryId)
317 throws com.liferay.portal.kernel.exception.PortalException,
318 com.liferay.portal.kernel.exception.SystemException {
319 getService().cancelCheckOut(userId, fileEntryId);
320 }
321
322 public static void checkInFileEntry(long userId, long fileEntryId,
323 boolean majorVersion, java.lang.String changeLog,
324 com.liferay.portal.service.ServiceContext serviceContext)
325 throws com.liferay.portal.kernel.exception.PortalException,
326 com.liferay.portal.kernel.exception.SystemException {
327 getService()
328 .checkInFileEntry(userId, fileEntryId, majorVersion, changeLog,
329 serviceContext);
330 }
331
332 public static void checkInFileEntry(long userId, long fileEntryId,
333 java.lang.String lockUuid)
334 throws com.liferay.portal.kernel.exception.PortalException,
335 com.liferay.portal.kernel.exception.SystemException {
336 getService().checkInFileEntry(userId, fileEntryId, lockUuid);
337 }
338
339
342 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
343 long userId, long fileEntryId)
344 throws com.liferay.portal.kernel.exception.PortalException,
345 com.liferay.portal.kernel.exception.SystemException {
346 return getService().checkOutFileEntry(userId, fileEntryId);
347 }
348
349 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
350 long userId, long fileEntryId,
351 com.liferay.portal.service.ServiceContext serviceContext)
352 throws com.liferay.portal.kernel.exception.PortalException,
353 com.liferay.portal.kernel.exception.SystemException {
354 return getService()
355 .checkOutFileEntry(userId, fileEntryId, serviceContext);
356 }
357
358
362 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
363 long userId, long fileEntryId, java.lang.String owner,
364 long expirationTime)
365 throws com.liferay.portal.kernel.exception.PortalException,
366 com.liferay.portal.kernel.exception.SystemException {
367 return getService()
368 .checkOutFileEntry(userId, fileEntryId, owner, expirationTime);
369 }
370
371 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
372 long userId, long fileEntryId, java.lang.String owner,
373 long expirationTime,
374 com.liferay.portal.service.ServiceContext serviceContext)
375 throws com.liferay.portal.kernel.exception.PortalException,
376 com.liferay.portal.kernel.exception.SystemException {
377 return getService()
378 .checkOutFileEntry(userId, fileEntryId, owner,
379 expirationTime, serviceContext);
380 }
381
382 public static void convertExtraSettings(java.lang.String[] keys)
383 throws com.liferay.portal.kernel.exception.PortalException,
384 com.liferay.portal.kernel.exception.SystemException {
385 getService().convertExtraSettings(keys);
386 }
387
388 public static void copyFileEntryMetadata(long companyId,
389 long fileEntryTypeId, long fileEntryId, long fromFileVersionId,
390 long toFileVersionId,
391 com.liferay.portal.service.ServiceContext serviceContext)
392 throws com.liferay.portal.kernel.exception.PortalException,
393 com.liferay.portal.kernel.exception.SystemException {
394 getService()
395 .copyFileEntryMetadata(companyId, fileEntryTypeId, fileEntryId,
396 fromFileVersionId, toFileVersionId, serviceContext);
397 }
398
399 public static void deleteFileEntries(long groupId, long folderId)
400 throws com.liferay.portal.kernel.exception.PortalException,
401 com.liferay.portal.kernel.exception.SystemException {
402 getService().deleteFileEntries(groupId, folderId);
403 }
404
405 public static void deleteFileEntry(long fileEntryId)
406 throws com.liferay.portal.kernel.exception.PortalException,
407 com.liferay.portal.kernel.exception.SystemException {
408 getService().deleteFileEntry(fileEntryId);
409 }
410
411 public static void deleteFileEntry(long userId, long fileEntryId)
412 throws com.liferay.portal.kernel.exception.PortalException,
413 com.liferay.portal.kernel.exception.SystemException {
414 getService().deleteFileEntry(userId, fileEntryId);
415 }
416
417 public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByAnyImageId(
418 long imageId)
419 throws com.liferay.portal.kernel.exception.SystemException {
420 return getService().fetchFileEntryByAnyImageId(imageId);
421 }
422
423 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getExtraSettingsFileEntries(
424 int start, int end)
425 throws com.liferay.portal.kernel.exception.SystemException {
426 return getService().getExtraSettingsFileEntries(start, end);
427 }
428
429 public static java.io.File getFile(long userId, long fileEntryId,
430 java.lang.String version, boolean incrementCounter)
431 throws com.liferay.portal.kernel.exception.PortalException,
432 com.liferay.portal.kernel.exception.SystemException {
433 return getService()
434 .getFile(userId, fileEntryId, version, incrementCounter);
435 }
436
437 public static java.io.InputStream getFileAsStream(long userId,
438 long fileEntryId, java.lang.String version)
439 throws com.liferay.portal.kernel.exception.PortalException,
440 com.liferay.portal.kernel.exception.SystemException {
441 return getService().getFileAsStream(userId, fileEntryId, version);
442 }
443
444 public static java.io.InputStream getFileAsStream(long userId,
445 long fileEntryId, java.lang.String version, boolean incrementCounter)
446 throws com.liferay.portal.kernel.exception.PortalException,
447 com.liferay.portal.kernel.exception.SystemException {
448 return getService()
449 .getFileAsStream(userId, fileEntryId, version,
450 incrementCounter);
451 }
452
453 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
454 int start, int end)
455 throws com.liferay.portal.kernel.exception.SystemException {
456 return getService().getFileEntries(start, end);
457 }
458
459 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
460 long groupId, long folderId, int start, int end,
461 com.liferay.portal.kernel.util.OrderByComparator obc)
462 throws com.liferay.portal.kernel.exception.SystemException {
463 return getService().getFileEntries(groupId, folderId, start, end, obc);
464 }
465
466 public static int getFileEntriesCount()
467 throws com.liferay.portal.kernel.exception.SystemException {
468 return getService().getFileEntriesCount();
469 }
470
471 public static int getFileEntriesCount(long groupId, long folderId)
472 throws com.liferay.portal.kernel.exception.SystemException {
473 return getService().getFileEntriesCount(groupId, folderId);
474 }
475
476 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
477 long fileEntryId)
478 throws com.liferay.portal.kernel.exception.PortalException,
479 com.liferay.portal.kernel.exception.SystemException {
480 return getService().getFileEntry(fileEntryId);
481 }
482
483 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
484 long groupId, long folderId, java.lang.String title)
485 throws com.liferay.portal.kernel.exception.PortalException,
486 com.liferay.portal.kernel.exception.SystemException {
487 return getService().getFileEntry(groupId, folderId, title);
488 }
489
490 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByName(
491 long groupId, long folderId, java.lang.String name)
492 throws com.liferay.portal.kernel.exception.PortalException,
493 com.liferay.portal.kernel.exception.SystemException {
494 return getService().getFileEntryByName(groupId, folderId, name);
495 }
496
497 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
498 java.lang.String uuid, long groupId)
499 throws com.liferay.portal.kernel.exception.PortalException,
500 com.liferay.portal.kernel.exception.SystemException {
501 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
502 }
503
504 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
505 long groupId, int start, int end)
506 throws com.liferay.portal.kernel.exception.SystemException {
507 return getService().getGroupFileEntries(groupId, start, end);
508 }
509
510 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
511 long groupId, int start, int end,
512 com.liferay.portal.kernel.util.OrderByComparator obc)
513 throws com.liferay.portal.kernel.exception.SystemException {
514 return getService().getGroupFileEntries(groupId, start, end, obc);
515 }
516
517 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
518 long groupId, long userId, int start, int end)
519 throws com.liferay.portal.kernel.exception.SystemException {
520 return getService().getGroupFileEntries(groupId, userId, start, end);
521 }
522
523 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
524 long groupId, long userId, int start, int end,
525 com.liferay.portal.kernel.util.OrderByComparator obc)
526 throws com.liferay.portal.kernel.exception.SystemException {
527 return getService().getGroupFileEntries(groupId, userId, start, end, obc);
528 }
529
530 public static int getGroupFileEntriesCount(long groupId)
531 throws com.liferay.portal.kernel.exception.SystemException {
532 return getService().getGroupFileEntriesCount(groupId);
533 }
534
535 public static int getGroupFileEntriesCount(long groupId, long userId)
536 throws com.liferay.portal.kernel.exception.SystemException {
537 return getService().getGroupFileEntriesCount(groupId, userId);
538 }
539
540 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
541 throws com.liferay.portal.kernel.exception.SystemException {
542 return getService().getNoAssetFileEntries();
543 }
544
545 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getOrphanedFileEntries()
546 throws com.liferay.portal.kernel.exception.SystemException {
547 return getService().getOrphanedFileEntries();
548 }
549
550 public static boolean hasExtraSettings()
551 throws com.liferay.portal.kernel.exception.SystemException {
552 return getService().hasExtraSettings();
553 }
554
555 public static boolean hasFileEntryLock(long userId, long fileEntryId)
556 throws com.liferay.portal.kernel.exception.PortalException,
557 com.liferay.portal.kernel.exception.SystemException {
558 return getService().hasFileEntryLock(userId, fileEntryId);
559 }
560
561 public static boolean isFileEntryCheckedOut(long fileEntryId)
562 throws com.liferay.portal.kernel.exception.PortalException,
563 com.liferay.portal.kernel.exception.SystemException {
564 return getService().isFileEntryCheckedOut(fileEntryId);
565 }
566
567 public static com.liferay.portal.model.Lock lockFileEntry(long userId,
568 long fileEntryId)
569 throws com.liferay.portal.kernel.exception.PortalException,
570 com.liferay.portal.kernel.exception.SystemException {
571 return getService().lockFileEntry(userId, fileEntryId);
572 }
573
574 public static com.liferay.portal.model.Lock lockFileEntry(long userId,
575 long fileEntryId, java.lang.String owner, long expirationTime)
576 throws com.liferay.portal.kernel.exception.PortalException,
577 com.liferay.portal.kernel.exception.SystemException {
578 return getService()
579 .lockFileEntry(userId, fileEntryId, owner, expirationTime);
580 }
581
582 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
583 long userId, long fileEntryId, long newFolderId,
584 com.liferay.portal.service.ServiceContext serviceContext)
585 throws com.liferay.portal.kernel.exception.PortalException,
586 com.liferay.portal.kernel.exception.SystemException {
587 return getService()
588 .moveFileEntry(userId, fileEntryId, newFolderId,
589 serviceContext);
590 }
591
592 public static void revertFileEntry(long userId, long fileEntryId,
593 java.lang.String version,
594 com.liferay.portal.service.ServiceContext serviceContext)
595 throws com.liferay.portal.kernel.exception.PortalException,
596 com.liferay.portal.kernel.exception.SystemException {
597 getService()
598 .revertFileEntry(userId, fileEntryId, version, serviceContext);
599 }
600
601 public static void unlockFileEntry(long fileEntryId)
602 throws com.liferay.portal.kernel.exception.SystemException {
603 getService().unlockFileEntry(fileEntryId);
604 }
605
606 public static void unlockFileEntry(long fileEntryId,
607 java.lang.String lockUuid)
608 throws com.liferay.portal.kernel.exception.PortalException,
609 com.liferay.portal.kernel.exception.SystemException {
610 getService().unlockFileEntry(fileEntryId, lockUuid);
611 }
612
613 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
614 long userId, long fileEntryId, java.lang.String sourceFileName,
615 java.lang.String mimeType, java.lang.String title,
616 java.lang.String description, java.lang.String changeLog,
617 boolean majorVersion, long fileEntryTypeId,
618 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
619 java.io.File file, java.io.InputStream is, long size,
620 com.liferay.portal.service.ServiceContext serviceContext)
621 throws com.liferay.portal.kernel.exception.PortalException,
622 com.liferay.portal.kernel.exception.SystemException {
623 return getService()
624 .updateFileEntry(userId, fileEntryId, sourceFileName,
625 mimeType, title, description, changeLog, majorVersion,
626 fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
627 }
628
629 public static void updateSmallImage(long smallImageId, long largeImageId)
630 throws com.liferay.portal.kernel.exception.PortalException,
631 com.liferay.portal.kernel.exception.SystemException {
632 getService().updateSmallImage(smallImageId, largeImageId);
633 }
634
635 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
636 long userId, long fileVersionId, int status,
637 java.util.Map<java.lang.String, java.io.Serializable> workflowContext,
638 com.liferay.portal.service.ServiceContext serviceContext)
639 throws com.liferay.portal.kernel.exception.PortalException,
640 com.liferay.portal.kernel.exception.SystemException {
641 return getService()
642 .updateStatus(userId, fileVersionId, status,
643 workflowContext, serviceContext);
644 }
645
646 public static boolean verifyFileEntryCheckOut(long fileEntryId,
647 java.lang.String lockUuid)
648 throws com.liferay.portal.kernel.exception.PortalException,
649 com.liferay.portal.kernel.exception.SystemException {
650 return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
651 }
652
653 public static boolean verifyFileEntryLock(long fileEntryId,
654 java.lang.String lockUuid)
655 throws com.liferay.portal.kernel.exception.PortalException,
656 com.liferay.portal.kernel.exception.SystemException {
657 return getService().verifyFileEntryLock(fileEntryId, lockUuid);
658 }
659
660 public static DLFileEntryLocalService getService() {
661 if (_service == null) {
662 _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
663
664 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
665 "_service");
666 MethodCache.remove(DLFileEntryLocalService.class);
667 }
668
669 return _service;
670 }
671
672 public void setService(DLFileEntryLocalService service) {
673 MethodCache.remove(DLFileEntryLocalService.class);
674
675 _service = service;
676
677 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
678 "_service");
679 MethodCache.remove(DLFileEntryLocalService.class);
680 }
681
682 private static DLFileEntryLocalService _service;
683 }