001
014
015 package com.liferay.document.library.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.document.library.kernel.model.DLFolder;
020
021 import com.liferay.exportimport.kernel.lar.PortletDataContext;
022
023 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
025 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
026 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
027 import com.liferay.portal.kernel.dao.orm.Projection;
028 import com.liferay.portal.kernel.dao.orm.QueryDefinition;
029 import com.liferay.portal.kernel.exception.PortalException;
030 import com.liferay.portal.kernel.exception.SystemException;
031 import com.liferay.portal.kernel.increment.BufferedIncrement;
032 import com.liferay.portal.kernel.lock.Lock;
033 import com.liferay.portal.kernel.model.PersistedModel;
034 import com.liferay.portal.kernel.model.SystemEventConstants;
035 import com.liferay.portal.kernel.search.Indexable;
036 import com.liferay.portal.kernel.search.IndexableType;
037 import com.liferay.portal.kernel.service.BaseLocalService;
038 import com.liferay.portal.kernel.service.PersistedModelLocalService;
039 import com.liferay.portal.kernel.service.ServiceContext;
040 import com.liferay.portal.kernel.systemevent.SystemEvent;
041 import com.liferay.portal.kernel.transaction.Isolation;
042 import com.liferay.portal.kernel.transaction.Propagation;
043 import com.liferay.portal.kernel.transaction.Transactional;
044 import com.liferay.portal.kernel.util.OrderByComparator;
045
046 import java.io.Serializable;
047
048 import java.util.Date;
049 import java.util.List;
050 import java.util.Map;
051
052
064 @ProviderType
065 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
066 PortalException.class, SystemException.class})
067 public interface DLFolderLocalService extends BaseLocalService,
068 PersistedModelLocalService {
069
074 public void addDLFileEntryTypeDLFolder(long fileEntryTypeId,
075 DLFolder dlFolder);
076
077 public void addDLFileEntryTypeDLFolder(long fileEntryTypeId, long folderId);
078
079 public void addDLFileEntryTypeDLFolders(long fileEntryTypeId,
080 List<DLFolder> DLFolders);
081
082 public void addDLFileEntryTypeDLFolders(long fileEntryTypeId,
083 long[] folderIds);
084
085
091 @Indexable(type = IndexableType.REINDEX)
092 public DLFolder addDLFolder(DLFolder dlFolder);
093
094 public DLFolder addFolder(long userId, long groupId, long repositoryId,
095 boolean mountPoint, long parentFolderId, java.lang.String name,
096 java.lang.String description, boolean hidden,
097 ServiceContext serviceContext) throws PortalException;
098
099 public void clearDLFileEntryTypeDLFolders(long fileEntryTypeId);
100
101
107 public DLFolder createDLFolder(long folderId);
108
109
112 @java.lang.Deprecated
113 public void deleteAll(long groupId) throws PortalException;
114
115 public void deleteAllByGroup(long groupId) throws PortalException;
116
117 public void deleteAllByRepository(long repositoryId)
118 throws PortalException;
119
120 public void deleteDLFileEntryTypeDLFolder(long fileEntryTypeId,
121 DLFolder dlFolder);
122
123 public void deleteDLFileEntryTypeDLFolder(long fileEntryTypeId,
124 long folderId);
125
126 public void deleteDLFileEntryTypeDLFolders(long fileEntryTypeId,
127 List<DLFolder> DLFolders);
128
129 public void deleteDLFileEntryTypeDLFolders(long fileEntryTypeId,
130 long[] folderIds);
131
132
138 @Indexable(type = IndexableType.DELETE)
139 public DLFolder deleteDLFolder(DLFolder dlFolder);
140
141
148 @Indexable(type = IndexableType.DELETE)
149 public DLFolder deleteDLFolder(long folderId) throws PortalException;
150
151 @Indexable(type = IndexableType.DELETE)
152 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
153 public DLFolder deleteFolder(DLFolder dlFolder) throws PortalException;
154
155 @Indexable(type = IndexableType.DELETE)
156 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
157 public DLFolder deleteFolder(DLFolder dlFolder,
158 boolean includeTrashedEntries) throws PortalException;
159
160 @Indexable(type = IndexableType.DELETE)
161 public DLFolder deleteFolder(long folderId) throws PortalException;
162
163 @Indexable(type = IndexableType.DELETE)
164 public DLFolder deleteFolder(long folderId, boolean includeTrashedEntries)
165 throws PortalException;
166
167 @Indexable(type = IndexableType.DELETE)
168 public DLFolder deleteFolder(long userId, long folderId,
169 boolean includeTrashedEntries) throws PortalException;
170
171
174 @Override
175 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
176 throws PortalException;
177
178 public DynamicQuery dynamicQuery();
179
180
186 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
187
188
200 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
201 int end);
202
203
216 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
217 int end, OrderByComparator<T> orderByComparator);
218
219
225 public long dynamicQueryCount(DynamicQuery dynamicQuery);
226
227
234 public long dynamicQueryCount(DynamicQuery dynamicQuery,
235 Projection projection);
236
237 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238 public DLFolder fetchDLFolder(long folderId);
239
240
247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248 public DLFolder fetchDLFolderByUuidAndGroupId(java.lang.String uuid,
249 long groupId);
250
251 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252 public DLFolder fetchFolder(long folderId);
253
254 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255 public DLFolder fetchFolder(long groupId, long parentFolderId,
256 java.lang.String name);
257
258 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259 public ActionableDynamicQuery getActionableDynamicQuery();
260
261 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262 public List<DLFolder> getCompanyFolders(long companyId, int start, int end);
263
264 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265 public int getCompanyFoldersCount(long companyId);
266
267 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268 public List<DLFolder> getDLFileEntryTypeDLFolders(long fileEntryTypeId);
269
270 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271 public List<DLFolder> getDLFileEntryTypeDLFolders(long fileEntryTypeId,
272 int start, int end);
273
274 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275 public List<DLFolder> getDLFileEntryTypeDLFolders(long fileEntryTypeId,
276 int start, int end, OrderByComparator<DLFolder> orderByComparator);
277
278 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279 public int getDLFileEntryTypeDLFoldersCount(long fileEntryTypeId);
280
281
287 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288 public long[] getDLFileEntryTypePrimaryKeys(long folderId);
289
290
297 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298 public DLFolder getDLFolder(long folderId) throws PortalException;
299
300
308 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309 public DLFolder getDLFolderByUuidAndGroupId(java.lang.String uuid,
310 long groupId) throws PortalException;
311
312
323 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324 public List<DLFolder> getDLFolders(int start, int end);
325
326
333 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334 public List<DLFolder> getDLFoldersByUuidAndCompanyId(
335 java.lang.String uuid, long companyId);
336
337
347 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348 public List<DLFolder> getDLFoldersByUuidAndCompanyId(
349 java.lang.String uuid, long companyId, int start, int end,
350 OrderByComparator<DLFolder> orderByComparator);
351
352
357 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358 public int getDLFoldersCount();
359
360 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
362 PortletDataContext portletDataContext);
363
364 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365 public List<java.lang.Object> getFileEntriesAndFileShortcuts(long groupId,
366 long folderId, QueryDefinition<?> queryDefinition);
367
368 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
369 public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
370 QueryDefinition<?> queryDefinition);
371
372 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373 public DLFolder getFolder(long folderId) throws PortalException;
374
375 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376 public DLFolder getFolder(long groupId, long parentFolderId,
377 java.lang.String name) throws PortalException;
378
379 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
380 public long getFolderId(long companyId, long folderId);
381
382
386 @java.lang.Deprecated
387 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
388 public List<java.lang.Long> getFolderIds(long groupId, long parentFolderId);
389
390 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391 public List<DLFolder> getFolders(long groupId, long parentFolderId);
392
393 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
394 public List<DLFolder> getFolders(long groupId, long parentFolderId,
395 boolean includeMountfolders);
396
397 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398 public List<DLFolder> getFolders(long groupId, long parentFolderId,
399 boolean includeMountfolders, int start, int end,
400 OrderByComparator<DLFolder> obc);
401
402 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
403 public List<DLFolder> getFolders(long groupId, long parentFolderId,
404 int start, int end, OrderByComparator<DLFolder> obc);
405
406 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
407 public List<DLFolder> getFolders(long groupId, long parentFolderId,
408 int status, boolean includeMountfolders, int start, int end,
409 OrderByComparator<DLFolder> obc);
410
411 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
412 public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
413 long groupId, long folderId, java.lang.String[] mimeTypes,
414 boolean includeMountFolders, QueryDefinition<?> queryDefinition);
415
416 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
417 public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
418 long folderId, java.lang.String[] mimeTypes,
419 boolean includeMountFolders, QueryDefinition<?> queryDefinition);
420
421 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
422 public int getFoldersCount(long groupId, long parentFolderId);
423
424 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
425 public int getFoldersCount(long groupId, long parentFolderId,
426 boolean includeMountfolders);
427
428 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
429 public int getFoldersCount(long groupId, long parentFolderId, int status,
430 boolean includeMountfolders);
431
432 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
433 public List<java.lang.Long> getGroupFolderIds(long groupId,
434 long parentFolderId);
435
436 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
437 public void getGroupSubfolderIds(List<java.lang.Long> folderIds,
438 long groupId, long folderId);
439
440 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
441 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
442
443 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
444 public DLFolder getMountFolder(long repositoryId) throws PortalException;
445
446 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
447 public List<DLFolder> getMountFolders(long groupId, long parentFolderId,
448 int start, int end, OrderByComparator<DLFolder> obc);
449
450 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
451 public int getMountFoldersCount(long groupId, long parentFolderId);
452
453 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
454 public List<DLFolder> getNoAssetFolders();
455
456
461 public java.lang.String getOSGiServiceIdentifier();
462
463 @Override
464 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
465 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
466 throws PortalException;
467
468 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
469 public List<java.lang.Long> getRepositoryFolderIds(long repositoryId,
470 long parentFolderId);
471
472 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
473 public List<DLFolder> getRepositoryFolders(long repositoryId, int start,
474 int end);
475
476 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
477 public int getRepositoryFoldersCount(long repositoryId);
478
479 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
480 public void getRepositorySubfolderIds(List<java.lang.Long> folderIds,
481 long repositoryId, long folderId);
482
483
487 @java.lang.Deprecated
488 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
489 public void getSubfolderIds(List<java.lang.Long> folderIds, long groupId,
490 long folderId);
491
492 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
493 public boolean hasDLFileEntryTypeDLFolder(long fileEntryTypeId,
494 long folderId);
495
496 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
497 public boolean hasDLFileEntryTypeDLFolders(long fileEntryTypeId);
498
499 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
500 public boolean hasFolderLock(long userId, long folderId);
501
502 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
503 public boolean hasInheritableLock(long folderId) throws PortalException;
504
505 public Lock lockFolder(long userId, long folderId)
506 throws PortalException;
507
508 public Lock lockFolder(long userId, long folderId, java.lang.String owner,
509 boolean inheritable, long expirationTime) throws PortalException;
510
511 @Indexable(type = IndexableType.REINDEX)
512 public DLFolder moveFolder(long userId, long folderId, long parentFolderId,
513 ServiceContext serviceContext) throws PortalException;
514
515 public void rebuildTree(long companyId) throws PortalException;
516
517 public void rebuildTree(long companyId, long parentFolderId,
518 java.lang.String parentTreePath, boolean reindex)
519 throws PortalException;
520
521 public void setDLFileEntryTypeDLFolders(long fileEntryTypeId,
522 long[] folderIds);
523
524 public void unlockFolder(long folderId, java.lang.String lockUuid)
525 throws PortalException;
526
527 public void unlockFolder(long groupId, long parentFolderId,
528 java.lang.String name, java.lang.String lockUuid)
529 throws PortalException;
530
531
537 @Indexable(type = IndexableType.REINDEX)
538 public DLFolder updateDLFolder(DLFolder dlFolder);
539
540
544 @java.lang.Deprecated
545 public DLFolder updateFolder(long folderId, java.lang.String name,
546 java.lang.String description, long defaultFileEntryTypeId,
547 List<java.lang.Long> fileEntryTypeIds, boolean overrideFileEntryTypes,
548 ServiceContext serviceContext) throws PortalException;
549
550 @Indexable(type = IndexableType.REINDEX)
551 public DLFolder updateFolder(long folderId, java.lang.String name,
552 java.lang.String description, long defaultFileEntryTypeId,
553 List<java.lang.Long> fileEntryTypeIds, int restrictionType,
554 ServiceContext serviceContext) throws PortalException;
555
556
560 @java.lang.Deprecated
561 public DLFolder updateFolder(long folderId, long parentFolderId,
562 java.lang.String name, java.lang.String description,
563 long defaultFileEntryTypeId, List<java.lang.Long> fileEntryTypeIds,
564 boolean overrideFileEntryTypes, ServiceContext serviceContext)
565 throws PortalException;
566
567 @Indexable(type = IndexableType.REINDEX)
568 public DLFolder updateFolder(long folderId, long parentFolderId,
569 java.lang.String name, java.lang.String description,
570 long defaultFileEntryTypeId, List<java.lang.Long> fileEntryTypeIds,
571 int restrictionType, ServiceContext serviceContext)
572 throws PortalException;
573
574
579 @java.lang.Deprecated
580 public DLFolder updateFolderAndFileEntryTypes(long userId, long folderId,
581 long parentFolderId, java.lang.String name,
582 java.lang.String description, long defaultFileEntryTypeId,
583 List<java.lang.Long> fileEntryTypeIds, boolean overrideFileEntryTypes,
584 ServiceContext serviceContext) throws PortalException;
585
586 public DLFolder updateFolderAndFileEntryTypes(long userId, long folderId,
587 long parentFolderId, java.lang.String name,
588 java.lang.String description, long defaultFileEntryTypeId,
589 List<java.lang.Long> fileEntryTypeIds, int restrictionType,
590 ServiceContext serviceContext) throws PortalException;
591
592 @BufferedIncrement(configuration = "DLFolderEntry", incrementClass = com.liferay.portal.kernel.increment.DateOverrideIncrement.class)
593 public void updateLastPostDate(long folderId, Date lastPostDate)
594 throws PortalException;
595
596 public DLFolder updateStatus(long userId, long folderId, int status,
597 Map<java.lang.String, Serializable> workflowContext,
598 ServiceContext serviceContext) throws PortalException;
599
600 public boolean verifyInheritableLock(long folderId,
601 java.lang.String lockUuid) throws PortalException;
602 }