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.portal.kernel.dao.orm.QueryDefinition;
022 import com.liferay.portal.kernel.exception.PortalException;
023 import com.liferay.portal.kernel.exception.SystemException;
024 import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
025 import com.liferay.portal.kernel.lock.Lock;
026 import com.liferay.portal.kernel.security.access.control.AccessControlled;
027 import com.liferay.portal.kernel.service.BaseService;
028 import com.liferay.portal.kernel.service.ServiceContext;
029 import com.liferay.portal.kernel.transaction.Isolation;
030 import com.liferay.portal.kernel.transaction.Propagation;
031 import com.liferay.portal.kernel.transaction.Transactional;
032 import com.liferay.portal.kernel.util.OrderByComparator;
033
034 import java.util.List;
035
036
047 @AccessControlled
048 @JSONWebService
049 @ProviderType
050 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
051 PortalException.class, SystemException.class})
052 public interface DLFolderService extends BaseService {
053
058 public DLFolder addFolder(long groupId, long repositoryId,
059 boolean mountPoint, long parentFolderId, java.lang.String name,
060 java.lang.String description, ServiceContext serviceContext)
061 throws PortalException;
062
063 public void deleteFolder(long folderId) throws PortalException;
064
065 public void deleteFolder(long folderId, boolean includeTrashedEntries)
066 throws PortalException;
067
068 public void deleteFolder(long groupId, long parentFolderId,
069 java.lang.String name) throws PortalException;
070
071 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
072 public List<java.lang.Object> getFileEntriesAndFileShortcuts(long groupId,
073 long folderId, int status, int start, int end)
074 throws PortalException;
075
076 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
077 public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
078 int status) throws PortalException;
079
080 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081 public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
082 int status, java.lang.String[] mimeTypes) throws PortalException;
083
084 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
085 public DLFolder getFolder(long folderId) throws PortalException;
086
087 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
088 public DLFolder getFolder(long groupId, long parentFolderId,
089 java.lang.String name) throws PortalException;
090
091 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
092 public List<java.lang.Long> getFolderIds(long groupId, long folderId)
093 throws PortalException;
094
095 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
096 public List<DLFolder> getFolders(long groupId, long parentFolderId,
097 int start, int end, OrderByComparator<DLFolder> obc)
098 throws PortalException;
099
100 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
101 public List<DLFolder> getFolders(long groupId, long parentFolderId,
102 int status, boolean includeMountfolders, int start, int end,
103 OrderByComparator<DLFolder> obc) throws PortalException;
104
105 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
106 public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
107 long groupId, long folderId, java.lang.String[] mimeTypes,
108 boolean includeMountFolders, QueryDefinition<?> queryDefinition)
109 throws PortalException;
110
111 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112 public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
113 long groupId, long folderId, int status, boolean includeMountFolders,
114 int start, int end, OrderByComparator<?> obc) throws PortalException;
115
116 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117 public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
118 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
119 boolean includeMountFolders, int start, int end,
120 OrderByComparator<?> obc) throws PortalException;
121
122 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123 public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
124 long folderId, java.lang.String[] mimeTypes,
125 boolean includeMountFolders, QueryDefinition<?> queryDefinition)
126 throws PortalException;
127
128 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129 public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
130 long folderId, int status, boolean includeMountFolders)
131 throws PortalException;
132
133 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134 public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
135 long folderId, int status, java.lang.String[] mimeTypes,
136 boolean includeMountFolders) throws PortalException;
137
138 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139 public int getFoldersCount(long groupId, long parentFolderId)
140 throws PortalException;
141
142 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143 public int getFoldersCount(long groupId, long parentFolderId, int status,
144 boolean includeMountfolders) throws PortalException;
145
146 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147 public List<DLFolder> getMountFolders(long groupId, long parentFolderId,
148 int start, int end, OrderByComparator<DLFolder> obc)
149 throws PortalException;
150
151 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152 public int getMountFoldersCount(long groupId, long parentFolderId)
153 throws PortalException;
154
155
160 public java.lang.String getOSGiServiceIdentifier();
161
162
166 @java.lang.Deprecated
167 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168 public void getSubfolderIds(List<java.lang.Long> folderIds, long groupId,
169 long folderId) throws PortalException;
170
171 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172 public void getSubfolderIds(List<java.lang.Long> folderIds, long groupId,
173 long folderId, boolean recurse) throws PortalException;
174
175 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176 public List<java.lang.Long> getSubfolderIds(long groupId, long folderId,
177 boolean recurse) throws PortalException;
178
179 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180 public boolean hasFolderLock(long folderId) throws PortalException;
181
182 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183 public boolean hasInheritableLock(long folderId) throws PortalException;
184
185 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186 public boolean isFolderLocked(long folderId);
187
188 public Lock lockFolder(long folderId) throws PortalException;
189
190 public Lock lockFolder(long folderId, java.lang.String owner,
191 boolean inheritable, long expirationTime) throws PortalException;
192
193 public DLFolder moveFolder(long folderId, long parentFolderId,
194 ServiceContext serviceContext) throws PortalException;
195
196 public Lock refreshFolderLock(java.lang.String lockUuid, long companyId,
197 long expirationTime) throws PortalException;
198
199 public void unlockFolder(long folderId, java.lang.String lockUuid)
200 throws PortalException;
201
202 public void unlockFolder(long groupId, long parentFolderId,
203 java.lang.String name, java.lang.String lockUuid)
204 throws PortalException;
205
206
211 @java.lang.Deprecated
212 public DLFolder updateFolder(long folderId, java.lang.String name,
213 java.lang.String description, long defaultFileEntryTypeId,
214 List<java.lang.Long> fileEntryTypeIds, boolean overrideFileEntryTypes,
215 ServiceContext serviceContext) throws PortalException;
216
217 public DLFolder updateFolder(long folderId, java.lang.String name,
218 java.lang.String description, long defaultFileEntryTypeId,
219 List<java.lang.Long> fileEntryTypeIds, int restrictionType,
220 ServiceContext serviceContext) throws PortalException;
221
222 public DLFolder updateFolder(long folderId, long parentFolderId,
223 java.lang.String name, java.lang.String description,
224 long defaultFileEntryTypeId, List<java.lang.Long> fileEntryTypeIds,
225 int restrictionType, ServiceContext serviceContext)
226 throws PortalException;
227
228 public boolean verifyInheritableLock(long folderId,
229 java.lang.String lockUuid) throws PortalException;
230 }