001
014
015 package com.liferay.portlet.documentlibrary.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
036 public class DLFileEntryLocalServiceUtil {
037
044 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
045 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
046 throws com.liferay.portal.kernel.exception.SystemException {
047 return getService().addDLFileEntry(dlFileEntry);
048 }
049
050
056 public static com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
057 long fileEntryId) {
058 return getService().createDLFileEntry(fileEntryId);
059 }
060
061
068 public static void deleteDLFileEntry(long fileEntryId)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException {
071 getService().deleteDLFileEntry(fileEntryId);
072 }
073
074
080 public static void deleteDLFileEntry(
081 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 getService().deleteDLFileEntry(dlFileEntry);
084 }
085
086
093 @SuppressWarnings("rawtypes")
094 public static java.util.List dynamicQuery(
095 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
096 throws com.liferay.portal.kernel.exception.SystemException {
097 return getService().dynamicQuery(dynamicQuery);
098 }
099
100
113 @SuppressWarnings("rawtypes")
114 public static java.util.List dynamicQuery(
115 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
116 int end) throws com.liferay.portal.kernel.exception.SystemException {
117 return getService().dynamicQuery(dynamicQuery, start, end);
118 }
119
120
134 @SuppressWarnings("rawtypes")
135 public static java.util.List dynamicQuery(
136 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
137 int end,
138 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139 throws com.liferay.portal.kernel.exception.SystemException {
140 return getService()
141 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
142 }
143
144
151 public static long dynamicQueryCount(
152 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
153 throws com.liferay.portal.kernel.exception.SystemException {
154 return getService().dynamicQueryCount(dynamicQuery);
155 }
156
157
165 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
166 long fileEntryId)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 return getService().getDLFileEntry(fileEntryId);
170 }
171
172
181 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntryByUuidAndGroupId(
182 java.lang.String uuid, long groupId)
183 throws com.liferay.portal.kernel.exception.PortalException,
184 com.liferay.portal.kernel.exception.SystemException {
185 return getService().getDLFileEntryByUuidAndGroupId(uuid, groupId);
186 }
187
188
200 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
201 int start, int end)
202 throws com.liferay.portal.kernel.exception.SystemException {
203 return getService().getDLFileEntries(start, end);
204 }
205
206
212 public static int getDLFileEntriesCount()
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().getDLFileEntriesCount();
215 }
216
217
224 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
225 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return getService().updateDLFileEntry(dlFileEntry);
228 }
229
230
238 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
239 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
240 boolean merge)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 return getService().updateDLFileEntry(dlFileEntry, merge);
243 }
244
245 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
246 long userId, long groupId, long folderId, java.lang.String name,
247 java.lang.String title, java.lang.String description,
248 java.lang.String changeLog, java.lang.String extraSettings,
249 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
250 throws com.liferay.portal.kernel.exception.PortalException,
251 com.liferay.portal.kernel.exception.SystemException {
252 return getService()
253 .addFileEntry(userId, groupId, folderId, name, title,
254 description, changeLog, extraSettings, bytes, serviceContext);
255 }
256
257 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
258 long userId, long groupId, long folderId, java.lang.String name,
259 java.lang.String title, java.lang.String description,
260 java.lang.String changeLog, java.lang.String extraSettings,
261 java.io.File file,
262 com.liferay.portal.service.ServiceContext serviceContext)
263 throws com.liferay.portal.kernel.exception.PortalException,
264 com.liferay.portal.kernel.exception.SystemException {
265 return getService()
266 .addFileEntry(userId, groupId, folderId, name, title,
267 description, changeLog, extraSettings, file, serviceContext);
268 }
269
270 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
271 long userId, long groupId, long folderId, java.lang.String name,
272 java.lang.String title, java.lang.String description,
273 java.lang.String changeLog, java.lang.String extraSettings,
274 java.io.InputStream is, long size,
275 com.liferay.portal.service.ServiceContext serviceContext)
276 throws com.liferay.portal.kernel.exception.PortalException,
277 com.liferay.portal.kernel.exception.SystemException {
278 return getService()
279 .addFileEntry(userId, groupId, folderId, name, title,
280 description, changeLog, extraSettings, is, size, serviceContext);
281 }
282
283 public static void addFileEntryResources(
284 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
285 boolean addCommunityPermissions, boolean addGuestPermissions)
286 throws com.liferay.portal.kernel.exception.PortalException,
287 com.liferay.portal.kernel.exception.SystemException {
288 getService()
289 .addFileEntryResources(fileEntry, addCommunityPermissions,
290 addGuestPermissions);
291 }
292
293 public static void addFileEntryResources(
294 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
295 java.lang.String[] communityPermissions,
296 java.lang.String[] guestPermissions)
297 throws com.liferay.portal.kernel.exception.PortalException,
298 com.liferay.portal.kernel.exception.SystemException {
299 getService()
300 .addFileEntryResources(fileEntry, communityPermissions,
301 guestPermissions);
302 }
303
304 public static void addFileEntryResources(long fileEntryId,
305 boolean addCommunityPermissions, boolean addGuestPermissions)
306 throws com.liferay.portal.kernel.exception.PortalException,
307 com.liferay.portal.kernel.exception.SystemException {
308 getService()
309 .addFileEntryResources(fileEntryId, addCommunityPermissions,
310 addGuestPermissions);
311 }
312
313 public static void addFileEntryResources(long fileEntryId,
314 java.lang.String[] communityPermissions,
315 java.lang.String[] guestPermissions)
316 throws com.liferay.portal.kernel.exception.PortalException,
317 com.liferay.portal.kernel.exception.SystemException {
318 getService()
319 .addFileEntryResources(fileEntryId, communityPermissions,
320 guestPermissions);
321 }
322
323 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
324 long userId, long groupId, long folderId, java.lang.String name,
325 java.lang.String sourceName, java.lang.String title,
326 java.lang.String description, java.lang.String changeLog,
327 java.lang.String extraSettings, java.io.File file,
328 com.liferay.portal.service.ServiceContext serviceContext)
329 throws com.liferay.portal.kernel.exception.PortalException,
330 com.liferay.portal.kernel.exception.SystemException {
331 return getService()
332 .addOrOverwriteFileEntry(userId, groupId, folderId, name,
333 sourceName, title, description, changeLog, extraSettings, file,
334 serviceContext);
335 }
336
337 public static void deleteFileEntries(long groupId, long folderId)
338 throws com.liferay.portal.kernel.exception.PortalException,
339 com.liferay.portal.kernel.exception.SystemException {
340 getService().deleteFileEntries(groupId, folderId);
341 }
342
343 public static void deleteFileEntry(
344 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
345 throws com.liferay.portal.kernel.exception.PortalException,
346 com.liferay.portal.kernel.exception.SystemException {
347 getService().deleteFileEntry(fileEntry);
348 }
349
350 public static void deleteFileEntry(long groupId, long folderId,
351 java.lang.String name)
352 throws com.liferay.portal.kernel.exception.PortalException,
353 com.liferay.portal.kernel.exception.SystemException {
354 getService().deleteFileEntry(groupId, folderId, name);
355 }
356
357 public static void deleteFileEntry(long groupId, long folderId,
358 java.lang.String name, java.lang.String version)
359 throws com.liferay.portal.kernel.exception.PortalException,
360 com.liferay.portal.kernel.exception.SystemException {
361 getService().deleteFileEntry(groupId, folderId, name, version);
362 }
363
364 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
365 long companyId, int start, int end)
366 throws com.liferay.portal.kernel.exception.SystemException {
367 return getService().getCompanyFileEntries(companyId, start, end);
368 }
369
370 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
371 long companyId, int start, int end,
372 com.liferay.portal.kernel.util.OrderByComparator obc)
373 throws com.liferay.portal.kernel.exception.SystemException {
374 return getService().getCompanyFileEntries(companyId, start, end, obc);
375 }
376
377 public static int getCompanyFileEntriesCount(long companyId)
378 throws com.liferay.portal.kernel.exception.SystemException {
379 return getService().getCompanyFileEntriesCount(companyId);
380 }
381
382 public static java.io.InputStream getFileAsStream(long companyId,
383 long userId, long groupId, long folderId, java.lang.String name)
384 throws com.liferay.portal.kernel.exception.PortalException,
385 com.liferay.portal.kernel.exception.SystemException {
386 return getService()
387 .getFileAsStream(companyId, userId, groupId, folderId, name);
388 }
389
390 public static java.io.InputStream getFileAsStream(long companyId,
391 long userId, long groupId, long folderId, java.lang.String name,
392 java.lang.String version)
393 throws com.liferay.portal.kernel.exception.PortalException,
394 com.liferay.portal.kernel.exception.SystemException {
395 return getService()
396 .getFileAsStream(companyId, userId, groupId, folderId, name,
397 version);
398 }
399
400 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
401 long groupId, long folderId)
402 throws com.liferay.portal.kernel.exception.SystemException {
403 return getService().getFileEntries(groupId, folderId);
404 }
405
406 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
407 long groupId, long folderId, int start, int end)
408 throws com.liferay.portal.kernel.exception.SystemException {
409 return getService().getFileEntries(groupId, folderId, start, end);
410 }
411
412 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
413 long groupId, long folderId, int start, int end,
414 com.liferay.portal.kernel.util.OrderByComparator obc)
415 throws com.liferay.portal.kernel.exception.SystemException {
416 return getService().getFileEntries(groupId, folderId, start, end, obc);
417 }
418
419 public static int getFileEntriesCount(long groupId, long folderId)
420 throws com.liferay.portal.kernel.exception.SystemException {
421 return getService().getFileEntriesCount(groupId, folderId);
422 }
423
424 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
425 long fileEntryId)
426 throws com.liferay.portal.kernel.exception.PortalException,
427 com.liferay.portal.kernel.exception.SystemException {
428 return getService().getFileEntry(fileEntryId);
429 }
430
431 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
432 long groupId, long folderId, java.lang.String name)
433 throws com.liferay.portal.kernel.exception.PortalException,
434 com.liferay.portal.kernel.exception.SystemException {
435 return getService().getFileEntry(groupId, folderId, name);
436 }
437
438 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
439 long groupId, long folderId, java.lang.String title)
440 throws com.liferay.portal.kernel.exception.PortalException,
441 com.liferay.portal.kernel.exception.SystemException {
442 return getService().getFileEntryByTitle(groupId, folderId, title);
443 }
444
445 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
446 java.lang.String uuid, long groupId)
447 throws com.liferay.portal.kernel.exception.PortalException,
448 com.liferay.portal.kernel.exception.SystemException {
449 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
450 }
451
452 public static int getFoldersFileEntriesCount(long groupId,
453 java.util.List<java.lang.Long> folderIds, int status)
454 throws com.liferay.portal.kernel.exception.SystemException {
455 return getService()
456 .getFoldersFileEntriesCount(groupId, folderIds, status);
457 }
458
459 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
460 long groupId, int start, int end)
461 throws com.liferay.portal.kernel.exception.SystemException {
462 return getService().getGroupFileEntries(groupId, start, end);
463 }
464
465 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
466 long groupId, int start, int end,
467 com.liferay.portal.kernel.util.OrderByComparator obc)
468 throws com.liferay.portal.kernel.exception.SystemException {
469 return getService().getGroupFileEntries(groupId, start, end, obc);
470 }
471
472 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
473 long groupId, long userId, int start, int end)
474 throws com.liferay.portal.kernel.exception.SystemException {
475 return getService().getGroupFileEntries(groupId, userId, start, end);
476 }
477
478 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
479 long groupId, long userId, int start, int end,
480 com.liferay.portal.kernel.util.OrderByComparator obc)
481 throws com.liferay.portal.kernel.exception.SystemException {
482 return getService().getGroupFileEntries(groupId, userId, start, end, obc);
483 }
484
485 public static int getGroupFileEntriesCount(long groupId)
486 throws com.liferay.portal.kernel.exception.SystemException {
487 return getService().getGroupFileEntriesCount(groupId);
488 }
489
490 public static int getGroupFileEntriesCount(long groupId, long userId)
491 throws com.liferay.portal.kernel.exception.SystemException {
492 return getService().getGroupFileEntriesCount(groupId, userId);
493 }
494
495 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
496 throws com.liferay.portal.kernel.exception.SystemException {
497 return getService().getNoAssetFileEntries();
498 }
499
500 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
501 long userId, long groupId, long folderId, long newFolderId,
502 java.lang.String name,
503 com.liferay.portal.service.ServiceContext serviceContext)
504 throws com.liferay.portal.kernel.exception.PortalException,
505 com.liferay.portal.kernel.exception.SystemException {
506 return getService()
507 .moveFileEntry(userId, groupId, folderId, newFolderId, name,
508 serviceContext);
509 }
510
511 public static void updateAsset(long userId,
512 com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
513 com.liferay.portlet.documentlibrary.model.DLFileVersion fileVersion,
514 long[] assetCategoryIds, java.lang.String[] assetTagNames)
515 throws com.liferay.portal.kernel.exception.PortalException,
516 com.liferay.portal.kernel.exception.SystemException {
517 getService()
518 .updateAsset(userId, fileEntry, fileVersion, assetCategoryIds,
519 assetTagNames);
520 }
521
522 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
523 long userId, long groupId, long folderId, java.lang.String name,
524 java.lang.String sourceFileName, java.lang.String title,
525 java.lang.String description, java.lang.String changeLog,
526 boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
527 com.liferay.portal.service.ServiceContext serviceContext)
528 throws com.liferay.portal.kernel.exception.PortalException,
529 com.liferay.portal.kernel.exception.SystemException {
530 return getService()
531 .updateFileEntry(userId, groupId, folderId, name,
532 sourceFileName, title, description, changeLog, majorVersion,
533 extraSettings, bytes, serviceContext);
534 }
535
536 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
537 long userId, long groupId, long folderId, java.lang.String name,
538 java.lang.String sourceFileName, java.lang.String title,
539 java.lang.String description, java.lang.String changeLog,
540 boolean majorVersion, java.lang.String extraSettings,
541 java.io.File file,
542 com.liferay.portal.service.ServiceContext serviceContext)
543 throws com.liferay.portal.kernel.exception.PortalException,
544 com.liferay.portal.kernel.exception.SystemException {
545 return getService()
546 .updateFileEntry(userId, groupId, folderId, name,
547 sourceFileName, title, description, changeLog, majorVersion,
548 extraSettings, file, serviceContext);
549 }
550
551 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
552 long userId, long groupId, long folderId, java.lang.String name,
553 java.lang.String sourceFileName, java.lang.String title,
554 java.lang.String description, java.lang.String changeLog,
555 boolean majorVersion, java.lang.String extraSettings,
556 java.io.InputStream is, long size,
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 .updateFileEntry(userId, groupId, folderId, name,
562 sourceFileName, title, description, changeLog, majorVersion,
563 extraSettings, is, size, serviceContext);
564 }
565
566 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
567 long userId, long fileEntryId, int status,
568 com.liferay.portal.service.ServiceContext serviceContext)
569 throws com.liferay.portal.kernel.exception.PortalException,
570 com.liferay.portal.kernel.exception.SystemException {
571 return getService()
572 .updateStatus(userId, fileEntryId, status, serviceContext);
573 }
574
575 public static DLFileEntryLocalService getService() {
576 if (_service == null) {
577 _service = (DLFileEntryLocalService)PortalBeanLocatorUtil.locate(DLFileEntryLocalService.class.getName());
578 }
579
580 return _service;
581 }
582
583 public void setService(DLFileEntryLocalService service) {
584 _service = service;
585 }
586
587 private static DLFileEntryLocalService _service;
588 }