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 folderId, java.lang.String name,
276 java.lang.String title, java.lang.String description,
277 java.lang.String changeLog, java.lang.String extraSettings,
278 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
279 throws com.liferay.portal.kernel.exception.PortalException,
280 com.liferay.portal.kernel.exception.SystemException {
281 return getService()
282 .addFileEntry(userId, groupId, folderId, name, title,
283 description, changeLog, extraSettings, bytes, serviceContext);
284 }
285
286 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
287 long userId, long groupId, long folderId, java.lang.String name,
288 java.lang.String title, java.lang.String description,
289 java.lang.String changeLog, java.lang.String extraSettings,
290 java.io.File file,
291 com.liferay.portal.service.ServiceContext serviceContext)
292 throws com.liferay.portal.kernel.exception.PortalException,
293 com.liferay.portal.kernel.exception.SystemException {
294 return getService()
295 .addFileEntry(userId, groupId, folderId, name, title,
296 description, changeLog, extraSettings, file, serviceContext);
297 }
298
299 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
300 long userId, long groupId, long folderId, java.lang.String name,
301 java.lang.String title, java.lang.String description,
302 java.lang.String changeLog, java.lang.String extraSettings,
303 java.io.InputStream is, long size,
304 com.liferay.portal.service.ServiceContext serviceContext)
305 throws com.liferay.portal.kernel.exception.PortalException,
306 com.liferay.portal.kernel.exception.SystemException {
307 return getService()
308 .addFileEntry(userId, groupId, folderId, name, title,
309 description, changeLog, extraSettings, is, size, serviceContext);
310 }
311
312 public static void addFileEntryResources(
313 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
314 boolean addCommunityPermissions, boolean addGuestPermissions)
315 throws com.liferay.portal.kernel.exception.PortalException,
316 com.liferay.portal.kernel.exception.SystemException {
317 getService()
318 .addFileEntryResources(fileEntry, addCommunityPermissions,
319 addGuestPermissions);
320 }
321
322 public static void addFileEntryResources(
323 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
324 java.lang.String[] communityPermissions,
325 java.lang.String[] guestPermissions)
326 throws com.liferay.portal.kernel.exception.PortalException,
327 com.liferay.portal.kernel.exception.SystemException {
328 getService()
329 .addFileEntryResources(fileEntry, communityPermissions,
330 guestPermissions);
331 }
332
333 public static void addFileEntryResources(long fileEntryId,
334 boolean addCommunityPermissions, boolean addGuestPermissions)
335 throws com.liferay.portal.kernel.exception.PortalException,
336 com.liferay.portal.kernel.exception.SystemException {
337 getService()
338 .addFileEntryResources(fileEntryId, addCommunityPermissions,
339 addGuestPermissions);
340 }
341
342 public static void addFileEntryResources(long fileEntryId,
343 java.lang.String[] communityPermissions,
344 java.lang.String[] guestPermissions)
345 throws com.liferay.portal.kernel.exception.PortalException,
346 com.liferay.portal.kernel.exception.SystemException {
347 getService()
348 .addFileEntryResources(fileEntryId, communityPermissions,
349 guestPermissions);
350 }
351
352 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
353 long userId, long groupId, long folderId, java.lang.String name,
354 java.lang.String sourceName, java.lang.String title,
355 java.lang.String description, java.lang.String changeLog,
356 java.lang.String extraSettings, java.io.File file,
357 com.liferay.portal.service.ServiceContext serviceContext)
358 throws com.liferay.portal.kernel.exception.PortalException,
359 com.liferay.portal.kernel.exception.SystemException {
360 return getService()
361 .addOrOverwriteFileEntry(userId, groupId, folderId, name,
362 sourceName, title, description, changeLog, extraSettings, file,
363 serviceContext);
364 }
365
366 public static void convertExtraSettings(java.lang.String[] keys)
367 throws com.liferay.portal.kernel.exception.PortalException,
368 com.liferay.portal.kernel.exception.SystemException {
369 getService().convertExtraSettings(keys);
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(
379 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
380 throws com.liferay.portal.kernel.exception.PortalException,
381 com.liferay.portal.kernel.exception.SystemException {
382 getService().deleteFileEntry(fileEntry);
383 }
384
385 public static void deleteFileEntry(long groupId, long folderId,
386 java.lang.String name)
387 throws com.liferay.portal.kernel.exception.PortalException,
388 com.liferay.portal.kernel.exception.SystemException {
389 getService().deleteFileEntry(groupId, folderId, name);
390 }
391
392 public static void deleteFileEntry(long groupId, long folderId,
393 java.lang.String name, java.lang.String version)
394 throws com.liferay.portal.kernel.exception.PortalException,
395 com.liferay.portal.kernel.exception.SystemException {
396 getService().deleteFileEntry(groupId, folderId, name, version);
397 }
398
399 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
400 long companyId, int start, int end)
401 throws com.liferay.portal.kernel.exception.SystemException {
402 return getService().getCompanyFileEntries(companyId, start, end);
403 }
404
405 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
406 long companyId, int start, int end,
407 com.liferay.portal.kernel.util.OrderByComparator obc)
408 throws com.liferay.portal.kernel.exception.SystemException {
409 return getService().getCompanyFileEntries(companyId, start, end, obc);
410 }
411
412 public static int getCompanyFileEntriesCount(long companyId)
413 throws com.liferay.portal.kernel.exception.SystemException {
414 return getService().getCompanyFileEntriesCount(companyId);
415 }
416
417 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getExtraSettingsFileEntries(
418 int start, int end)
419 throws com.liferay.portal.kernel.exception.SystemException {
420 return getService().getExtraSettingsFileEntries(start, end);
421 }
422
423 public static java.io.InputStream getFileAsStream(long companyId,
424 long userId, long groupId, long folderId, java.lang.String name)
425 throws com.liferay.portal.kernel.exception.PortalException,
426 com.liferay.portal.kernel.exception.SystemException {
427 return getService()
428 .getFileAsStream(companyId, userId, groupId, folderId, name);
429 }
430
431 public static java.io.InputStream getFileAsStream(long companyId,
432 long userId, long groupId, long folderId, java.lang.String name,
433 java.lang.String version)
434 throws com.liferay.portal.kernel.exception.PortalException,
435 com.liferay.portal.kernel.exception.SystemException {
436 return getService()
437 .getFileAsStream(companyId, userId, groupId, folderId, name,
438 version);
439 }
440
441 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
442 long groupId, long folderId)
443 throws com.liferay.portal.kernel.exception.SystemException {
444 return getService().getFileEntries(groupId, folderId);
445 }
446
447 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
448 long groupId, long folderId, int start, int end)
449 throws com.liferay.portal.kernel.exception.SystemException {
450 return getService().getFileEntries(groupId, folderId, start, end);
451 }
452
453 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
454 long groupId, long folderId, int start, int end,
455 com.liferay.portal.kernel.util.OrderByComparator obc)
456 throws com.liferay.portal.kernel.exception.SystemException {
457 return getService().getFileEntries(groupId, folderId, start, end, obc);
458 }
459
460 public static int getFileEntriesCount(long groupId, long folderId)
461 throws com.liferay.portal.kernel.exception.SystemException {
462 return getService().getFileEntriesCount(groupId, folderId);
463 }
464
465 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
466 long fileEntryId)
467 throws com.liferay.portal.kernel.exception.PortalException,
468 com.liferay.portal.kernel.exception.SystemException {
469 return getService().getFileEntry(fileEntryId);
470 }
471
472 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
473 long groupId, long folderId, java.lang.String name)
474 throws com.liferay.portal.kernel.exception.PortalException,
475 com.liferay.portal.kernel.exception.SystemException {
476 return getService().getFileEntry(groupId, folderId, name);
477 }
478
479 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
480 long groupId, long folderId, java.lang.String title)
481 throws com.liferay.portal.kernel.exception.PortalException,
482 com.liferay.portal.kernel.exception.SystemException {
483 return getService().getFileEntryByTitle(groupId, folderId, title);
484 }
485
486 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
487 java.lang.String uuid, long groupId)
488 throws com.liferay.portal.kernel.exception.PortalException,
489 com.liferay.portal.kernel.exception.SystemException {
490 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
491 }
492
493 public static int getFoldersFileEntriesCount(long groupId,
494 java.util.List<java.lang.Long> folderIds, int status)
495 throws com.liferay.portal.kernel.exception.SystemException {
496 return getService()
497 .getFoldersFileEntriesCount(groupId, folderIds, status);
498 }
499
500 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
501 long groupId, int start, int end)
502 throws com.liferay.portal.kernel.exception.SystemException {
503 return getService().getGroupFileEntries(groupId, start, end);
504 }
505
506 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
507 long groupId, int start, int end,
508 com.liferay.portal.kernel.util.OrderByComparator obc)
509 throws com.liferay.portal.kernel.exception.SystemException {
510 return getService().getGroupFileEntries(groupId, start, end, obc);
511 }
512
513 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
514 long groupId, long userId, int start, int end)
515 throws com.liferay.portal.kernel.exception.SystemException {
516 return getService().getGroupFileEntries(groupId, userId, start, end);
517 }
518
519 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
520 long groupId, long userId, int start, int end,
521 com.liferay.portal.kernel.util.OrderByComparator obc)
522 throws com.liferay.portal.kernel.exception.SystemException {
523 return getService().getGroupFileEntries(groupId, userId, start, end, obc);
524 }
525
526 public static int getGroupFileEntriesCount(long groupId)
527 throws com.liferay.portal.kernel.exception.SystemException {
528 return getService().getGroupFileEntriesCount(groupId);
529 }
530
531 public static int getGroupFileEntriesCount(long groupId, long userId)
532 throws com.liferay.portal.kernel.exception.SystemException {
533 return getService().getGroupFileEntriesCount(groupId, userId);
534 }
535
536 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
537 throws com.liferay.portal.kernel.exception.SystemException {
538 return getService().getNoAssetFileEntries();
539 }
540
541 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getOrphanedFileEntries()
542 throws com.liferay.portal.kernel.exception.SystemException {
543 return getService().getOrphanedFileEntries();
544 }
545
546 public static boolean hasExtraSettings()
547 throws com.liferay.portal.kernel.exception.SystemException {
548 return getService().hasExtraSettings();
549 }
550
551 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
552 long userId, long groupId, long folderId, long newFolderId,
553 java.lang.String name,
554 com.liferay.portal.service.ServiceContext serviceContext)
555 throws com.liferay.portal.kernel.exception.PortalException,
556 com.liferay.portal.kernel.exception.SystemException {
557 return getService()
558 .moveFileEntry(userId, groupId, folderId, newFolderId, name,
559 serviceContext);
560 }
561
562 public static void updateAsset(long userId,
563 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
564 com.liferay.portlet.documentlibrary.model.DLFileVersion fileVersion,
565 long[] assetCategoryIds, java.lang.String[] assetTagNames)
566 throws com.liferay.portal.kernel.exception.PortalException,
567 com.liferay.portal.kernel.exception.SystemException {
568 getService()
569 .updateAsset(userId, fileEntry, fileVersion, assetCategoryIds,
570 assetTagNames);
571 }
572
573 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
574 long userId, long groupId, long folderId, java.lang.String name,
575 java.lang.String sourceFileName, java.lang.String title,
576 java.lang.String description, java.lang.String changeLog,
577 boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
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 .updateFileEntry(userId, groupId, folderId, name,
583 sourceFileName, title, description, changeLog, majorVersion,
584 extraSettings, bytes, serviceContext);
585 }
586
587 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
588 long userId, long groupId, long folderId, java.lang.String name,
589 java.lang.String sourceFileName, java.lang.String title,
590 java.lang.String description, java.lang.String changeLog,
591 boolean majorVersion, java.lang.String extraSettings,
592 java.io.File file,
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, groupId, folderId, name,
598 sourceFileName, title, description, changeLog, majorVersion,
599 extraSettings, file, serviceContext);
600 }
601
602 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
603 long userId, long groupId, long folderId, java.lang.String name,
604 java.lang.String sourceFileName, java.lang.String title,
605 java.lang.String description, java.lang.String changeLog,
606 boolean majorVersion, java.lang.String extraSettings,
607 java.io.InputStream is, long size,
608 com.liferay.portal.service.ServiceContext serviceContext)
609 throws com.liferay.portal.kernel.exception.PortalException,
610 com.liferay.portal.kernel.exception.SystemException {
611 return getService()
612 .updateFileEntry(userId, groupId, folderId, name,
613 sourceFileName, title, description, changeLog, majorVersion,
614 extraSettings, is, size, serviceContext);
615 }
616
617 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
618 long userId, long fileVersionId, int status,
619 com.liferay.portal.service.ServiceContext serviceContext)
620 throws com.liferay.portal.kernel.exception.PortalException,
621 com.liferay.portal.kernel.exception.SystemException {
622 return getService()
623 .updateStatus(userId, fileVersionId, status, serviceContext);
624 }
625
626 public static DLFileEntryLocalService getService() {
627 if (_service == null) {
628 _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
629
630 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
631 "_service");
632 MethodCache.remove(DLFileEntryLocalService.class);
633 }
634
635 return _service;
636 }
637
638 public void setService(DLFileEntryLocalService service) {
639 MethodCache.remove(DLFileEntryLocalService.class);
640
641 _service = service;
642
643 ReferenceRegistry.registerReference(DLFileEntryLocalServiceUtil.class,
644 "_service");
645 MethodCache.remove(DLFileEntryLocalService.class);
646 }
647
648 private static DLFileEntryLocalService _service;
649 }