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