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, int status, boolean includeMountFolders,
140 int start, int end,
141 com.liferay.portal.kernel.util.OrderByComparator<?> obc)
142 throws com.liferay.portal.kernel.exception.PortalException {
143 return getService()
144 .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
145 status, includeMountFolders, start, end, obc);
146 }
147
148 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
149 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
150 boolean includeMountFolders, 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, mimeTypes, includeMountFolders, start, end, obc);
156 }
157
158 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
159 long groupId, long folderId, int status, boolean includeMountFolders)
160 throws com.liferay.portal.kernel.exception.PortalException {
161 return getService()
162 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
163 folderId, status, includeMountFolders);
164 }
165
166 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
167 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
168 boolean includeMountFolders)
169 throws com.liferay.portal.kernel.exception.PortalException {
170 return getService()
171 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
172 folderId, status, mimeTypes, includeMountFolders);
173 }
174
175 public static int getFoldersCount(long groupId, long parentFolderId)
176 throws com.liferay.portal.kernel.exception.PortalException {
177 return getService().getFoldersCount(groupId, parentFolderId);
178 }
179
180 public static int getFoldersCount(long groupId, long parentFolderId,
181 int status, boolean includeMountfolders)
182 throws com.liferay.portal.kernel.exception.PortalException {
183 return getService()
184 .getFoldersCount(groupId, parentFolderId, status,
185 includeMountfolders);
186 }
187
188 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getMountFolders(
189 long groupId, long parentFolderId, int start, int end,
190 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFolder> obc)
191 throws com.liferay.portal.kernel.exception.PortalException {
192 return getService()
193 .getMountFolders(groupId, parentFolderId, start, end, obc);
194 }
195
196 public static int getMountFoldersCount(long groupId, long parentFolderId)
197 throws com.liferay.portal.kernel.exception.PortalException {
198 return getService().getMountFoldersCount(groupId, parentFolderId);
199 }
200
201
205 @Deprecated
206 public static void getSubfolderIds(
207 java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
208 throws com.liferay.portal.kernel.exception.PortalException {
209 getService().getSubfolderIds(folderIds, groupId, folderId);
210 }
211
212 public static void getSubfolderIds(
213 java.util.List<java.lang.Long> folderIds, long groupId, long folderId,
214 boolean recurse)
215 throws com.liferay.portal.kernel.exception.PortalException {
216 getService().getSubfolderIds(folderIds, groupId, folderId, recurse);
217 }
218
219 public static java.util.List<java.lang.Long> getSubfolderIds(long groupId,
220 long folderId, boolean recurse)
221 throws com.liferay.portal.kernel.exception.PortalException {
222 return getService().getSubfolderIds(groupId, folderId, recurse);
223 }
224
225 public static boolean hasFolderLock(long folderId)
226 throws com.liferay.portal.kernel.exception.PortalException {
227 return getService().hasFolderLock(folderId);
228 }
229
230 public static boolean hasInheritableLock(long folderId)
231 throws com.liferay.portal.kernel.exception.PortalException {
232 return getService().hasInheritableLock(folderId);
233 }
234
235 public static boolean isFolderLocked(long folderId) {
236 return getService().isFolderLocked(folderId);
237 }
238
239 public static com.liferay.portal.kernel.lock.Lock lockFolder(long folderId)
240 throws com.liferay.portal.kernel.exception.PortalException {
241 return getService().lockFolder(folderId);
242 }
243
244 public static com.liferay.portal.kernel.lock.Lock lockFolder(
245 long folderId, java.lang.String owner, boolean inheritable,
246 long expirationTime)
247 throws com.liferay.portal.kernel.exception.PortalException {
248 return getService()
249 .lockFolder(folderId, owner, inheritable, expirationTime);
250 }
251
252 public static com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
253 long folderId, long parentFolderId,
254 com.liferay.portal.service.ServiceContext serviceContext)
255 throws com.liferay.portal.kernel.exception.PortalException {
256 return getService().moveFolder(folderId, parentFolderId, serviceContext);
257 }
258
259 public static com.liferay.portal.kernel.lock.Lock refreshFolderLock(
260 java.lang.String lockUuid, long companyId, long expirationTime)
261 throws com.liferay.portal.kernel.exception.PortalException {
262 return getService()
263 .refreshFolderLock(lockUuid, companyId, expirationTime);
264 }
265
266
271 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
272 getService().setBeanIdentifier(beanIdentifier);
273 }
274
275 public static void unlockFolder(long folderId, java.lang.String lockUuid)
276 throws com.liferay.portal.kernel.exception.PortalException {
277 getService().unlockFolder(folderId, lockUuid);
278 }
279
280 public static void unlockFolder(long groupId, long parentFolderId,
281 java.lang.String name, java.lang.String lockUuid)
282 throws com.liferay.portal.kernel.exception.PortalException {
283 getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
284 }
285
286
291 @Deprecated
292 public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
293 long folderId, java.lang.String name, java.lang.String description,
294 long defaultFileEntryTypeId,
295 java.util.List<java.lang.Long> fileEntryTypeIds,
296 boolean overrideFileEntryTypes,
297 com.liferay.portal.service.ServiceContext serviceContext)
298 throws com.liferay.portal.kernel.exception.PortalException {
299 return getService()
300 .updateFolder(folderId, name, description,
301 defaultFileEntryTypeId, fileEntryTypeIds, overrideFileEntryTypes,
302 serviceContext);
303 }
304
305 public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
306 long folderId, java.lang.String name, java.lang.String description,
307 long defaultFileEntryTypeId,
308 java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
309 com.liferay.portal.service.ServiceContext serviceContext)
310 throws com.liferay.portal.kernel.exception.PortalException {
311 return getService()
312 .updateFolder(folderId, name, description,
313 defaultFileEntryTypeId, fileEntryTypeIds, restrictionType,
314 serviceContext);
315 }
316
317 public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
318 long folderId, long parentFolderId, java.lang.String name,
319 java.lang.String description, long defaultFileEntryTypeId,
320 java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
321 com.liferay.portal.service.ServiceContext serviceContext)
322 throws com.liferay.portal.kernel.exception.PortalException {
323 return getService()
324 .updateFolder(folderId, parentFolderId, name, description,
325 defaultFileEntryTypeId, fileEntryTypeIds, restrictionType,
326 serviceContext);
327 }
328
329 public static boolean verifyInheritableLock(long folderId,
330 java.lang.String lockUuid)
331 throws com.liferay.portal.kernel.exception.PortalException {
332 return getService().verifyInheritableLock(folderId, lockUuid);
333 }
334
335 public static DLFolderService getService() {
336 if (_service == null) {
337 _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
338
339 ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
340 "_service");
341 }
342
343 return _service;
344 }
345
346
349 @Deprecated
350 public void setService(DLFolderService service) {
351 }
352
353 private static DLFolderService _service;
354 }