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