1
14
15 package com.liferay.portlet.documentlibrary.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class DLFolderServiceUtil {
40 public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
41 long groupId, long parentFolderId, java.lang.String name,
42 java.lang.String description,
43 com.liferay.portal.service.ServiceContext serviceContext)
44 throws com.liferay.portal.kernel.exception.PortalException,
45 com.liferay.portal.kernel.exception.SystemException {
46 return getService()
47 .addFolder(groupId, parentFolderId, name, description,
48 serviceContext);
49 }
50
51 public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
52 long groupId, long sourceFolderId, long parentFolderId,
53 java.lang.String name, java.lang.String description,
54 com.liferay.portal.service.ServiceContext serviceContext)
55 throws com.liferay.portal.kernel.exception.PortalException,
56 com.liferay.portal.kernel.exception.SystemException,
57 java.rmi.RemoteException {
58 return getService()
59 .copyFolder(groupId, sourceFolderId, parentFolderId, name,
60 description, serviceContext);
61 }
62
63 public static void deleteFolder(long folderId)
64 throws com.liferay.portal.kernel.exception.PortalException,
65 com.liferay.portal.kernel.exception.SystemException,
66 java.rmi.RemoteException {
67 getService().deleteFolder(folderId);
68 }
69
70 public static void deleteFolder(long groupId, long parentFolderId,
71 java.lang.String name)
72 throws com.liferay.portal.kernel.exception.PortalException,
73 com.liferay.portal.kernel.exception.SystemException,
74 java.rmi.RemoteException {
75 getService().deleteFolder(groupId, parentFolderId, name);
76 }
77
78 public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
79 long groupId, java.util.List<java.lang.Long> folderIds, int status,
80 int start, int end)
81 throws com.liferay.portal.kernel.exception.SystemException {
82 return getService()
83 .getFileEntriesAndFileShortcuts(groupId, folderIds, status,
84 start, end);
85 }
86
87 public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
88 long groupId, long folderId, int status, int start, int end)
89 throws com.liferay.portal.kernel.exception.SystemException {
90 return getService()
91 .getFileEntriesAndFileShortcuts(groupId, folderId, status,
92 start, end);
93 }
94
95 public static int getFileEntriesAndFileShortcutsCount(long groupId,
96 java.util.List<java.lang.Long> folderIds, int status)
97 throws com.liferay.portal.kernel.exception.SystemException {
98 return getService()
99 .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 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
133 long groupId, long parentFolderId)
134 throws com.liferay.portal.kernel.exception.SystemException {
135 return getService().getFolders(groupId, parentFolderId);
136 }
137
138 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
139 long groupId, long parentFolderId, int start, int end)
140 throws com.liferay.portal.kernel.exception.SystemException {
141 return getService().getFolders(groupId, parentFolderId, start, end);
142 }
143
144 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
145 long groupId, java.util.List<java.lang.Long> folderIds, int status,
146 int start, int end)
147 throws com.liferay.portal.kernel.exception.SystemException {
148 return getService()
149 .getFoldersAndFileEntriesAndFileShortcuts(groupId,
150 folderIds, status, start, end);
151 }
152
153 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
154 long groupId, long folderId, int status, int start, int end)
155 throws com.liferay.portal.kernel.exception.PortalException,
156 com.liferay.portal.kernel.exception.SystemException {
157 return getService()
158 .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
159 status, start, end);
160 }
161
162 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
163 long groupId, java.util.List<java.lang.Long> folderIds, int status)
164 throws com.liferay.portal.kernel.exception.SystemException {
165 return getService()
166 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
167 folderIds, status);
168 }
169
170 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
171 long groupId, long folderId, int status)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException {
174 return getService()
175 .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
176 folderId, status);
177 }
178
179 public static int getFoldersCount(long groupId, long parentFolderId)
180 throws com.liferay.portal.kernel.exception.SystemException {
181 return getService().getFoldersCount(groupId, parentFolderId);
182 }
183
184 public static void getSubfolderIds(
185 java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException {
188 getService().getSubfolderIds(folderIds, groupId, folderId);
189 }
190
191 public static boolean hasInheritableLock(long folderId)
192 throws com.liferay.portal.kernel.exception.PortalException,
193 com.liferay.portal.kernel.exception.SystemException {
194 return getService().hasInheritableLock(folderId);
195 }
196
197 public static com.liferay.portal.model.Lock lockFolder(long folderId)
198 throws com.liferay.portal.kernel.exception.PortalException,
199 com.liferay.portal.kernel.exception.SystemException,
200 java.rmi.RemoteException {
201 return getService().lockFolder(folderId);
202 }
203
204 public static com.liferay.portal.model.Lock lockFolder(long folderId,
205 java.lang.String owner, boolean inheritable, long expirationTime)
206 throws com.liferay.portal.kernel.exception.PortalException,
207 com.liferay.portal.kernel.exception.SystemException,
208 java.rmi.RemoteException {
209 return getService()
210 .lockFolder(folderId, owner, inheritable, expirationTime);
211 }
212
213 public static com.liferay.portal.model.Lock refreshFolderLock(
214 java.lang.String lockUuid, long expirationTime)
215 throws com.liferay.portal.kernel.exception.PortalException,
216 com.liferay.portal.kernel.exception.SystemException {
217 return getService().refreshFolderLock(lockUuid, expirationTime);
218 }
219
220 public static void unlockFolder(long groupId, long folderId,
221 java.lang.String lockUuid)
222 throws com.liferay.portal.kernel.exception.PortalException,
223 com.liferay.portal.kernel.exception.SystemException {
224 getService().unlockFolder(groupId, folderId, lockUuid);
225 }
226
227 public static void unlockFolder(long groupId, long parentFolderId,
228 java.lang.String name, java.lang.String lockUuid)
229 throws com.liferay.portal.kernel.exception.PortalException,
230 com.liferay.portal.kernel.exception.SystemException {
231 getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
232 }
233
234 public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
235 long folderId, long parentFolderId, java.lang.String name,
236 java.lang.String description,
237 com.liferay.portal.service.ServiceContext serviceContext)
238 throws com.liferay.portal.kernel.exception.PortalException,
239 com.liferay.portal.kernel.exception.SystemException,
240 java.rmi.RemoteException {
241 return getService()
242 .updateFolder(folderId, parentFolderId, name, description,
243 serviceContext);
244 }
245
246 public static boolean verifyInheritableLock(long folderId,
247 java.lang.String lockUuid)
248 throws com.liferay.portal.kernel.exception.PortalException,
249 com.liferay.portal.kernel.exception.SystemException {
250 return getService().verifyInheritableLock(folderId, lockUuid);
251 }
252
253 public static DLFolderService getService() {
254 if (_service == null) {
255 _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
256 }
257
258 return _service;
259 }
260
261 public void setService(DLFolderService service) {
262 _service = service;
263 }
264
265 private static DLFolderService _service;
266 }