001
014
015 package com.liferay.portlet.documentlibrary.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.ListUtil;
020
021 import com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil;
022
023 import java.rmi.RemoteException;
024
025
065 public class DLFolderServiceSoap {
066 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap addFolder(
067 long groupId, long repositoryId, boolean mountPoint,
068 long parentFolderId, java.lang.String name,
069 java.lang.String description,
070 com.liferay.portal.service.ServiceContext serviceContext)
071 throws RemoteException {
072 try {
073 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.addFolder(groupId,
074 repositoryId, mountPoint, parentFolderId, name,
075 description, serviceContext);
076
077 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
078 }
079 catch (Exception e) {
080 _log.error(e, e);
081
082 throw new RemoteException(e.getMessage());
083 }
084 }
085
086 public static void deleteFolder(long folderId) throws RemoteException {
087 try {
088 DLFolderServiceUtil.deleteFolder(folderId);
089 }
090 catch (Exception e) {
091 _log.error(e, e);
092
093 throw new RemoteException(e.getMessage());
094 }
095 }
096
097 public static void deleteFolder(long folderId, boolean includeTrashedEntries)
098 throws RemoteException {
099 try {
100 DLFolderServiceUtil.deleteFolder(folderId, includeTrashedEntries);
101 }
102 catch (Exception e) {
103 _log.error(e, e);
104
105 throw new RemoteException(e.getMessage());
106 }
107 }
108
109 public static void deleteFolder(long groupId, long parentFolderId,
110 java.lang.String name) throws RemoteException {
111 try {
112 DLFolderServiceUtil.deleteFolder(groupId, parentFolderId, name);
113 }
114 catch (Exception e) {
115 _log.error(e, e);
116
117 throw new RemoteException(e.getMessage());
118 }
119 }
120
121 public static int getFileEntriesAndFileShortcutsCount(long groupId,
122 long folderId, int status) throws RemoteException {
123 try {
124 int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
125 folderId, status);
126
127 return returnValue;
128 }
129 catch (Exception e) {
130 _log.error(e, e);
131
132 throw new RemoteException(e.getMessage());
133 }
134 }
135
136 public static int getFileEntriesAndFileShortcutsCount(long groupId,
137 long folderId, int status, java.lang.String[] mimeTypes)
138 throws RemoteException {
139 try {
140 int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
141 folderId, status, mimeTypes);
142
143 return returnValue;
144 }
145 catch (Exception e) {
146 _log.error(e, e);
147
148 throw new RemoteException(e.getMessage());
149 }
150 }
151
152 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
153 long folderId) throws RemoteException {
154 try {
155 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(folderId);
156
157 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
158 }
159 catch (Exception e) {
160 _log.error(e, e);
161
162 throw new RemoteException(e.getMessage());
163 }
164 }
165
166 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
167 long groupId, long parentFolderId, java.lang.String name)
168 throws RemoteException {
169 try {
170 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(groupId,
171 parentFolderId, name);
172
173 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
174 }
175 catch (Exception e) {
176 _log.error(e, e);
177
178 throw new RemoteException(e.getMessage());
179 }
180 }
181
182 public static java.lang.Long[] getFolderIds(long groupId, long folderId)
183 throws RemoteException {
184 try {
185 java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getFolderIds(groupId,
186 folderId);
187
188 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
189 }
190 catch (Exception e) {
191 _log.error(e, e);
192
193 throw new RemoteException(e.getMessage());
194 }
195 }
196
197 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
198 long groupId, long parentFolderId, int status,
199 boolean includeMountfolders, int start, int end,
200 com.liferay.portal.kernel.util.OrderByComparator obc)
201 throws RemoteException {
202 try {
203 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
204 DLFolderServiceUtil.getFolders(groupId, parentFolderId, status,
205 includeMountfolders, start, end, obc);
206
207 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
208 }
209 catch (Exception e) {
210 _log.error(e, e);
211
212 throw new RemoteException(e.getMessage());
213 }
214 }
215
216 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
217 long groupId, long parentFolderId, int start, int end,
218 com.liferay.portal.kernel.util.OrderByComparator obc)
219 throws RemoteException {
220 try {
221 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
222 DLFolderServiceUtil.getFolders(groupId, parentFolderId, start,
223 end, obc);
224
225 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
226 }
227 catch (Exception e) {
228 _log.error(e, e);
229
230 throw new RemoteException(e.getMessage());
231 }
232 }
233
234 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
235 long groupId, long folderId, int status, boolean includeMountFolders)
236 throws RemoteException {
237 try {
238 int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
239 folderId, status, includeMountFolders);
240
241 return returnValue;
242 }
243 catch (Exception e) {
244 _log.error(e, e);
245
246 throw new RemoteException(e.getMessage());
247 }
248 }
249
250 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
251 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
252 boolean includeMountFolders) throws RemoteException {
253 try {
254 int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
255 folderId, status, mimeTypes, includeMountFolders);
256
257 return returnValue;
258 }
259 catch (Exception e) {
260 _log.error(e, e);
261
262 throw new RemoteException(e.getMessage());
263 }
264 }
265
266 public static int getFoldersCount(long groupId, long parentFolderId)
267 throws RemoteException {
268 try {
269 int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
270 parentFolderId);
271
272 return returnValue;
273 }
274 catch (Exception e) {
275 _log.error(e, e);
276
277 throw new RemoteException(e.getMessage());
278 }
279 }
280
281 public static int getFoldersCount(long groupId, long parentFolderId,
282 int status, boolean includeMountfolders) throws RemoteException {
283 try {
284 int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
285 parentFolderId, status, includeMountfolders);
286
287 return returnValue;
288 }
289 catch (Exception e) {
290 _log.error(e, e);
291
292 throw new RemoteException(e.getMessage());
293 }
294 }
295
296 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getMountFolders(
297 long groupId, long parentFolderId, int start, int end,
298 com.liferay.portal.kernel.util.OrderByComparator obc)
299 throws RemoteException {
300 try {
301 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
302 DLFolderServiceUtil.getMountFolders(groupId, parentFolderId,
303 start, end, obc);
304
305 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
306 }
307 catch (Exception e) {
308 _log.error(e, e);
309
310 throw new RemoteException(e.getMessage());
311 }
312 }
313
314 public static int getMountFoldersCount(long groupId, long parentFolderId)
315 throws RemoteException {
316 try {
317 int returnValue = DLFolderServiceUtil.getMountFoldersCount(groupId,
318 parentFolderId);
319
320 return returnValue;
321 }
322 catch (Exception e) {
323 _log.error(e, e);
324
325 throw new RemoteException(e.getMessage());
326 }
327 }
328
329 public static void getSubfolderIds(Long[] folderIds, long groupId,
330 long folderId) throws RemoteException {
331 try {
332 DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
333 groupId, folderId);
334 }
335 catch (Exception e) {
336 _log.error(e, e);
337
338 throw new RemoteException(e.getMessage());
339 }
340 }
341
342 public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
343 boolean recurse) throws RemoteException {
344 try {
345 java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getSubfolderIds(groupId,
346 folderId, recurse);
347
348 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
349 }
350 catch (Exception e) {
351 _log.error(e, e);
352
353 throw new RemoteException(e.getMessage());
354 }
355 }
356
357 public static boolean hasFolderLock(long folderId)
358 throws RemoteException {
359 try {
360 boolean returnValue = DLFolderServiceUtil.hasFolderLock(folderId);
361
362 return returnValue;
363 }
364 catch (Exception e) {
365 _log.error(e, e);
366
367 throw new RemoteException(e.getMessage());
368 }
369 }
370
371 public static boolean hasInheritableLock(long folderId)
372 throws RemoteException {
373 try {
374 boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
375
376 return returnValue;
377 }
378 catch (Exception e) {
379 _log.error(e, e);
380
381 throw new RemoteException(e.getMessage());
382 }
383 }
384
385 public static boolean isFolderLocked(long folderId)
386 throws RemoteException {
387 try {
388 boolean returnValue = DLFolderServiceUtil.isFolderLocked(folderId);
389
390 return returnValue;
391 }
392 catch (Exception e) {
393 _log.error(e, e);
394
395 throw new RemoteException(e.getMessage());
396 }
397 }
398
399 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap moveFolder(
400 long folderId, long parentFolderId,
401 com.liferay.portal.service.ServiceContext serviceContext)
402 throws RemoteException {
403 try {
404 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.moveFolder(folderId,
405 parentFolderId, serviceContext);
406
407 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
408 }
409 catch (Exception e) {
410 _log.error(e, e);
411
412 throw new RemoteException(e.getMessage());
413 }
414 }
415
416 public static void unlockFolder(long groupId, long parentFolderId,
417 java.lang.String name, java.lang.String lockUuid)
418 throws RemoteException {
419 try {
420 DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
421 lockUuid);
422 }
423 catch (Exception e) {
424 _log.error(e, e);
425
426 throw new RemoteException(e.getMessage());
427 }
428 }
429
430 public static void unlockFolder(long folderId, java.lang.String lockUuid)
431 throws RemoteException {
432 try {
433 DLFolderServiceUtil.unlockFolder(folderId, lockUuid);
434 }
435 catch (Exception e) {
436 _log.error(e, e);
437
438 throw new RemoteException(e.getMessage());
439 }
440 }
441
442 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
443 long folderId, java.lang.String name, java.lang.String description,
444 long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
445 boolean overrideFileEntryTypes,
446 com.liferay.portal.service.ServiceContext serviceContext)
447 throws RemoteException {
448 try {
449 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
450 name, description, defaultFileEntryTypeId,
451 ListUtil.toList(fileEntryTypeIds), overrideFileEntryTypes,
452 serviceContext);
453
454 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
455 }
456 catch (Exception e) {
457 _log.error(e, e);
458
459 throw new RemoteException(e.getMessage());
460 }
461 }
462
463 public static boolean verifyInheritableLock(long folderId,
464 java.lang.String lockUuid) throws RemoteException {
465 try {
466 boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
467 lockUuid);
468
469 return returnValue;
470 }
471 catch (Exception e) {
472 _log.error(e, e);
473
474 throw new RemoteException(e.getMessage());
475 }
476 }
477
478 private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
479 }