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.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.http.TunnelUtil;
023
024 import com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil;
025
026
056 public class DLFolderServiceHttp {
057 public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
058 HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
059 java.lang.String name, java.lang.String description,
060 com.liferay.portal.service.ServiceContext serviceContext)
061 throws com.liferay.portal.kernel.exception.PortalException,
062 com.liferay.portal.kernel.exception.SystemException {
063 try {
064 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
065 "addFolder", long.class, long.class,
066 java.lang.String.class, java.lang.String.class,
067 com.liferay.portal.service.ServiceContext.class);
068
069 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
070 parentFolderId, name, description, serviceContext);
071
072 Object returnObj = null;
073
074 try {
075 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
076 }
077 catch (Exception e) {
078 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
079 throw (com.liferay.portal.kernel.exception.PortalException)e;
080 }
081
082 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
083 throw (com.liferay.portal.kernel.exception.SystemException)e;
084 }
085
086 throw new com.liferay.portal.kernel.exception.SystemException(e);
087 }
088
089 return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
090 }
091 catch (com.liferay.portal.kernel.exception.SystemException se) {
092 _log.error(se, se);
093
094 throw se;
095 }
096 }
097
098 public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
099 HttpPrincipal httpPrincipal, long groupId, long sourceFolderId,
100 long parentFolderId, java.lang.String name,
101 java.lang.String description,
102 com.liferay.portal.service.ServiceContext serviceContext)
103 throws com.liferay.portal.kernel.exception.PortalException,
104 com.liferay.portal.kernel.exception.SystemException,
105 java.rmi.RemoteException {
106 try {
107 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
108 "copyFolder", long.class, long.class, long.class,
109 java.lang.String.class, java.lang.String.class,
110 com.liferay.portal.service.ServiceContext.class);
111
112 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
113 sourceFolderId, parentFolderId, name, description,
114 serviceContext);
115
116 Object returnObj = null;
117
118 try {
119 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
120 }
121 catch (Exception e) {
122 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
123 throw (com.liferay.portal.kernel.exception.PortalException)e;
124 }
125
126 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
127 throw (com.liferay.portal.kernel.exception.SystemException)e;
128 }
129
130 if (e instanceof java.rmi.RemoteException) {
131 throw (java.rmi.RemoteException)e;
132 }
133
134 throw new com.liferay.portal.kernel.exception.SystemException(e);
135 }
136
137 return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
138 }
139 catch (com.liferay.portal.kernel.exception.SystemException se) {
140 _log.error(se, se);
141
142 throw se;
143 }
144 }
145
146 public static void deleteFolder(HttpPrincipal httpPrincipal, long folderId)
147 throws com.liferay.portal.kernel.exception.PortalException,
148 com.liferay.portal.kernel.exception.SystemException,
149 java.rmi.RemoteException {
150 try {
151 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
152 "deleteFolder", long.class);
153
154 MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
155
156 try {
157 TunnelUtil.invoke(httpPrincipal, methodHandler);
158 }
159 catch (Exception e) {
160 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
161 throw (com.liferay.portal.kernel.exception.PortalException)e;
162 }
163
164 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
165 throw (com.liferay.portal.kernel.exception.SystemException)e;
166 }
167
168 if (e instanceof java.rmi.RemoteException) {
169 throw (java.rmi.RemoteException)e;
170 }
171
172 throw new com.liferay.portal.kernel.exception.SystemException(e);
173 }
174 }
175 catch (com.liferay.portal.kernel.exception.SystemException se) {
176 _log.error(se, se);
177
178 throw se;
179 }
180 }
181
182 public static void deleteFolder(HttpPrincipal httpPrincipal, long groupId,
183 long parentFolderId, java.lang.String name)
184 throws com.liferay.portal.kernel.exception.PortalException,
185 com.liferay.portal.kernel.exception.SystemException,
186 java.rmi.RemoteException {
187 try {
188 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
189 "deleteFolder", long.class, long.class,
190 java.lang.String.class);
191
192 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
193 parentFolderId, name);
194
195 try {
196 TunnelUtil.invoke(httpPrincipal, methodHandler);
197 }
198 catch (Exception e) {
199 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
200 throw (com.liferay.portal.kernel.exception.PortalException)e;
201 }
202
203 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
204 throw (com.liferay.portal.kernel.exception.SystemException)e;
205 }
206
207 if (e instanceof java.rmi.RemoteException) {
208 throw (java.rmi.RemoteException)e;
209 }
210
211 throw new com.liferay.portal.kernel.exception.SystemException(e);
212 }
213 }
214 catch (com.liferay.portal.kernel.exception.SystemException se) {
215 _log.error(se, se);
216
217 throw se;
218 }
219 }
220
221 public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
222 HttpPrincipal httpPrincipal, long groupId,
223 java.util.List<java.lang.Long> folderIds, int status, int start, int end)
224 throws com.liferay.portal.kernel.exception.SystemException {
225 try {
226 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
227 "getFileEntriesAndFileShortcuts", long.class,
228 java.util.List.class, int.class, int.class, int.class);
229
230 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
231 folderIds, status, start, end);
232
233 Object returnObj = null;
234
235 try {
236 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
237 }
238 catch (Exception e) {
239 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
240 throw (com.liferay.portal.kernel.exception.SystemException)e;
241 }
242
243 throw new com.liferay.portal.kernel.exception.SystemException(e);
244 }
245
246 return (java.util.List<java.lang.Object>)returnObj;
247 }
248 catch (com.liferay.portal.kernel.exception.SystemException se) {
249 _log.error(se, se);
250
251 throw se;
252 }
253 }
254
255 public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
256 HttpPrincipal httpPrincipal, long groupId, long folderId, int status,
257 int start, int end)
258 throws com.liferay.portal.kernel.exception.SystemException {
259 try {
260 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
261 "getFileEntriesAndFileShortcuts", long.class, long.class,
262 int.class, int.class, int.class);
263
264 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
265 folderId, status, start, end);
266
267 Object returnObj = null;
268
269 try {
270 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
271 }
272 catch (Exception e) {
273 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
274 throw (com.liferay.portal.kernel.exception.SystemException)e;
275 }
276
277 throw new com.liferay.portal.kernel.exception.SystemException(e);
278 }
279
280 return (java.util.List<java.lang.Object>)returnObj;
281 }
282 catch (com.liferay.portal.kernel.exception.SystemException se) {
283 _log.error(se, se);
284
285 throw se;
286 }
287 }
288
289 public static int getFileEntriesAndFileShortcutsCount(
290 HttpPrincipal httpPrincipal, long groupId,
291 java.util.List<java.lang.Long> folderIds, int status)
292 throws com.liferay.portal.kernel.exception.SystemException {
293 try {
294 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
295 "getFileEntriesAndFileShortcutsCount", long.class,
296 java.util.List.class, int.class);
297
298 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
299 folderIds, status);
300
301 Object returnObj = null;
302
303 try {
304 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
305 }
306 catch (Exception e) {
307 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
308 throw (com.liferay.portal.kernel.exception.SystemException)e;
309 }
310
311 throw new com.liferay.portal.kernel.exception.SystemException(e);
312 }
313
314 return ((Integer)returnObj).intValue();
315 }
316 catch (com.liferay.portal.kernel.exception.SystemException se) {
317 _log.error(se, se);
318
319 throw se;
320 }
321 }
322
323 public static int getFileEntriesAndFileShortcutsCount(
324 HttpPrincipal httpPrincipal, long groupId, long folderId, int status)
325 throws com.liferay.portal.kernel.exception.SystemException {
326 try {
327 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
328 "getFileEntriesAndFileShortcutsCount", long.class,
329 long.class, int.class);
330
331 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
332 folderId, status);
333
334 Object returnObj = null;
335
336 try {
337 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
338 }
339 catch (Exception e) {
340 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
341 throw (com.liferay.portal.kernel.exception.SystemException)e;
342 }
343
344 throw new com.liferay.portal.kernel.exception.SystemException(e);
345 }
346
347 return ((Integer)returnObj).intValue();
348 }
349 catch (com.liferay.portal.kernel.exception.SystemException se) {
350 _log.error(se, se);
351
352 throw se;
353 }
354 }
355
356 public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
357 HttpPrincipal httpPrincipal, long folderId)
358 throws com.liferay.portal.kernel.exception.PortalException,
359 com.liferay.portal.kernel.exception.SystemException {
360 try {
361 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
362 "getFolder", long.class);
363
364 MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
365
366 Object returnObj = null;
367
368 try {
369 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
370 }
371 catch (Exception e) {
372 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
373 throw (com.liferay.portal.kernel.exception.PortalException)e;
374 }
375
376 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
377 throw (com.liferay.portal.kernel.exception.SystemException)e;
378 }
379
380 throw new com.liferay.portal.kernel.exception.SystemException(e);
381 }
382
383 return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
384 }
385 catch (com.liferay.portal.kernel.exception.SystemException se) {
386 _log.error(se, se);
387
388 throw se;
389 }
390 }
391
392 public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
393 HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
394 java.lang.String name)
395 throws com.liferay.portal.kernel.exception.PortalException,
396 com.liferay.portal.kernel.exception.SystemException {
397 try {
398 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
399 "getFolder", long.class, long.class, java.lang.String.class);
400
401 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
402 parentFolderId, name);
403
404 Object returnObj = null;
405
406 try {
407 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
408 }
409 catch (Exception e) {
410 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
411 throw (com.liferay.portal.kernel.exception.PortalException)e;
412 }
413
414 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
415 throw (com.liferay.portal.kernel.exception.SystemException)e;
416 }
417
418 throw new com.liferay.portal.kernel.exception.SystemException(e);
419 }
420
421 return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
422 }
423 catch (com.liferay.portal.kernel.exception.SystemException se) {
424 _log.error(se, se);
425
426 throw se;
427 }
428 }
429
430 public static long getFolderId(HttpPrincipal httpPrincipal, long groupId,
431 long parentFolderId, java.lang.String name)
432 throws com.liferay.portal.kernel.exception.PortalException,
433 com.liferay.portal.kernel.exception.SystemException {
434 try {
435 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
436 "getFolderId", long.class, long.class,
437 java.lang.String.class);
438
439 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
440 parentFolderId, name);
441
442 Object returnObj = null;
443
444 try {
445 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
446 }
447 catch (Exception e) {
448 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
449 throw (com.liferay.portal.kernel.exception.PortalException)e;
450 }
451
452 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
453 throw (com.liferay.portal.kernel.exception.SystemException)e;
454 }
455
456 throw new com.liferay.portal.kernel.exception.SystemException(e);
457 }
458
459 return ((Long)returnObj).longValue();
460 }
461 catch (com.liferay.portal.kernel.exception.SystemException se) {
462 _log.error(se, se);
463
464 throw se;
465 }
466 }
467
468 public static long[] getFolderIds(HttpPrincipal httpPrincipal,
469 long groupId, long folderId)
470 throws com.liferay.portal.kernel.exception.SystemException {
471 try {
472 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
473 "getFolderIds", long.class, long.class);
474
475 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
476 folderId);
477
478 Object returnObj = null;
479
480 try {
481 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
482 }
483 catch (Exception e) {
484 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
485 throw (com.liferay.portal.kernel.exception.SystemException)e;
486 }
487
488 throw new com.liferay.portal.kernel.exception.SystemException(e);
489 }
490
491 return (long[])returnObj;
492 }
493 catch (com.liferay.portal.kernel.exception.SystemException se) {
494 _log.error(se, se);
495
496 throw se;
497 }
498 }
499
500 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
501 HttpPrincipal httpPrincipal, long groupId, long parentFolderId)
502 throws com.liferay.portal.kernel.exception.SystemException {
503 try {
504 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
505 "getFolders", long.class, long.class);
506
507 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
508 parentFolderId);
509
510 Object returnObj = null;
511
512 try {
513 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
514 }
515 catch (Exception e) {
516 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
517 throw (com.liferay.portal.kernel.exception.SystemException)e;
518 }
519
520 throw new com.liferay.portal.kernel.exception.SystemException(e);
521 }
522
523 return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder>)returnObj;
524 }
525 catch (com.liferay.portal.kernel.exception.SystemException se) {
526 _log.error(se, se);
527
528 throw se;
529 }
530 }
531
532 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
533 HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
534 int start, int end)
535 throws com.liferay.portal.kernel.exception.SystemException {
536 try {
537 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
538 "getFolders", long.class, long.class, int.class, int.class);
539
540 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
541 parentFolderId, start, end);
542
543 Object returnObj = null;
544
545 try {
546 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
547 }
548 catch (Exception e) {
549 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
550 throw (com.liferay.portal.kernel.exception.SystemException)e;
551 }
552
553 throw new com.liferay.portal.kernel.exception.SystemException(e);
554 }
555
556 return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder>)returnObj;
557 }
558 catch (com.liferay.portal.kernel.exception.SystemException se) {
559 _log.error(se, se);
560
561 throw se;
562 }
563 }
564
565 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
566 HttpPrincipal httpPrincipal, long groupId,
567 java.util.List<java.lang.Long> folderIds, int status, int start, int end)
568 throws com.liferay.portal.kernel.exception.SystemException {
569 try {
570 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
571 "getFoldersAndFileEntriesAndFileShortcuts", long.class,
572 java.util.List.class, int.class, int.class, int.class);
573
574 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
575 folderIds, status, start, end);
576
577 Object returnObj = null;
578
579 try {
580 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
581 }
582 catch (Exception e) {
583 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
584 throw (com.liferay.portal.kernel.exception.SystemException)e;
585 }
586
587 throw new com.liferay.portal.kernel.exception.SystemException(e);
588 }
589
590 return (java.util.List<java.lang.Object>)returnObj;
591 }
592 catch (com.liferay.portal.kernel.exception.SystemException se) {
593 _log.error(se, se);
594
595 throw se;
596 }
597 }
598
599 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
600 HttpPrincipal httpPrincipal, long groupId, long folderId, int status,
601 int start, int end)
602 throws com.liferay.portal.kernel.exception.PortalException,
603 com.liferay.portal.kernel.exception.SystemException {
604 try {
605 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
606 "getFoldersAndFileEntriesAndFileShortcuts", long.class,
607 long.class, int.class, int.class, int.class);
608
609 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
610 folderId, status, start, end);
611
612 Object returnObj = null;
613
614 try {
615 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
616 }
617 catch (Exception e) {
618 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
619 throw (com.liferay.portal.kernel.exception.PortalException)e;
620 }
621
622 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
623 throw (com.liferay.portal.kernel.exception.SystemException)e;
624 }
625
626 throw new com.liferay.portal.kernel.exception.SystemException(e);
627 }
628
629 return (java.util.List<java.lang.Object>)returnObj;
630 }
631 catch (com.liferay.portal.kernel.exception.SystemException se) {
632 _log.error(se, se);
633
634 throw se;
635 }
636 }
637
638 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
639 HttpPrincipal httpPrincipal, long groupId,
640 java.util.List<java.lang.Long> folderIds, int status)
641 throws com.liferay.portal.kernel.exception.SystemException {
642 try {
643 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
644 "getFoldersAndFileEntriesAndFileShortcutsCount",
645 long.class, java.util.List.class, int.class);
646
647 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
648 folderIds, status);
649
650 Object returnObj = null;
651
652 try {
653 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
654 }
655 catch (Exception e) {
656 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
657 throw (com.liferay.portal.kernel.exception.SystemException)e;
658 }
659
660 throw new com.liferay.portal.kernel.exception.SystemException(e);
661 }
662
663 return ((Integer)returnObj).intValue();
664 }
665 catch (com.liferay.portal.kernel.exception.SystemException se) {
666 _log.error(se, se);
667
668 throw se;
669 }
670 }
671
672 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
673 HttpPrincipal httpPrincipal, long groupId, long folderId, int status)
674 throws com.liferay.portal.kernel.exception.PortalException,
675 com.liferay.portal.kernel.exception.SystemException {
676 try {
677 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
678 "getFoldersAndFileEntriesAndFileShortcutsCount",
679 long.class, long.class, int.class);
680
681 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
682 folderId, status);
683
684 Object returnObj = null;
685
686 try {
687 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
688 }
689 catch (Exception e) {
690 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
691 throw (com.liferay.portal.kernel.exception.PortalException)e;
692 }
693
694 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
695 throw (com.liferay.portal.kernel.exception.SystemException)e;
696 }
697
698 throw new com.liferay.portal.kernel.exception.SystemException(e);
699 }
700
701 return ((Integer)returnObj).intValue();
702 }
703 catch (com.liferay.portal.kernel.exception.SystemException se) {
704 _log.error(se, se);
705
706 throw se;
707 }
708 }
709
710 public static int getFoldersCount(HttpPrincipal httpPrincipal,
711 long groupId, long parentFolderId)
712 throws com.liferay.portal.kernel.exception.SystemException {
713 try {
714 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
715 "getFoldersCount", long.class, long.class);
716
717 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
718 parentFolderId);
719
720 Object returnObj = null;
721
722 try {
723 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
724 }
725 catch (Exception e) {
726 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
727 throw (com.liferay.portal.kernel.exception.SystemException)e;
728 }
729
730 throw new com.liferay.portal.kernel.exception.SystemException(e);
731 }
732
733 return ((Integer)returnObj).intValue();
734 }
735 catch (com.liferay.portal.kernel.exception.SystemException se) {
736 _log.error(se, se);
737
738 throw se;
739 }
740 }
741
742 public static void getSubfolderIds(HttpPrincipal httpPrincipal,
743 java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
744 throws com.liferay.portal.kernel.exception.SystemException {
745 try {
746 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
747 "getSubfolderIds", java.util.List.class, long.class,
748 long.class);
749
750 MethodHandler methodHandler = new MethodHandler(methodKey,
751 folderIds, groupId, folderId);
752
753 try {
754 TunnelUtil.invoke(httpPrincipal, methodHandler);
755 }
756 catch (Exception e) {
757 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
758 throw (com.liferay.portal.kernel.exception.SystemException)e;
759 }
760
761 throw new com.liferay.portal.kernel.exception.SystemException(e);
762 }
763 }
764 catch (com.liferay.portal.kernel.exception.SystemException se) {
765 _log.error(se, se);
766
767 throw se;
768 }
769 }
770
771 public static boolean hasInheritableLock(HttpPrincipal httpPrincipal,
772 long folderId)
773 throws com.liferay.portal.kernel.exception.PortalException,
774 com.liferay.portal.kernel.exception.SystemException {
775 try {
776 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
777 "hasInheritableLock", long.class);
778
779 MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
780
781 Object returnObj = null;
782
783 try {
784 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
785 }
786 catch (Exception e) {
787 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
788 throw (com.liferay.portal.kernel.exception.PortalException)e;
789 }
790
791 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
792 throw (com.liferay.portal.kernel.exception.SystemException)e;
793 }
794
795 throw new com.liferay.portal.kernel.exception.SystemException(e);
796 }
797
798 return ((Boolean)returnObj).booleanValue();
799 }
800 catch (com.liferay.portal.kernel.exception.SystemException se) {
801 _log.error(se, se);
802
803 throw se;
804 }
805 }
806
807 public static com.liferay.portal.model.Lock lockFolder(
808 HttpPrincipal httpPrincipal, long folderId)
809 throws com.liferay.portal.kernel.exception.PortalException,
810 com.liferay.portal.kernel.exception.SystemException,
811 java.rmi.RemoteException {
812 try {
813 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
814 "lockFolder", long.class);
815
816 MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
817
818 Object returnObj = null;
819
820 try {
821 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
822 }
823 catch (Exception e) {
824 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
825 throw (com.liferay.portal.kernel.exception.PortalException)e;
826 }
827
828 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
829 throw (com.liferay.portal.kernel.exception.SystemException)e;
830 }
831
832 if (e instanceof java.rmi.RemoteException) {
833 throw (java.rmi.RemoteException)e;
834 }
835
836 throw new com.liferay.portal.kernel.exception.SystemException(e);
837 }
838
839 return (com.liferay.portal.model.Lock)returnObj;
840 }
841 catch (com.liferay.portal.kernel.exception.SystemException se) {
842 _log.error(se, se);
843
844 throw se;
845 }
846 }
847
848 public static com.liferay.portal.model.Lock lockFolder(
849 HttpPrincipal httpPrincipal, long folderId, java.lang.String owner,
850 boolean inheritable, long expirationTime)
851 throws com.liferay.portal.kernel.exception.PortalException,
852 com.liferay.portal.kernel.exception.SystemException,
853 java.rmi.RemoteException {
854 try {
855 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
856 "lockFolder", long.class, java.lang.String.class,
857 boolean.class, long.class);
858
859 MethodHandler methodHandler = new MethodHandler(methodKey,
860 folderId, owner, inheritable, expirationTime);
861
862 Object returnObj = null;
863
864 try {
865 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
866 }
867 catch (Exception e) {
868 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
869 throw (com.liferay.portal.kernel.exception.PortalException)e;
870 }
871
872 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
873 throw (com.liferay.portal.kernel.exception.SystemException)e;
874 }
875
876 if (e instanceof java.rmi.RemoteException) {
877 throw (java.rmi.RemoteException)e;
878 }
879
880 throw new com.liferay.portal.kernel.exception.SystemException(e);
881 }
882
883 return (com.liferay.portal.model.Lock)returnObj;
884 }
885 catch (com.liferay.portal.kernel.exception.SystemException se) {
886 _log.error(se, se);
887
888 throw se;
889 }
890 }
891
892 public static com.liferay.portal.model.Lock refreshFolderLock(
893 HttpPrincipal httpPrincipal, java.lang.String lockUuid,
894 long expirationTime)
895 throws com.liferay.portal.kernel.exception.PortalException,
896 com.liferay.portal.kernel.exception.SystemException {
897 try {
898 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
899 "refreshFolderLock", java.lang.String.class, long.class);
900
901 MethodHandler methodHandler = new MethodHandler(methodKey,
902 lockUuid, expirationTime);
903
904 Object returnObj = null;
905
906 try {
907 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
908 }
909 catch (Exception e) {
910 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
911 throw (com.liferay.portal.kernel.exception.PortalException)e;
912 }
913
914 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
915 throw (com.liferay.portal.kernel.exception.SystemException)e;
916 }
917
918 throw new com.liferay.portal.kernel.exception.SystemException(e);
919 }
920
921 return (com.liferay.portal.model.Lock)returnObj;
922 }
923 catch (com.liferay.portal.kernel.exception.SystemException se) {
924 _log.error(se, se);
925
926 throw se;
927 }
928 }
929
930 public static void unlockFolder(HttpPrincipal httpPrincipal, long groupId,
931 long folderId, java.lang.String lockUuid)
932 throws com.liferay.portal.kernel.exception.PortalException,
933 com.liferay.portal.kernel.exception.SystemException {
934 try {
935 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
936 "unlockFolder", long.class, long.class,
937 java.lang.String.class);
938
939 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
940 folderId, lockUuid);
941
942 try {
943 TunnelUtil.invoke(httpPrincipal, methodHandler);
944 }
945 catch (Exception e) {
946 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
947 throw (com.liferay.portal.kernel.exception.PortalException)e;
948 }
949
950 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
951 throw (com.liferay.portal.kernel.exception.SystemException)e;
952 }
953
954 throw new com.liferay.portal.kernel.exception.SystemException(e);
955 }
956 }
957 catch (com.liferay.portal.kernel.exception.SystemException se) {
958 _log.error(se, se);
959
960 throw se;
961 }
962 }
963
964 public static void unlockFolder(HttpPrincipal httpPrincipal, long groupId,
965 long parentFolderId, java.lang.String name, java.lang.String lockUuid)
966 throws com.liferay.portal.kernel.exception.PortalException,
967 com.liferay.portal.kernel.exception.SystemException {
968 try {
969 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
970 "unlockFolder", long.class, long.class,
971 java.lang.String.class, java.lang.String.class);
972
973 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
974 parentFolderId, name, lockUuid);
975
976 try {
977 TunnelUtil.invoke(httpPrincipal, methodHandler);
978 }
979 catch (Exception e) {
980 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
981 throw (com.liferay.portal.kernel.exception.PortalException)e;
982 }
983
984 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
985 throw (com.liferay.portal.kernel.exception.SystemException)e;
986 }
987
988 throw new com.liferay.portal.kernel.exception.SystemException(e);
989 }
990 }
991 catch (com.liferay.portal.kernel.exception.SystemException se) {
992 _log.error(se, se);
993
994 throw se;
995 }
996 }
997
998 public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
999 HttpPrincipal httpPrincipal, long folderId, long parentFolderId,
1000 java.lang.String name, java.lang.String description,
1001 com.liferay.portal.service.ServiceContext serviceContext)
1002 throws com.liferay.portal.kernel.exception.PortalException,
1003 com.liferay.portal.kernel.exception.SystemException,
1004 java.rmi.RemoteException {
1005 try {
1006 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
1007 "updateFolder", long.class, long.class,
1008 java.lang.String.class, java.lang.String.class,
1009 com.liferay.portal.service.ServiceContext.class);
1010
1011 MethodHandler methodHandler = new MethodHandler(methodKey,
1012 folderId, parentFolderId, name, description, serviceContext);
1013
1014 Object returnObj = null;
1015
1016 try {
1017 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1018 }
1019 catch (Exception e) {
1020 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1021 throw (com.liferay.portal.kernel.exception.PortalException)e;
1022 }
1023
1024 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1025 throw (com.liferay.portal.kernel.exception.SystemException)e;
1026 }
1027
1028 if (e instanceof java.rmi.RemoteException) {
1029 throw (java.rmi.RemoteException)e;
1030 }
1031
1032 throw new com.liferay.portal.kernel.exception.SystemException(e);
1033 }
1034
1035 return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
1036 }
1037 catch (com.liferay.portal.kernel.exception.SystemException se) {
1038 _log.error(se, se);
1039
1040 throw se;
1041 }
1042 }
1043
1044 public static boolean verifyInheritableLock(HttpPrincipal httpPrincipal,
1045 long folderId, java.lang.String lockUuid)
1046 throws com.liferay.portal.kernel.exception.PortalException,
1047 com.liferay.portal.kernel.exception.SystemException {
1048 try {
1049 MethodKey methodKey = new MethodKey(DLFolderServiceUtil.class.getName(),
1050 "verifyInheritableLock", long.class, java.lang.String.class);
1051
1052 MethodHandler methodHandler = new MethodHandler(methodKey,
1053 folderId, lockUuid);
1054
1055 Object returnObj = null;
1056
1057 try {
1058 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1059 }
1060 catch (Exception e) {
1061 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1062 throw (com.liferay.portal.kernel.exception.PortalException)e;
1063 }
1064
1065 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1066 throw (com.liferay.portal.kernel.exception.SystemException)e;
1067 }
1068
1069 throw new com.liferay.portal.kernel.exception.SystemException(e);
1070 }
1071
1072 return ((Boolean)returnObj).booleanValue();
1073 }
1074 catch (com.liferay.portal.kernel.exception.SystemException se) {
1075 _log.error(se, se);
1076
1077 throw se;
1078 }
1079 }
1080
1081 private static Log _log = LogFactoryUtil.getLog(DLFolderServiceHttp.class);
1082 }