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 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
075 public boolean hasDLFileEntryTypeDLFolder(long fileEntryTypeId,
076 long folderId);
077
078 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
079 public boolean hasDLFileEntryTypeDLFolders(long fileEntryTypeId);
080
081 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
082 public boolean hasFolderLock(long userId, long folderId);
083
084 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
085 public boolean hasInheritableLock(long folderId) throws PortalException;
086
087 public boolean verifyInheritableLock(long folderId,
088 java.lang.String lockUuid) throws PortalException;
089
090
096 @Indexable(type = IndexableType.REINDEX)
097 public DLFolder addDLFolder(DLFolder dlFolder);
098
099 public DLFolder addFolder(long userId, long groupId, long repositoryId,
100 boolean mountPoint, long parentFolderId, java.lang.String name,
101 java.lang.String description, boolean hidden,
102 ServiceContext serviceContext) throws PortalException;
103
104
110 public DLFolder createDLFolder(long folderId);
111
112
118 @Indexable(type = IndexableType.DELETE)
119 public DLFolder deleteDLFolder(DLFolder dlFolder);
120
121
128 @Indexable(type = IndexableType.DELETE)
129 public DLFolder deleteDLFolder(long folderId) throws PortalException;
130
131 @Indexable(type = IndexableType.DELETE)
132 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
133 public DLFolder deleteFolder(DLFolder dlFolder) throws PortalException;
134
135 @Indexable(type = IndexableType.DELETE)
136 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
137 public DLFolder deleteFolder(DLFolder dlFolder,
138 boolean includeTrashedEntries) throws PortalException;
139
140 @Indexable(type = IndexableType.DELETE)
141 public DLFolder deleteFolder(long folderId) throws PortalException;
142
143 @Indexable(type = IndexableType.DELETE)
144 public DLFolder deleteFolder(long folderId, boolean includeTrashedEntries)
145 throws PortalException;
146
147 @Indexable(type = IndexableType.DELETE)
148 public DLFolder deleteFolder(long userId, long folderId,
149 boolean includeTrashedEntries) throws PortalException;
150
151 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152 public DLFolder fetchDLFolder(long folderId);
153
154
161 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162 public DLFolder fetchDLFolderByUuidAndGroupId(java.lang.String uuid,
163 long groupId);
164
165 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166 public DLFolder fetchFolder(long folderId);
167
168 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169 public DLFolder fetchFolder(long groupId, long parentFolderId,
170 java.lang.String name);
171
172
179 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180 public DLFolder getDLFolder(long folderId) throws PortalException;
181
182
190 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191 public DLFolder getDLFolderByUuidAndGroupId(java.lang.String uuid,
192 long groupId) throws PortalException;
193
194 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195 public DLFolder getFolder(long folderId) throws PortalException;
196
197 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198 public DLFolder getFolder(long groupId, long parentFolderId,
199 java.lang.String name) throws PortalException;
200
201 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202 public DLFolder getMountFolder(long repositoryId) throws PortalException;
203
204 @Indexable(type = IndexableType.REINDEX)
205 public DLFolder moveFolder(long userId, long folderId, long parentFolderId,
206 ServiceContext serviceContext) throws PortalException;
207
208
214 @Indexable(type = IndexableType.REINDEX)
215 public DLFolder updateDLFolder(DLFolder dlFolder);
216
217
221 @java.lang.Deprecated
222 public DLFolder updateFolder(long folderId, java.lang.String name,
223 java.lang.String description, long defaultFileEntryTypeId,
224 List<java.lang.Long> fileEntryTypeIds, boolean overrideFileEntryTypes,
225 ServiceContext serviceContext) throws PortalException;
226
227 @Indexable(type = IndexableType.REINDEX)
228 public DLFolder updateFolder(long folderId, java.lang.String name,
229 java.lang.String description, long defaultFileEntryTypeId,
230 List<java.lang.Long> fileEntryTypeIds, int restrictionType,
231 ServiceContext serviceContext) throws PortalException;
232
233
237 @java.lang.Deprecated
238 public DLFolder updateFolder(long folderId, long parentFolderId,
239 java.lang.String name, java.lang.String description,
240 long defaultFileEntryTypeId, List<java.lang.Long> fileEntryTypeIds,
241 boolean overrideFileEntryTypes, ServiceContext serviceContext)
242 throws PortalException;
243
244 @Indexable(type = IndexableType.REINDEX)
245 public DLFolder updateFolder(long folderId, long parentFolderId,
246 java.lang.String name, java.lang.String description,
247 long defaultFileEntryTypeId, List<java.lang.Long> fileEntryTypeIds,
248 int restrictionType, ServiceContext serviceContext)
249 throws PortalException;
250
251
256 @java.lang.Deprecated
257 public DLFolder updateFolderAndFileEntryTypes(long userId, long folderId,
258 long parentFolderId, java.lang.String name,
259 java.lang.String description, long defaultFileEntryTypeId,
260 List<java.lang.Long> fileEntryTypeIds, boolean overrideFileEntryTypes,
261 ServiceContext serviceContext) throws PortalException;
262
263 public DLFolder updateFolderAndFileEntryTypes(long userId, long folderId,
264 long parentFolderId, java.lang.String name,
265 java.lang.String description, long defaultFileEntryTypeId,
266 List<java.lang.Long> fileEntryTypeIds, int restrictionType,
267 ServiceContext serviceContext) throws PortalException;
268
269 public DLFolder updateStatus(long userId, long folderId, int status,
270 Map<java.lang.String, Serializable> workflowContext,
271 ServiceContext serviceContext) throws PortalException;
272
273 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274 public ActionableDynamicQuery getActionableDynamicQuery();
275
276 public DynamicQuery dynamicQuery();
277
278 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
280 PortletDataContext portletDataContext);
281
282 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
284
285 public Lock lockFolder(long userId, long folderId)
286 throws PortalException;
287
288 public Lock lockFolder(long userId, long folderId, java.lang.String owner,
289 boolean inheritable, long expirationTime) throws PortalException;
290
291
294 @Override
295 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
296 throws PortalException;
297
298 @Override
299 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
301 throws PortalException;
302
303 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304 public int getCompanyFoldersCount(long companyId);
305
306 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307 public int getDLFileEntryTypeDLFoldersCount(long fileEntryTypeId);
308
309
314 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315 public int getDLFoldersCount();
316
317 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318 public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
319 QueryDefinition<?> queryDefinition);
320
321 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322 public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
323 long folderId, java.lang.String[] mimeTypes,
324 boolean includeMountFolders, QueryDefinition<?> queryDefinition);
325
326 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
327 public int getFoldersCount(long groupId, long parentFolderId);
328
329 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330 public int getFoldersCount(long groupId, long parentFolderId,
331 boolean includeMountfolders);
332
333 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334 public int getFoldersCount(long groupId, long parentFolderId, int status,
335 boolean includeMountfolders);
336
337 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338 public int getMountFoldersCount(long groupId, long parentFolderId);
339
340 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341 public int getRepositoryFoldersCount(long repositoryId);
342
343
348 public java.lang.String getOSGiServiceIdentifier();
349
350
356 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
357
358
370 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
371 int end);
372
373
386 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
387 int end, OrderByComparator<T> orderByComparator);
388
389 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
390 public List<DLFolder> getCompanyFolders(long companyId, int start, int end);
391
392 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393 public List<DLFolder> getDLFileEntryTypeDLFolders(long fileEntryTypeId);
394
395 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396 public List<DLFolder> getDLFileEntryTypeDLFolders(long fileEntryTypeId,
397 int start, int end);
398
399 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
400 public List<DLFolder> getDLFileEntryTypeDLFolders(long fileEntryTypeId,
401 int start, int end, OrderByComparator<DLFolder> orderByComparator);
402
403
414 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
415 public List<DLFolder> getDLFolders(int start, int end);
416
417
424 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
425 public List<DLFolder> getDLFoldersByUuidAndCompanyId(
426 java.lang.String uuid, long companyId);
427
428
438 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
439 public List<DLFolder> getDLFoldersByUuidAndCompanyId(
440 java.lang.String uuid, long companyId, int start, int end,
441 OrderByComparator<DLFolder> orderByComparator);
442
443 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
444 public List<java.lang.Object> getFileEntriesAndFileShortcuts(long groupId,
445 long folderId, QueryDefinition<?> queryDefinition);
446
447
451 @java.lang.Deprecated
452 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
453 public List<java.lang.Long> getFolderIds(long groupId, long parentFolderId);
454
455 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
456 public List<DLFolder> getFolders(long groupId, long parentFolderId);
457
458 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
459 public List<DLFolder> getFolders(long groupId, long parentFolderId,
460 boolean includeMountfolders);
461
462 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
463 public List<DLFolder> getFolders(long groupId, long parentFolderId,
464 boolean includeMountfolders, int start, int end,
465 OrderByComparator<DLFolder> obc);
466
467 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
468 public List<DLFolder> getFolders(long groupId, long parentFolderId,
469 int start, int end, OrderByComparator<DLFolder> obc);
470
471 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
472 public List<DLFolder> getFolders(long groupId, long parentFolderId,
473 int status, boolean includeMountfolders, int start, int end,
474 OrderByComparator<DLFolder> obc);
475
476 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
477 public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
478 long groupId, long folderId, java.lang.String[] mimeTypes,
479 boolean includeMountFolders, QueryDefinition<?> queryDefinition);
480
481 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
482 public List<java.lang.Long> getGroupFolderIds(long groupId,
483 long parentFolderId);
484
485 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
486 public List<DLFolder> getMountFolders(long groupId, long parentFolderId,
487 int start, int end, OrderByComparator<DLFolder> obc);
488
489 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
490 public List<DLFolder> getNoAssetFolders();
491
492 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
493 public List<java.lang.Long> getRepositoryFolderIds(long repositoryId,
494 long parentFolderId);
495
496 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
497 public List<DLFolder> getRepositoryFolders(long repositoryId, int start,
498 int end);
499
500
506 public long dynamicQueryCount(DynamicQuery dynamicQuery);
507
508
515 public long dynamicQueryCount(DynamicQuery dynamicQuery,
516 Projection projection);
517
518 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
519 public long getFolderId(long companyId, long folderId);
520
521
527 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
528 public long[] getDLFileEntryTypePrimaryKeys(long folderId);
529
530 public void addDLFileEntryTypeDLFolder(long fileEntryTypeId,
531 DLFolder dlFolder);
532
533 public void addDLFileEntryTypeDLFolder(long fileEntryTypeId, long folderId);
534
535 public void addDLFileEntryTypeDLFolders(long fileEntryTypeId,
536 List<DLFolder> dlFolders);
537
538 public void addDLFileEntryTypeDLFolders(long fileEntryTypeId,
539 long[] folderIds);
540
541 public void clearDLFileEntryTypeDLFolders(long fileEntryTypeId);
542
543
546 @java.lang.Deprecated
547 public void deleteAll(long groupId) throws PortalException;
548
549 public void deleteAllByGroup(long groupId) throws PortalException;
550
551 public void deleteAllByRepository(long repositoryId)
552 throws PortalException;
553
554 public void deleteDLFileEntryTypeDLFolder(long fileEntryTypeId,
555 DLFolder dlFolder);
556
557 public void deleteDLFileEntryTypeDLFolder(long fileEntryTypeId,
558 long folderId);
559
560 public void deleteDLFileEntryTypeDLFolders(long fileEntryTypeId,
561 List<DLFolder> dlFolders);
562
563 public void deleteDLFileEntryTypeDLFolders(long fileEntryTypeId,
564 long[] folderIds);
565
566 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
567 public void getGroupSubfolderIds(List<java.lang.Long> folderIds,
568 long groupId, long folderId);
569
570 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
571 public void getRepositorySubfolderIds(List<java.lang.Long> folderIds,
572 long repositoryId, long folderId);
573
574
578 @java.lang.Deprecated
579 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
580 public void getSubfolderIds(List<java.lang.Long> folderIds, long groupId,
581 long folderId);
582
583 public void rebuildTree(long companyId) throws PortalException;
584
585 public void rebuildTree(long companyId, long parentFolderId,
586 java.lang.String parentTreePath, boolean reindex)
587 throws PortalException;
588
589 public void setDLFileEntryTypeDLFolders(long fileEntryTypeId,
590 long[] folderIds);
591
592 public void unlockFolder(long folderId, java.lang.String lockUuid)
593 throws PortalException;
594
595 public void unlockFolder(long groupId, long parentFolderId,
596 java.lang.String name, java.lang.String lockUuid)
597 throws PortalException;
598
599 @BufferedIncrement(configuration = "DLFolderEntry", incrementClass = com.liferay.portal.kernel.increment.DateOverrideIncrement.class)
600 public void updateLastPostDate(long folderId, Date lastPostDate)
601 throws PortalException;
602 }