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 DLFileEntryLocalServiceUtil {
034
039
040
047 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
048 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
049 throws com.liferay.portal.kernel.exception.SystemException {
050 return getService().addDLFileEntry(dlFileEntry);
051 }
052
053
059 public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
060 long fileEntryId) {
061 return getService().createDLFileEntry(fileEntryId);
062 }
063
064
072 public static com.liferay.portlet.documentlibrary.model.DLFileEntry deleteDLFileEntry(
073 long fileEntryId)
074 throws com.liferay.portal.kernel.exception.PortalException,
075 com.liferay.portal.kernel.exception.SystemException {
076 return getService().deleteDLFileEntry(fileEntryId);
077 }
078
079
086 public static com.liferay.portlet.documentlibrary.model.DLFileEntry deleteDLFileEntry(
087 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
088 throws com.liferay.portal.kernel.exception.SystemException {
089 return getService().deleteDLFileEntry(dlFileEntry);
090 }
091
092 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
093 return getService().dynamicQuery();
094 }
095
096
103 @SuppressWarnings("rawtypes")
104 public static java.util.List dynamicQuery(
105 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
106 throws com.liferay.portal.kernel.exception.SystemException {
107 return getService().dynamicQuery(dynamicQuery);
108 }
109
110
123 @SuppressWarnings("rawtypes")
124 public static java.util.List dynamicQuery(
125 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126 int end) throws com.liferay.portal.kernel.exception.SystemException {
127 return getService().dynamicQuery(dynamicQuery, start, end);
128 }
129
130
144 @SuppressWarnings("rawtypes")
145 public static java.util.List dynamicQuery(
146 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147 int end,
148 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149 throws com.liferay.portal.kernel.exception.SystemException {
150 return getService()
151 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
152 }
153
154
161 public static long dynamicQueryCount(
162 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getService().dynamicQueryCount(dynamicQuery);
165 }
166
167 public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchDLFileEntry(
168 long fileEntryId)
169 throws com.liferay.portal.kernel.exception.SystemException {
170 return getService().fetchDLFileEntry(fileEntryId);
171 }
172
173
181 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
182 long fileEntryId)
183 throws com.liferay.portal.kernel.exception.PortalException,
184 com.liferay.portal.kernel.exception.SystemException {
185 return getService().getDLFileEntry(fileEntryId);
186 }
187
188 public static com.liferay.portal.model.PersistedModel getPersistedModel(
189 java.io.Serializable primaryKeyObj)
190 throws com.liferay.portal.kernel.exception.PortalException,
191 com.liferay.portal.kernel.exception.SystemException {
192 return getService().getPersistedModel(primaryKeyObj);
193 }
194
195
204 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntryByUuidAndGroupId(
205 java.lang.String uuid, long groupId)
206 throws com.liferay.portal.kernel.exception.PortalException,
207 com.liferay.portal.kernel.exception.SystemException {
208 return getService().getDLFileEntryByUuidAndGroupId(uuid, groupId);
209 }
210
211
223 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
224 int start, int end)
225 throws com.liferay.portal.kernel.exception.SystemException {
226 return getService().getDLFileEntries(start, end);
227 }
228
229
235 public static int getDLFileEntriesCount()
236 throws com.liferay.portal.kernel.exception.SystemException {
237 return getService().getDLFileEntriesCount();
238 }
239
240
247 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
248 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
249 throws com.liferay.portal.kernel.exception.SystemException {
250 return getService().updateDLFileEntry(dlFileEntry);
251 }
252
253
261 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
262 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
263 boolean merge)
264 throws com.liferay.portal.kernel.exception.SystemException {
265 return getService().updateDLFileEntry(dlFileEntry, merge);
266 }
267
268
273 public static java.lang.String getBeanIdentifier() {
274 return getService().getBeanIdentifier();
275 }
276
277
282 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
283 getService().setBeanIdentifier(beanIdentifier);
284 }
285
286 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
287 long userId, long groupId, long repositoryId, long folderId,
288 java.lang.String sourceFileName, java.lang.String mimeType,
289 java.lang.String title, java.lang.String description,
290 java.lang.String changeLog, long fileEntryTypeId,
291 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
292 java.io.File file, java.io.InputStream is, long size,
293 com.liferay.portal.service.ServiceContext serviceContext)
294 throws com.liferay.portal.kernel.exception.PortalException,
295 com.liferay.portal.kernel.exception.SystemException {
296 return getService()
297 .addFileEntry(userId, groupId, repositoryId, folderId,
298 sourceFileName, mimeType, title, description, changeLog,
299 fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
300 }
301
302 public static void addFileEntryResources(
303 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
304 boolean addGroupPermissions, boolean addGuestPermissions)
305 throws com.liferay.portal.kernel.exception.PortalException,
306 com.liferay.portal.kernel.exception.SystemException {
307 getService()
308 .addFileEntryResources(dlFileEntry, addGroupPermissions,
309 addGuestPermissions);
310 }
311
312 public static void addFileEntryResources(
313 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
314 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
315 throws com.liferay.portal.kernel.exception.PortalException,
316 com.liferay.portal.kernel.exception.SystemException {
317 getService()
318 .addFileEntryResources(dlFileEntry, groupPermissions,
319 guestPermissions);
320 }
321
322 public static com.liferay.portlet.documentlibrary.model.DLFileVersion cancelCheckOut(
323 long userId, long fileEntryId)
324 throws com.liferay.portal.kernel.exception.PortalException,
325 com.liferay.portal.kernel.exception.SystemException {
326 return getService().cancelCheckOut(userId, fileEntryId);
327 }
328
329 public static void checkInFileEntry(long userId, long fileEntryId,
330 boolean majorVersion, java.lang.String changeLog,
331 com.liferay.portal.service.ServiceContext serviceContext)
332 throws com.liferay.portal.kernel.exception.PortalException,
333 com.liferay.portal.kernel.exception.SystemException {
334 getService()
335 .checkInFileEntry(userId, fileEntryId, majorVersion, changeLog,
336 serviceContext);
337 }
338
339 public static void checkInFileEntry(long userId, long fileEntryId,
340 java.lang.String lockUuid)
341 throws com.liferay.portal.kernel.exception.PortalException,
342 com.liferay.portal.kernel.exception.SystemException {
343 getService().checkInFileEntry(userId, fileEntryId, lockUuid);
344 }
345
346
349 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
350 long userId, long fileEntryId)
351 throws com.liferay.portal.kernel.exception.PortalException,
352 com.liferay.portal.kernel.exception.SystemException {
353 return getService().checkOutFileEntry(userId, fileEntryId);
354 }
355
356 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
357 long userId, long fileEntryId,
358 com.liferay.portal.service.ServiceContext serviceContext)
359 throws com.liferay.portal.kernel.exception.PortalException,
360 com.liferay.portal.kernel.exception.SystemException {
361 return getService()
362 .checkOutFileEntry(userId, fileEntryId, serviceContext);
363 }
364
365
369 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
370 long userId, long fileEntryId, java.lang.String owner,
371 long expirationTime)
372 throws com.liferay.portal.kernel.exception.PortalException,
373 com.liferay.portal.kernel.exception.SystemException {
374 return getService()
375 .checkOutFileEntry(userId, fileEntryId, owner, expirationTime);
376 }
377
378 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
379 long userId, long fileEntryId, java.lang.String owner,
380 long expirationTime,
381 com.liferay.portal.service.ServiceContext serviceContext)
382 throws com.liferay.portal.kernel.exception.PortalException,
383 com.liferay.portal.kernel.exception.SystemException {
384 return getService()
385 .checkOutFileEntry(userId, fileEntryId, owner,
386 expirationTime, serviceContext);
387 }
388
389 public static void convertExtraSettings(java.lang.String[] keys)
390 throws com.liferay.portal.kernel.exception.PortalException,
391 com.liferay.portal.kernel.exception.SystemException {
392 getService().convertExtraSettings(keys);
393 }
394
395 public static void copyFileEntryMetadata(long companyId,
396 long fileEntryTypeId, long fileEntryId, long fromFileVersionId,
397 long toFileVersionId,
398 com.liferay.portal.service.ServiceContext serviceContext)
399 throws com.liferay.portal.kernel.exception.PortalException,
400 com.liferay.portal.kernel.exception.SystemException {
401 getService()
402 .copyFileEntryMetadata(companyId, fileEntryTypeId, fileEntryId,
403 fromFileVersionId, toFileVersionId, serviceContext);
404 }
405
406 public static void deleteFileEntries(long groupId, long folderId)
407 throws com.liferay.portal.kernel.exception.PortalException,
408 com.liferay.portal.kernel.exception.SystemException {
409 getService().deleteFileEntries(groupId, folderId);
410 }
411
412 public static void deleteFileEntry(long fileEntryId)
413 throws com.liferay.portal.kernel.exception.PortalException,
414 com.liferay.portal.kernel.exception.SystemException {
415 getService().deleteFileEntry(fileEntryId);
416 }
417
418 public static void deleteFileEntry(long userId, long fileEntryId)
419 throws com.liferay.portal.kernel.exception.PortalException,
420 com.liferay.portal.kernel.exception.SystemException {
421 getService().deleteFileEntry(userId, fileEntryId);
422 }
423
424 public static void deleteFileVersion(long userId, long fileEntryId,
425 java.lang.String version)
426 throws com.liferay.portal.kernel.exception.PortalException,
427 com.liferay.portal.kernel.exception.SystemException {
428 getService().deleteFileVersion(userId, fileEntryId, version);
429 }
430
431 public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByAnyImageId(
432 long imageId)
433 throws com.liferay.portal.kernel.exception.SystemException {
434 return getService().fetchFileEntryByAnyImageId(imageId);
435 }
436
437 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getExtraSettingsFileEntries(
438 int start, int end)
439 throws com.liferay.portal.kernel.exception.SystemException {
440 return getService().getExtraSettingsFileEntries(start, end);
441 }
442
443 public static java.io.File getFile(long userId, long fileEntryId,
444 java.lang.String version, boolean incrementCounter)
445 throws com.liferay.portal.kernel.exception.PortalException,
446 com.liferay.portal.kernel.exception.SystemException {
447 return getService()
448 .getFile(userId, fileEntryId, version, incrementCounter);
449 }
450
451 public static java.io.InputStream getFileAsStream(long userId,
452 long fileEntryId, java.lang.String version)
453 throws com.liferay.portal.kernel.exception.PortalException,
454 com.liferay.portal.kernel.exception.SystemException {
455 return getService().getFileAsStream(userId, fileEntryId, version);
456 }
457
458 public static java.io.InputStream getFileAsStream(long userId,
459 long fileEntryId, java.lang.String version, boolean incrementCounter)
460 throws com.liferay.portal.kernel.exception.PortalException,
461 com.liferay.portal.kernel.exception.SystemException {
462 return getService()
463 .getFileAsStream(userId, fileEntryId, version,
464 incrementCounter);
465 }
466
467 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
468 int start, int end)
469 throws com.liferay.portal.kernel.exception.SystemException {
470 return getService().getFileEntries(start, end);
471 }
472
473 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
474 long groupId, long folderId, int start, int end,
475 com.liferay.portal.kernel.util.OrderByComparator obc)
476 throws com.liferay.portal.kernel.exception.SystemException {
477 return getService().getFileEntries(groupId, folderId, start, end, obc);
478 }
479
480 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntriesByMimeType(
481 java.lang.String mimeType)
482 throws com.liferay.portal.kernel.exception.SystemException {
483 return getService().getFileEntriesByMimeType(mimeType);
484 }
485
486 public static int getFileEntriesCount()
487 throws com.liferay.portal.kernel.exception.SystemException {
488 return getService().getFileEntriesCount();
489 }
490
491 public static int getFileEntriesCount(long groupId, long folderId)
492 throws com.liferay.portal.kernel.exception.SystemException {
493 return getService().getFileEntriesCount(groupId, folderId);
494 }
495
496 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
497 long fileEntryId)
498 throws com.liferay.portal.kernel.exception.PortalException,
499 com.liferay.portal.kernel.exception.SystemException {
500 return getService().getFileEntry(fileEntryId);
501 }
502
503 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
504 long groupId, long folderId, java.lang.String title)
505 throws com.liferay.portal.kernel.exception.PortalException,
506 com.liferay.portal.kernel.exception.SystemException {
507 return getService().getFileEntry(groupId, folderId, title);
508 }
509
510 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByName(
511 long groupId, long folderId, java.lang.String name)
512 throws com.liferay.portal.kernel.exception.PortalException,
513 com.liferay.portal.kernel.exception.SystemException {
514 return getService().getFileEntryByName(groupId, folderId, name);
515 }
516
517 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
518 java.lang.String uuid, long groupId)
519 throws com.liferay.portal.kernel.exception.PortalException,
520 com.liferay.portal.kernel.exception.SystemException {
521 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
522 }
523
524 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
525 long groupId, int start, int end)
526 throws com.liferay.portal.kernel.exception.SystemException {
527 return getService().getGroupFileEntries(groupId, start, end);
528 }
529
530 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
531 long groupId, int start, int end,
532 com.liferay.portal.kernel.util.OrderByComparator obc)
533 throws com.liferay.portal.kernel.exception.SystemException {
534 return getService().getGroupFileEntries(groupId, start, end, obc);
535 }
536
537 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
538 long groupId, long userId, int start, int end)
539 throws com.liferay.portal.kernel.exception.SystemException {
540 return getService().getGroupFileEntries(groupId, userId, start, end);
541 }
542
543 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
544 long groupId, long userId, int start, int end,
545 com.liferay.portal.kernel.util.OrderByComparator obc)
546 throws com.liferay.portal.kernel.exception.SystemException {
547 return getService().getGroupFileEntries(groupId, userId, start, end, obc);
548 }
549
550 public static int getGroupFileEntriesCount(long groupId)
551 throws com.liferay.portal.kernel.exception.SystemException {
552 return getService().getGroupFileEntriesCount(groupId);
553 }
554
555 public static int getGroupFileEntriesCount(long groupId, long userId)
556 throws com.liferay.portal.kernel.exception.SystemException {
557 return getService().getGroupFileEntriesCount(groupId, userId);
558 }
559
560 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getMisversionedFileEntries()
561 throws com.liferay.portal.kernel.exception.SystemException {
562 return getService().getMisversionedFileEntries();
563 }
564
565 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
566 throws com.liferay.portal.kernel.exception.SystemException {
567 return getService().getNoAssetFileEntries();
568 }
569
570 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getOrphanedFileEntries()
571 throws com.liferay.portal.kernel.exception.SystemException {
572 return getService().getOrphanedFileEntries();
573 }
574
575 public static boolean hasExtraSettings()
576 throws com.liferay.portal.kernel.exception.SystemException {
577 return getService().hasExtraSettings();
578 }
579
580 public static boolean hasFileEntryLock(long userId, long fileEntryId)
581 throws com.liferay.portal.kernel.exception.PortalException,
582 com.liferay.portal.kernel.exception.SystemException {
583 return getService().hasFileEntryLock(userId, fileEntryId);
584 }
585
586 public static boolean isFileEntryCheckedOut(long fileEntryId)
587 throws com.liferay.portal.kernel.exception.PortalException,
588 com.liferay.portal.kernel.exception.SystemException {
589 return getService().isFileEntryCheckedOut(fileEntryId);
590 }
591
592 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
593 long userId, long fileEntryId, long newFolderId,
594 com.liferay.portal.service.ServiceContext serviceContext)
595 throws com.liferay.portal.kernel.exception.PortalException,
596 com.liferay.portal.kernel.exception.SystemException {
597 return getService()
598 .moveFileEntry(userId, fileEntryId, newFolderId,
599 serviceContext);
600 }
601
602 public static void revertFileEntry(long userId, long fileEntryId,
603 java.lang.String version,
604 com.liferay.portal.service.ServiceContext serviceContext)
605 throws com.liferay.portal.kernel.exception.PortalException,
606 com.liferay.portal.kernel.exception.SystemException {
607 getService()
608 .revertFileEntry(userId, fileEntryId, version, serviceContext);
609 }
610
611 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
612 long userId, long fileEntryId, java.lang.String sourceFileName,
613 java.lang.String mimeType, java.lang.String title,
614 java.lang.String description, java.lang.String changeLog,
615 boolean majorVersion, long fileEntryTypeId,
616 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
617 java.io.File file, java.io.InputStream is, long size,
618 com.liferay.portal.service.ServiceContext serviceContext)
619 throws com.liferay.portal.kernel.exception.PortalException,
620 com.liferay.portal.kernel.exception.SystemException {
621 return getService()
622 .updateFileEntry(userId, fileEntryId, sourceFileName,
623 mimeType, title, description, changeLog, majorVersion,
624 fileEntryTypeId, fieldsMap, file, is, size, serviceContext);
625 }
626
627 public static void updateSmallImage(long smallImageId, long largeImageId)
628 throws com.liferay.portal.kernel.exception.PortalException,
629 com.liferay.portal.kernel.exception.SystemException {
630 getService().updateSmallImage(smallImageId, largeImageId);
631 }
632
633 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
634 long userId, long fileVersionId, int status,
635 java.util.Map<java.lang.String, java.io.Serializable> workflowContext,
636 com.liferay.portal.service.ServiceContext serviceContext)
637 throws com.liferay.portal.kernel.exception.PortalException,
638 com.liferay.portal.kernel.exception.SystemException {
639 return getService()
640 .updateStatus(userId, fileVersionId, status,
641 workflowContext, serviceContext);
642 }
643
644 public static boolean verifyFileEntryCheckOut(long fileEntryId,
645 java.lang.String lockUuid)
646 throws com.liferay.portal.kernel.exception.PortalException,
647 com.liferay.portal.kernel.exception.SystemException {
648 return getService().verifyFileEntryCheckOut(fileEntryId, lockUuid);
649 }
650
651 public static boolean verifyFileEntryLock(long fileEntryId,
652 java.lang.String lockUuid)
653 throws com.liferay.portal.kernel.exception.PortalException,
654 com.liferay.portal.kernel.exception.SystemException {
655 return getService().verifyFileEntryLock(fileEntryId, lockUuid);
656 }
657
658 public static DLFileEntryLocalService getService() {
659 if (_service == null) {
660 _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
661
662 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
663 "_service");
664 }
665
666 return _service;
667 }
668
669
672 public void setService(DLFileEntryLocalService service) {
673 }
674
675 private static DLFileEntryLocalService _service;
676 }