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