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