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.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class DLFolderServiceUtil {
035
040 public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
041 long groupId, long parentFolderId, java.lang.String name,
042 java.lang.String description,
043 com.liferay.portal.service.ServiceContext serviceContext)
044 throws com.liferay.portal.kernel.exception.PortalException,
045 com.liferay.portal.kernel.exception.SystemException {
046 return getService()
047 .addFolder(groupId, parentFolderId, name, description,
048 serviceContext);
049 }
050
051 public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
052 long groupId, long sourceFolderId, long parentFolderId,
053 java.lang.String name, java.lang.String description,
054 com.liferay.portal.service.ServiceContext serviceContext)
055 throws com.liferay.portal.kernel.exception.PortalException,
056 com.liferay.portal.kernel.exception.SystemException,
057 java.rmi.RemoteException {
058 return getService()
059 .copyFolder(groupId, sourceFolderId, parentFolderId, name,
060 description, serviceContext);
061 }
062
063 public static void deleteFolder(long folderId)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException,
066 java.rmi.RemoteException {
067 getService().deleteFolder(folderId);
068 }
069
070 public static void deleteFolder(long groupId, long parentFolderId,
071 java.lang.String name)
072 throws com.liferay.portal.kernel.exception.PortalException,
073 com.liferay.portal.kernel.exception.SystemException,
074 java.rmi.RemoteException {
075 getService().deleteFolder(groupId, parentFolderId, name);
076 }
077
078 public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
079 long groupId, java.util.List<java.lang.Long> folderIds, int status,
080 int start, int end)
081 throws com.liferay.portal.kernel.exception.SystemException {
082 return getService()
083 .getFileEntriesAndFileShortcuts(groupId, folderIds, status,
084 start, end);
085 }
086
087 public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
088 long groupId, long folderId, int status, int start, int end)
089 throws com.liferay.portal.kernel.exception.SystemException {
090 return getService()
091 .getFileEntriesAndFileShortcuts(groupId, folderId, status,
092 start, end);
093 }
094
095 public static int getFileEntriesAndFileShortcutsCount(long groupId,
096 java.util.List<java.lang.Long> folderIds, int status)
097 throws com.liferay.portal.kernel.exception.SystemException {
098 return getService()
099 .getFileEntriesAndFileShortcutsCount(groupId, folderIds,
100 status);
101 }
102
103 public static int getFileEntriesAndFileShortcutsCount(long groupId,
104 long folderId, int status)
105 throws com.liferay.portal.kernel.exception.SystemException {
106 return getService()
107 .getFileEntriesAndFileShortcutsCount(groupId, folderId,
108 status);
109 }
110
111 public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
112 long folderId)
113 throws com.liferay.portal.kernel.exception.PortalException,
114 com.liferay.portal.kernel.exception.SystemException {
115 return getService().getFolder(folderId);
116 }
117
118 public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
119 long groupId, long parentFolderId, java.lang.String name)
120 throws com.liferay.portal.kernel.exception.PortalException,
121 com.liferay.portal.kernel.exception.SystemException {
122 return getService().getFolder(groupId, parentFolderId, name);
123 }
124
125 public static long getFolderId(long groupId, long parentFolderId,
126 java.lang.String name)
127 throws com.liferay.portal.kernel.exception.PortalException,
128 com.liferay.portal.kernel.exception.SystemException {
129 return getService().getFolderId(groupId, parentFolderId, name);
130 }
131
132 public static long[] getFolderIds(long groupId, long folderId)
133 throws com.liferay.portal.kernel.exception.SystemException {
134 return getService().getFolderIds(groupId, folderId);
135 }
136
137 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
138 long groupId, long parentFolderId)
139 throws com.liferay.portal.kernel.exception.SystemException {
140 return getService().getFolders(groupId, parentFolderId);
141 }
142
143 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
144 long groupId, long parentFolderId, int start, int end)
145 throws com.liferay.portal.kernel.exception.SystemException {
146 return getService().getFolders(groupId, parentFolderId, start, end);
147 }
148
149 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
150 long groupId, java.util.List<java.lang.Long> folderIds, int status,
151 int start, int end)
152 throws com.liferay.portal.kernel.exception.SystemException {
153 return getService()
154 .getFoldersAndFileEntriesAndFileShortcuts(groupId,
155 folderIds, status, start, end);
156 }
157
158 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
159 long groupId, long folderId, int status, int start, int end)
160 throws com.liferay.portal.kernel.exception.PortalException,
161 com.liferay.portal.kernel.exception.SystemException {
162 return getService()
163 .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
164 status, start, end);
165 }
166
167 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
168 long groupId, java.util.List<java.lang.Long> folderIds, int status)
169 throws com.liferay.portal.kernel.exception.SystemException {
170 return getService()
171 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
172 folderIds, status);
173 }
174
175 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
176 long groupId, long folderId, int status)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 return getService()
180 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
181 folderId, status);
182 }
183
184 public static int getFoldersCount(long groupId, long parentFolderId)
185 throws com.liferay.portal.kernel.exception.SystemException {
186 return getService().getFoldersCount(groupId, parentFolderId);
187 }
188
189 public static void getSubfolderIds(
190 java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
191 throws com.liferay.portal.kernel.exception.SystemException {
192 getService().getSubfolderIds(folderIds, groupId, folderId);
193 }
194
195 public static void getSubfolderIds(
196 java.util.List<java.lang.Long> folderIds, long groupId, long folderId,
197 boolean recurse)
198 throws com.liferay.portal.kernel.exception.SystemException {
199 getService().getSubfolderIds(folderIds, groupId, folderId, recurse);
200 }
201
202 public static boolean hasInheritableLock(long folderId)
203 throws com.liferay.portal.kernel.exception.PortalException,
204 com.liferay.portal.kernel.exception.SystemException {
205 return getService().hasInheritableLock(folderId);
206 }
207
208 public static com.liferay.portal.model.Lock lockFolder(long folderId)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException,
211 java.rmi.RemoteException {
212 return getService().lockFolder(folderId);
213 }
214
215 public static com.liferay.portal.model.Lock lockFolder(long folderId,
216 java.lang.String owner, boolean inheritable, long expirationTime)
217 throws com.liferay.portal.kernel.exception.PortalException,
218 com.liferay.portal.kernel.exception.SystemException,
219 java.rmi.RemoteException {
220 return getService()
221 .lockFolder(folderId, owner, inheritable, expirationTime);
222 }
223
224 public static com.liferay.portal.model.Lock refreshFolderLock(
225 java.lang.String lockUuid, long expirationTime)
226 throws com.liferay.portal.kernel.exception.PortalException,
227 com.liferay.portal.kernel.exception.SystemException {
228 return getService().refreshFolderLock(lockUuid, expirationTime);
229 }
230
231 public static void unlockFolder(long groupId, long folderId,
232 java.lang.String lockUuid)
233 throws com.liferay.portal.kernel.exception.PortalException,
234 com.liferay.portal.kernel.exception.SystemException {
235 getService().unlockFolder(groupId, folderId, lockUuid);
236 }
237
238 public static void unlockFolder(long groupId, long parentFolderId,
239 java.lang.String name, java.lang.String lockUuid)
240 throws com.liferay.portal.kernel.exception.PortalException,
241 com.liferay.portal.kernel.exception.SystemException {
242 getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
243 }
244
245 public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
246 long folderId, long parentFolderId, java.lang.String name,
247 java.lang.String description,
248 com.liferay.portal.service.ServiceContext serviceContext)
249 throws com.liferay.portal.kernel.exception.PortalException,
250 com.liferay.portal.kernel.exception.SystemException,
251 java.rmi.RemoteException {
252 return getService()
253 .updateFolder(folderId, parentFolderId, name, description,
254 serviceContext);
255 }
256
257 public static boolean verifyInheritableLock(long folderId,
258 java.lang.String lockUuid)
259 throws com.liferay.portal.kernel.exception.PortalException,
260 com.liferay.portal.kernel.exception.SystemException {
261 return getService().verifyInheritableLock(folderId, lockUuid);
262 }
263
264 public static DLFolderService getService() {
265 if (_service == null) {
266 _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
267
268 ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
269 "_service");
270 MethodCache.remove(DLFolderService.class);
271 }
272
273 return _service;
274 }
275
276 public void setService(DLFolderService service) {
277 MethodCache.remove(DLFolderService.class);
278
279 _service = service;
280
281 ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
282 "_service");
283 MethodCache.remove(DLFolderService.class);
284 }
285
286 private static DLFolderService _service;
287 }