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