001
014
015 package com.liferay.portlet.documentlibrary.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
034 public class DLFolderServiceUtil {
035
040
041
046 public static java.lang.String getBeanIdentifier() {
047 return getService().getBeanIdentifier();
048 }
049
050
055 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
056 getService().setBeanIdentifier(beanIdentifier);
057 }
058
059 public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
060 long groupId, long repositoryId, boolean mountPoint,
061 long parentFolderId, java.lang.String name,
062 java.lang.String description,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 return getService()
067 .addFolder(groupId, repositoryId, mountPoint,
068 parentFolderId, name, description, serviceContext);
069 }
070
071 public static void deleteFolder(long folderId)
072 throws com.liferay.portal.kernel.exception.PortalException,
073 com.liferay.portal.kernel.exception.SystemException {
074 getService().deleteFolder(folderId);
075 }
076
077 public static void deleteFolder(long folderId, boolean includeTrashedEntries)
078 throws com.liferay.portal.kernel.exception.PortalException,
079 com.liferay.portal.kernel.exception.SystemException {
080 getService().deleteFolder(folderId, includeTrashedEntries);
081 }
082
083 public static void deleteFolder(long groupId, long parentFolderId,
084 java.lang.String name)
085 throws com.liferay.portal.kernel.exception.PortalException,
086 com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteFolder(groupId, parentFolderId, name);
088 }
089
090 public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
091 long groupId, long folderId, int status, int start, int end)
092 throws com.liferay.portal.kernel.exception.PortalException,
093 com.liferay.portal.kernel.exception.SystemException {
094 return getService()
095 .getFileEntriesAndFileShortcuts(groupId, folderId, status,
096 start, end);
097 }
098
099 public static int getFileEntriesAndFileShortcutsCount(long groupId,
100 long folderId, int status)
101 throws com.liferay.portal.kernel.exception.SystemException {
102 return getService()
103 .getFileEntriesAndFileShortcutsCount(groupId, folderId,
104 status);
105 }
106
107 public static int getFileEntriesAndFileShortcutsCount(long groupId,
108 long folderId, int status, java.lang.String[] mimeTypes)
109 throws com.liferay.portal.kernel.exception.SystemException {
110 return getService()
111 .getFileEntriesAndFileShortcutsCount(groupId, folderId,
112 status, mimeTypes);
113 }
114
115 public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
116 long folderId)
117 throws com.liferay.portal.kernel.exception.PortalException,
118 com.liferay.portal.kernel.exception.SystemException {
119 return getService().getFolder(folderId);
120 }
121
122 public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
123 long groupId, long parentFolderId, java.lang.String name)
124 throws com.liferay.portal.kernel.exception.PortalException,
125 com.liferay.portal.kernel.exception.SystemException {
126 return getService().getFolder(groupId, parentFolderId, name);
127 }
128
129 public static java.util.List<java.lang.Long> getFolderIds(long groupId,
130 long folderId)
131 throws com.liferay.portal.kernel.exception.PortalException,
132 com.liferay.portal.kernel.exception.SystemException {
133 return getService().getFolderIds(groupId, folderId);
134 }
135
136 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
137 long groupId, long parentFolderId, int status,
138 boolean includeMountfolders, int start, int end,
139 com.liferay.portal.kernel.util.OrderByComparator obc)
140 throws com.liferay.portal.kernel.exception.PortalException,
141 com.liferay.portal.kernel.exception.SystemException {
142 return getService()
143 .getFolders(groupId, parentFolderId, status,
144 includeMountfolders, start, end, obc);
145 }
146
147 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
148 long groupId, long parentFolderId, int start, int end,
149 com.liferay.portal.kernel.util.OrderByComparator obc)
150 throws com.liferay.portal.kernel.exception.PortalException,
151 com.liferay.portal.kernel.exception.SystemException {
152 return getService().getFolders(groupId, parentFolderId, start, end, obc);
153 }
154
155 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
156 long groupId, long folderId, int status, boolean includeMountFolders,
157 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
158 throws com.liferay.portal.kernel.exception.PortalException,
159 com.liferay.portal.kernel.exception.SystemException {
160 return getService()
161 .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
162 status, includeMountFolders, start, end, obc);
163 }
164
165 public static int getFoldersAndFileEntriesAndFileShortcuts(long groupId,
166 long folderId, int status, java.lang.String[] mimeTypes,
167 boolean includeMountFolders)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException {
170 return getService()
171 .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
172 status, mimeTypes, includeMountFolders);
173 }
174
175 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
176 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
177 boolean includeMountFolders, int start, int end,
178 com.liferay.portal.kernel.util.OrderByComparator obc)
179 throws com.liferay.portal.kernel.exception.PortalException,
180 com.liferay.portal.kernel.exception.SystemException {
181 return getService()
182 .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
183 status, mimeTypes, includeMountFolders, start, end, obc);
184 }
185
186 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
187 long groupId, long folderId, int status, boolean includeMountFolders)
188 throws com.liferay.portal.kernel.exception.SystemException {
189 return getService()
190 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
191 folderId, status, includeMountFolders);
192 }
193
194 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
195 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
196 boolean includeMountFolders)
197 throws com.liferay.portal.kernel.exception.SystemException {
198 return getService()
199 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
200 folderId, status, mimeTypes, includeMountFolders);
201 }
202
203 public static int getFoldersCount(long groupId, long parentFolderId)
204 throws com.liferay.portal.kernel.exception.SystemException {
205 return getService().getFoldersCount(groupId, parentFolderId);
206 }
207
208 public static int getFoldersCount(long groupId, long parentFolderId,
209 int status, boolean includeMountfolders)
210 throws com.liferay.portal.kernel.exception.SystemException {
211 return getService()
212 .getFoldersCount(groupId, parentFolderId, status,
213 includeMountfolders);
214 }
215
216 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getMountFolders(
217 long groupId, long parentFolderId, int start, int end,
218 com.liferay.portal.kernel.util.OrderByComparator obc)
219 throws com.liferay.portal.kernel.exception.PortalException,
220 com.liferay.portal.kernel.exception.SystemException {
221 return getService()
222 .getMountFolders(groupId, parentFolderId, start, end, obc);
223 }
224
225 public static int getMountFoldersCount(long groupId, long parentFolderId)
226 throws 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 }