001
014
015 package com.liferay.document.library.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020 import com.liferay.portal.kernel.util.ReferenceRegistry;
021
022
036 @ProviderType
037 public class DLFolderServiceUtil {
038
043 public static boolean hasFolderLock(long folderId)
044 throws com.liferay.portal.kernel.exception.PortalException {
045 return getService().hasFolderLock(folderId);
046 }
047
048 public static boolean hasInheritableLock(long folderId)
049 throws com.liferay.portal.kernel.exception.PortalException {
050 return getService().hasInheritableLock(folderId);
051 }
052
053 public static boolean isFolderLocked(long folderId) {
054 return getService().isFolderLocked(folderId);
055 }
056
057 public static boolean verifyInheritableLock(long folderId,
058 java.lang.String lockUuid)
059 throws com.liferay.portal.kernel.exception.PortalException {
060 return getService().verifyInheritableLock(folderId, lockUuid);
061 }
062
063 public static com.liferay.document.library.kernel.model.DLFolder addFolder(
064 long groupId, long repositoryId, boolean mountPoint,
065 long parentFolderId, java.lang.String name,
066 java.lang.String description,
067 com.liferay.portal.kernel.service.ServiceContext serviceContext)
068 throws com.liferay.portal.kernel.exception.PortalException {
069 return getService()
070 .addFolder(groupId, repositoryId, mountPoint,
071 parentFolderId, name, description, serviceContext);
072 }
073
074 public static com.liferay.document.library.kernel.model.DLFolder getFolder(
075 long folderId)
076 throws com.liferay.portal.kernel.exception.PortalException {
077 return getService().getFolder(folderId);
078 }
079
080 public static com.liferay.document.library.kernel.model.DLFolder getFolder(
081 long groupId, long parentFolderId, java.lang.String name)
082 throws com.liferay.portal.kernel.exception.PortalException {
083 return getService().getFolder(groupId, parentFolderId, name);
084 }
085
086 public static com.liferay.document.library.kernel.model.DLFolder moveFolder(
087 long folderId, long parentFolderId,
088 com.liferay.portal.kernel.service.ServiceContext serviceContext)
089 throws com.liferay.portal.kernel.exception.PortalException {
090 return getService().moveFolder(folderId, parentFolderId, serviceContext);
091 }
092
093
098 @Deprecated
099 public static com.liferay.document.library.kernel.model.DLFolder updateFolder(
100 long folderId, java.lang.String name, java.lang.String description,
101 long defaultFileEntryTypeId,
102 java.util.List<java.lang.Long> fileEntryTypeIds,
103 boolean overrideFileEntryTypes,
104 com.liferay.portal.kernel.service.ServiceContext serviceContext)
105 throws com.liferay.portal.kernel.exception.PortalException {
106 return getService()
107 .updateFolder(folderId, name, description,
108 defaultFileEntryTypeId, fileEntryTypeIds, overrideFileEntryTypes,
109 serviceContext);
110 }
111
112 public static com.liferay.document.library.kernel.model.DLFolder updateFolder(
113 long folderId, java.lang.String name, java.lang.String description,
114 long defaultFileEntryTypeId,
115 java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
116 com.liferay.portal.kernel.service.ServiceContext serviceContext)
117 throws com.liferay.portal.kernel.exception.PortalException {
118 return getService()
119 .updateFolder(folderId, name, description,
120 defaultFileEntryTypeId, fileEntryTypeIds, restrictionType,
121 serviceContext);
122 }
123
124 public static com.liferay.document.library.kernel.model.DLFolder updateFolder(
125 long folderId, long parentFolderId, java.lang.String name,
126 java.lang.String description, long defaultFileEntryTypeId,
127 java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
128 com.liferay.portal.kernel.service.ServiceContext serviceContext)
129 throws com.liferay.portal.kernel.exception.PortalException {
130 return getService()
131 .updateFolder(folderId, parentFolderId, name, description,
132 defaultFileEntryTypeId, fileEntryTypeIds, restrictionType,
133 serviceContext);
134 }
135
136 public static com.liferay.portal.kernel.lock.Lock lockFolder(long folderId)
137 throws com.liferay.portal.kernel.exception.PortalException {
138 return getService().lockFolder(folderId);
139 }
140
141 public static com.liferay.portal.kernel.lock.Lock lockFolder(
142 long folderId, java.lang.String owner, boolean inheritable,
143 long expirationTime)
144 throws com.liferay.portal.kernel.exception.PortalException {
145 return getService()
146 .lockFolder(folderId, owner, inheritable, expirationTime);
147 }
148
149 public static com.liferay.portal.kernel.lock.Lock refreshFolderLock(
150 java.lang.String lockUuid, long companyId, long expirationTime)
151 throws com.liferay.portal.kernel.exception.PortalException {
152 return getService()
153 .refreshFolderLock(lockUuid, companyId, expirationTime);
154 }
155
156 public static int getFileEntriesAndFileShortcutsCount(long groupId,
157 long folderId, int status)
158 throws com.liferay.portal.kernel.exception.PortalException {
159 return getService()
160 .getFileEntriesAndFileShortcutsCount(groupId, folderId,
161 status);
162 }
163
164 public static int getFileEntriesAndFileShortcutsCount(long groupId,
165 long folderId, int status, java.lang.String[] mimeTypes)
166 throws com.liferay.portal.kernel.exception.PortalException {
167 return getService()
168 .getFileEntriesAndFileShortcutsCount(groupId, folderId,
169 status, mimeTypes);
170 }
171
172 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
173 long groupId, long folderId, int status, boolean includeMountFolders)
174 throws com.liferay.portal.kernel.exception.PortalException {
175 return getService()
176 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
177 folderId, status, includeMountFolders);
178 }
179
180 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
181 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
182 boolean includeMountFolders)
183 throws com.liferay.portal.kernel.exception.PortalException {
184 return getService()
185 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
186 folderId, status, mimeTypes, includeMountFolders);
187 }
188
189 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
190 long groupId, long folderId, java.lang.String[] mimeTypes,
191 boolean includeMountFolders,
192 com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition)
193 throws com.liferay.portal.kernel.exception.PortalException {
194 return getService()
195 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
196 folderId, mimeTypes, includeMountFolders, queryDefinition);
197 }
198
199 public static int getFoldersCount(long groupId, long parentFolderId)
200 throws com.liferay.portal.kernel.exception.PortalException {
201 return getService().getFoldersCount(groupId, parentFolderId);
202 }
203
204 public static int getFoldersCount(long groupId, long parentFolderId,
205 int status, boolean includeMountfolders)
206 throws com.liferay.portal.kernel.exception.PortalException {
207 return getService()
208 .getFoldersCount(groupId, parentFolderId, status,
209 includeMountfolders);
210 }
211
212 public static int getMountFoldersCount(long groupId, long parentFolderId)
213 throws com.liferay.portal.kernel.exception.PortalException {
214 return getService().getMountFoldersCount(groupId, parentFolderId);
215 }
216
217
222 public static java.lang.String getOSGiServiceIdentifier() {
223 return getService().getOSGiServiceIdentifier();
224 }
225
226 public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
227 long groupId, long folderId, int status, int start, int end)
228 throws com.liferay.portal.kernel.exception.PortalException {
229 return getService()
230 .getFileEntriesAndFileShortcuts(groupId, folderId, status,
231 start, end);
232 }
233
234 public static java.util.List<java.lang.Long> getFolderIds(long groupId,
235 long folderId)
236 throws com.liferay.portal.kernel.exception.PortalException {
237 return getService().getFolderIds(groupId, folderId);
238 }
239
240 public static java.util.List<com.liferay.document.library.kernel.model.DLFolder> getFolders(
241 long groupId, long parentFolderId, int start, int end,
242 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFolder> obc)
243 throws com.liferay.portal.kernel.exception.PortalException {
244 return getService().getFolders(groupId, parentFolderId, start, end, obc);
245 }
246
247 public static java.util.List<com.liferay.document.library.kernel.model.DLFolder> getFolders(
248 long groupId, long parentFolderId, int status,
249 boolean includeMountfolders, int start, int end,
250 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFolder> obc)
251 throws com.liferay.portal.kernel.exception.PortalException {
252 return getService()
253 .getFolders(groupId, parentFolderId, status,
254 includeMountfolders, start, end, obc);
255 }
256
257 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
258 long groupId, long folderId, int status, boolean includeMountFolders,
259 int start, int end,
260 com.liferay.portal.kernel.util.OrderByComparator<?> obc)
261 throws com.liferay.portal.kernel.exception.PortalException {
262 return getService()
263 .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
264 status, includeMountFolders, start, end, obc);
265 }
266
267 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
268 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
269 boolean includeMountFolders, int start, int end,
270 com.liferay.portal.kernel.util.OrderByComparator<?> obc)
271 throws com.liferay.portal.kernel.exception.PortalException {
272 return getService()
273 .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
274 status, mimeTypes, includeMountFolders, start, end, obc);
275 }
276
277 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
278 long groupId, long folderId, java.lang.String[] mimeTypes,
279 boolean includeMountFolders,
280 com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition)
281 throws com.liferay.portal.kernel.exception.PortalException {
282 return getService()
283 .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
284 mimeTypes, includeMountFolders, queryDefinition);
285 }
286
287 public static java.util.List<com.liferay.document.library.kernel.model.DLFolder> getMountFolders(
288 long groupId, long parentFolderId, int start, int end,
289 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFolder> obc)
290 throws com.liferay.portal.kernel.exception.PortalException {
291 return getService()
292 .getMountFolders(groupId, parentFolderId, start, end, obc);
293 }
294
295 public static java.util.List<java.lang.Long> getSubfolderIds(long groupId,
296 long folderId, boolean recurse)
297 throws com.liferay.portal.kernel.exception.PortalException {
298 return getService().getSubfolderIds(groupId, folderId, recurse);
299 }
300
301 public static void deleteFolder(long folderId)
302 throws com.liferay.portal.kernel.exception.PortalException {
303 getService().deleteFolder(folderId);
304 }
305
306 public static void deleteFolder(long folderId, boolean includeTrashedEntries)
307 throws com.liferay.portal.kernel.exception.PortalException {
308 getService().deleteFolder(folderId, includeTrashedEntries);
309 }
310
311 public static void deleteFolder(long groupId, long parentFolderId,
312 java.lang.String name)
313 throws com.liferay.portal.kernel.exception.PortalException {
314 getService().deleteFolder(groupId, parentFolderId, name);
315 }
316
317
321 @Deprecated
322 public static void getSubfolderIds(
323 java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
324 throws com.liferay.portal.kernel.exception.PortalException {
325 getService().getSubfolderIds(folderIds, groupId, folderId);
326 }
327
328 public static void getSubfolderIds(
329 java.util.List<java.lang.Long> folderIds, long groupId, long folderId,
330 boolean recurse)
331 throws com.liferay.portal.kernel.exception.PortalException {
332 getService().getSubfolderIds(folderIds, groupId, folderId, recurse);
333 }
334
335 public static void unlockFolder(long folderId, java.lang.String lockUuid)
336 throws com.liferay.portal.kernel.exception.PortalException {
337 getService().unlockFolder(folderId, lockUuid);
338 }
339
340 public static void unlockFolder(long groupId, long parentFolderId,
341 java.lang.String name, java.lang.String lockUuid)
342 throws com.liferay.portal.kernel.exception.PortalException {
343 getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
344 }
345
346 public static DLFolderService getService() {
347 if (_service == null) {
348 _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
349
350 ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
351 "_service");
352 }
353
354 return _service;
355 }
356
357 private static DLFolderService _service;
358 }