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 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
340 long userId, long fileEntryId)
341 throws com.liferay.portal.kernel.exception.PortalException,
342 com.liferay.portal.kernel.exception.SystemException {
343 return getService().checkOutFileEntry(userId, fileEntryId);
344 }
345
346 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
347 long userId, long fileEntryId, java.lang.String owner,
348 long expirationTime)
349 throws com.liferay.portal.kernel.exception.PortalException,
350 com.liferay.portal.kernel.exception.SystemException {
351 return getService()
352 .checkOutFileEntry(userId, fileEntryId, owner, expirationTime);
353 }
354
355 public static void convertExtraSettings(java.lang.String[] keys)
356 throws com.liferay.portal.kernel.exception.PortalException,
357 com.liferay.portal.kernel.exception.SystemException {
358 getService().convertExtraSettings(keys);
359 }
360
361 public static void copyFileEntryMetadata(long companyId,
362 long fileEntryTypeId, long fileEntryId, long fromFileVersionId,
363 long toFileVersionId,
364 com.liferay.portal.service.ServiceContext serviceContext)
365 throws com.liferay.portal.kernel.exception.PortalException,
366 com.liferay.portal.kernel.exception.SystemException {
367 getService()
368 .copyFileEntryMetadata(companyId, fileEntryTypeId, fileEntryId,
369 fromFileVersionId, toFileVersionId, serviceContext);
370 }
371
372 public static void deleteFileEntries(long groupId, long folderId)
373 throws com.liferay.portal.kernel.exception.PortalException,
374 com.liferay.portal.kernel.exception.SystemException {
375 getService().deleteFileEntries(groupId, folderId);
376 }
377
378 public static void deleteFileEntry(long fileEntryId)
379 throws com.liferay.portal.kernel.exception.PortalException,
380 com.liferay.portal.kernel.exception.SystemException {
381 getService().deleteFileEntry(fileEntryId);
382 }
383
384 public static void deleteFileEntry(long userId, long fileEntryId)
385 throws com.liferay.portal.kernel.exception.PortalException,
386 com.liferay.portal.kernel.exception.SystemException {
387 getService().deleteFileEntry(userId, fileEntryId);
388 }
389
390 public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByAnyImageId(
391 long imageId)
392 throws com.liferay.portal.kernel.exception.SystemException {
393 return getService().fetchFileEntryByAnyImageId(imageId);
394 }
395
396 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getExtraSettingsFileEntries(
397 int start, int end)
398 throws com.liferay.portal.kernel.exception.SystemException {
399 return getService().getExtraSettingsFileEntries(start, end);
400 }
401
402 public static java.io.File getFile(long userId, long fileEntryId,
403 java.lang.String version, boolean incrementCounter)
404 throws com.liferay.portal.kernel.exception.PortalException,
405 com.liferay.portal.kernel.exception.SystemException {
406 return getService()
407 .getFile(userId, fileEntryId, version, incrementCounter);
408 }
409
410 public static java.io.InputStream getFileAsStream(long userId,
411 long fileEntryId, java.lang.String version)
412 throws com.liferay.portal.kernel.exception.PortalException,
413 com.liferay.portal.kernel.exception.SystemException {
414 return getService().getFileAsStream(userId, fileEntryId, version);
415 }
416
417 public static java.io.InputStream getFileAsStream(long userId,
418 long fileEntryId, java.lang.String version, boolean incrementCounter)
419 throws com.liferay.portal.kernel.exception.PortalException,
420 com.liferay.portal.kernel.exception.SystemException {
421 return getService()
422 .getFileAsStream(userId, fileEntryId, version,
423 incrementCounter);
424 }
425
426 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
427 int start, int end)
428 throws com.liferay.portal.kernel.exception.SystemException {
429 return getService().getFileEntries(start, end);
430 }
431
432 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
433 long groupId, long folderId, int start, int end,
434 com.liferay.portal.kernel.util.OrderByComparator obc)
435 throws com.liferay.portal.kernel.exception.SystemException {
436 return getService().getFileEntries(groupId, folderId, start, end, obc);
437 }
438
439 public static int getFileEntriesCount()
440 throws com.liferay.portal.kernel.exception.SystemException {
441 return getService().getFileEntriesCount();
442 }
443
444 public static int getFileEntriesCount(long groupId, long folderId)
445 throws com.liferay.portal.kernel.exception.SystemException {
446 return getService().getFileEntriesCount(groupId, folderId);
447 }
448
449 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
450 long fileEntryId)
451 throws com.liferay.portal.kernel.exception.PortalException,
452 com.liferay.portal.kernel.exception.SystemException {
453 return getService().getFileEntry(fileEntryId);
454 }
455
456 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
457 long groupId, long folderId, java.lang.String title)
458 throws com.liferay.portal.kernel.exception.PortalException,
459 com.liferay.portal.kernel.exception.SystemException {
460 return getService().getFileEntry(groupId, folderId, title);
461 }
462
463 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByName(
464 long groupId, long folderId, java.lang.String name)
465 throws com.liferay.portal.kernel.exception.PortalException,
466 com.liferay.portal.kernel.exception.SystemException {
467 return getService().getFileEntryByName(groupId, folderId, name);
468 }
469
470 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
471 java.lang.String uuid, long groupId)
472 throws com.liferay.portal.kernel.exception.PortalException,
473 com.liferay.portal.kernel.exception.SystemException {
474 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
475 }
476
477 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
478 long groupId, int start, int end)
479 throws com.liferay.portal.kernel.exception.SystemException {
480 return getService().getGroupFileEntries(groupId, start, end);
481 }
482
483 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
484 long groupId, int start, int end,
485 com.liferay.portal.kernel.util.OrderByComparator obc)
486 throws com.liferay.portal.kernel.exception.SystemException {
487 return getService().getGroupFileEntries(groupId, start, end, obc);
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 throws com.liferay.portal.kernel.exception.SystemException {
493 return getService().getGroupFileEntries(groupId, userId, start, end);
494 }
495
496 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
497 long groupId, long userId, int start, int end,
498 com.liferay.portal.kernel.util.OrderByComparator obc)
499 throws com.liferay.portal.kernel.exception.SystemException {
500 return getService().getGroupFileEntries(groupId, userId, start, end, obc);
501 }
502
503 public static int getGroupFileEntriesCount(long groupId)
504 throws com.liferay.portal.kernel.exception.SystemException {
505 return getService().getGroupFileEntriesCount(groupId);
506 }
507
508 public static int getGroupFileEntriesCount(long groupId, long userId)
509 throws com.liferay.portal.kernel.exception.SystemException {
510 return getService().getGroupFileEntriesCount(groupId, userId);
511 }
512
513 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
514 throws com.liferay.portal.kernel.exception.SystemException {
515 return getService().getNoAssetFileEntries();
516 }
517
518 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getOrphanedFileEntries()
519 throws com.liferay.portal.kernel.exception.SystemException {
520 return getService().getOrphanedFileEntries();
521 }
522
523 public static boolean hasExtraSettings()
524 throws com.liferay.portal.kernel.exception.SystemException {
525 return getService().hasExtraSettings();
526 }
527
528 public static boolean hasFileEntryLock(long userId, long fileEntryId)
529 throws com.liferay.portal.kernel.exception.PortalException,
530 com.liferay.portal.kernel.exception.SystemException {
531 return getService().hasFileEntryLock(userId, fileEntryId);
532 }
533
534 public static boolean isFileEntryCheckedOut(long fileEntryId)
535 throws com.liferay.portal.kernel.exception.PortalException,
536 com.liferay.portal.kernel.exception.SystemException {
537 return getService().isFileEntryCheckedOut(fileEntryId);
538 }
539
540 public static com.liferay.portal.model.Lock lockFileEntry(long userId,
541 long fileEntryId)
542 throws com.liferay.portal.kernel.exception.PortalException,
543 com.liferay.portal.kernel.exception.SystemException {
544 return getService().lockFileEntry(userId, fileEntryId);
545 }
546
547 public static com.liferay.portal.model.Lock lockFileEntry(long userId,
548 long fileEntryId, java.lang.String owner, long expirationTime)
549 throws com.liferay.portal.kernel.exception.PortalException,
550 com.liferay.portal.kernel.exception.SystemException {
551 return getService()
552 .lockFileEntry(userId, fileEntryId, owner, expirationTime);
553 }
554
555 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
556 long userId, long fileEntryId, long newFolderId,
557 com.liferay.portal.service.ServiceContext serviceContext)
558 throws com.liferay.portal.kernel.exception.PortalException,
559 com.liferay.portal.kernel.exception.SystemException {
560 return getService()
561 .moveFileEntry(userId, fileEntryId, newFolderId,
562 serviceContext);
563 }
564
565 public static void revertFileEntry(long userId, long fileEntryId,
566 java.lang.String version,
567 com.liferay.portal.service.ServiceContext serviceContext)
568 throws com.liferay.portal.kernel.exception.PortalException,
569 com.liferay.portal.kernel.exception.SystemException {
570 getService()
571 .revertFileEntry(userId, fileEntryId, version, serviceContext);
572 }
573
574 public static void unlockFileEntry(long fileEntryId)
575 throws com.liferay.portal.kernel.exception.SystemException {
576 getService().unlockFileEntry(fileEntryId);
577 }
578
579 public static void unlockFileEntry(long fileEntryId,
580 java.lang.String lockUuid)
581 throws com.liferay.portal.kernel.exception.PortalException,
582 com.liferay.portal.kernel.exception.SystemException {
583 getService().unlockFileEntry(fileEntryId, lockUuid);
584 }
585
586 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
587 long userId, long fileEntryId, java.lang.String sourceFileName,
588 java.lang.String mimeType, java.lang.String title,
589 java.lang.String description, java.lang.String changeLog,
590 boolean majorVersion, long fileEntryTypeId,
591 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
592 java.io.File file, java.io.InputStream is, long size,
593 com.liferay.portal.service.ServiceContext serviceContext)
594 throws com.liferay.portal.kernel.exception.PortalException,
595 com.liferay.portal.kernel.exception.SystemException {
596 return getService()
597 .updateFileEntry(userId, fileEntryId, sourceFileName,
598 mimeType, title, description, changeLog, majorVersion,
599 fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
600 }
601
602 public static void updateSmallImage(long smallImageId, long largeImageId)
603 throws com.liferay.portal.kernel.exception.PortalException,
604 com.liferay.portal.kernel.exception.SystemException {
605 getService().updateSmallImage(smallImageId, largeImageId);
606 }
607
608 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
609 long userId, long fileVersionId, int status,
610 java.util.Map<java.lang.String, java.io.Serializable> workflowContext,
611 com.liferay.portal.service.ServiceContext serviceContext)
612 throws com.liferay.portal.kernel.exception.PortalException,
613 com.liferay.portal.kernel.exception.SystemException {
614 return getService()
615 .updateStatus(userId, fileVersionId, status,
616 workflowContext, serviceContext);
617 }
618
619 public static boolean verifyFileEntryCheckOut(long fileEntryId,
620 java.lang.String lockUuid)
621 throws com.liferay.portal.kernel.exception.PortalException,
622 com.liferay.portal.kernel.exception.SystemException {
623 return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
624 }
625
626 public static boolean verifyFileEntryLock(long fileEntryId,
627 java.lang.String lockUuid)
628 throws com.liferay.portal.kernel.exception.PortalException,
629 com.liferay.portal.kernel.exception.SystemException {
630 return getService().verifyFileEntryLock(fileEntryId, lockUuid);
631 }
632
633 public static DLFileEntryLocalService getService() {
634 if (_service == null) {
635 _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
636
637 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
638 "_service");
639 MethodCache.remove(DLFileEntryLocalService.class);
640 }
641
642 return _service;
643 }
644
645 public void setService(DLFileEntryLocalService service) {
646 MethodCache.remove(DLFileEntryLocalService.class);
647
648 _service = service;
649
650 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
651 "_service");
652 MethodCache.remove(DLFileEntryLocalService.class);
653 }
654
655 private static DLFileEntryLocalService _service;
656 }