1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.documentlibrary.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  import com.liferay.portal.kernel.util.BooleanWrapper;
20  import com.liferay.portal.kernel.util.IntegerWrapper;
21  import com.liferay.portal.kernel.util.LongWrapper;
22  import com.liferay.portal.kernel.util.MethodWrapper;
23  import com.liferay.portal.kernel.util.NullWrapper;
24  import com.liferay.portal.security.auth.HttpPrincipal;
25  import com.liferay.portal.service.http.TunnelUtil;
26  
27  import com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil;
28  
29  /**
30   * <a href="DLFolderServiceHttp.java.html"><b><i>View Source</i></b></a>
31   *
32   * <p>
33   * ServiceBuilder generated this class. Modifications in this class will be
34   * overwritten the next time is generated.
35   * </p>
36   *
37   * <p>
38   * This class provides a HTTP utility for the
39   * {@link com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil} service utility. The
40   * static methods of this class calls the same methods of the service utility.
41   * However, the signatures are different because it requires an additional
42   * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
43   * </p>
44   *
45   * <p>
46   * The benefits of using the HTTP utility is that it is fast and allows for
47   * tunneling without the cost of serializing to text. The drawback is that it
48   * only works with Java.
49   * </p>
50   *
51   * <p>
52   * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
53   * configure security.
54   * </p>
55   *
56   * <p>
57   * The HTTP utility is only generated for remote services.
58   * </p>
59   *
60   * @author    Brian Wing Shun Chan
61   * @see       DLFolderServiceSoap
62   * @see       com.liferay.portal.security.auth.HttpPrincipal
63   * @see       com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil
64   * @generated
65   */
66  public class DLFolderServiceHttp {
67      public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
68          HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
69          java.lang.String name, java.lang.String description,
70          com.liferay.portal.service.ServiceContext serviceContext)
71          throws com.liferay.portal.kernel.exception.PortalException,
72              com.liferay.portal.kernel.exception.SystemException {
73          try {
74              Object paramObj0 = new LongWrapper(groupId);
75  
76              Object paramObj1 = new LongWrapper(parentFolderId);
77  
78              Object paramObj2 = name;
79  
80              if (name == null) {
81                  paramObj2 = new NullWrapper("java.lang.String");
82              }
83  
84              Object paramObj3 = description;
85  
86              if (description == null) {
87                  paramObj3 = new NullWrapper("java.lang.String");
88              }
89  
90              Object paramObj4 = serviceContext;
91  
92              if (serviceContext == null) {
93                  paramObj4 = new NullWrapper(
94                          "com.liferay.portal.service.ServiceContext");
95              }
96  
97              MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
98                      "addFolder",
99                      new Object[] {
100                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
101                     });
102 
103             Object returnObj = null;
104 
105             try {
106                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
107             }
108             catch (Exception e) {
109                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
110                     throw (com.liferay.portal.kernel.exception.PortalException)e;
111                 }
112 
113                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
114                     throw (com.liferay.portal.kernel.exception.SystemException)e;
115                 }
116 
117                 throw new com.liferay.portal.kernel.exception.SystemException(e);
118             }
119 
120             return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
121         }
122         catch (com.liferay.portal.kernel.exception.SystemException se) {
123             _log.error(se, se);
124 
125             throw se;
126         }
127     }
128 
129     public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
130         HttpPrincipal httpPrincipal, long groupId, long sourceFolderId,
131         long parentFolderId, java.lang.String name,
132         java.lang.String description,
133         com.liferay.portal.service.ServiceContext serviceContext)
134         throws com.liferay.portal.kernel.exception.PortalException,
135             com.liferay.portal.kernel.exception.SystemException,
136             java.rmi.RemoteException {
137         try {
138             Object paramObj0 = new LongWrapper(groupId);
139 
140             Object paramObj1 = new LongWrapper(sourceFolderId);
141 
142             Object paramObj2 = new LongWrapper(parentFolderId);
143 
144             Object paramObj3 = name;
145 
146             if (name == null) {
147                 paramObj3 = new NullWrapper("java.lang.String");
148             }
149 
150             Object paramObj4 = description;
151 
152             if (description == null) {
153                 paramObj4 = new NullWrapper("java.lang.String");
154             }
155 
156             Object paramObj5 = serviceContext;
157 
158             if (serviceContext == null) {
159                 paramObj5 = new NullWrapper(
160                         "com.liferay.portal.service.ServiceContext");
161             }
162 
163             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
164                     "copyFolder",
165                     new Object[] {
166                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
167                         paramObj5
168                     });
169 
170             Object returnObj = null;
171 
172             try {
173                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
174             }
175             catch (Exception e) {
176                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
177                     throw (com.liferay.portal.kernel.exception.PortalException)e;
178                 }
179 
180                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
181                     throw (com.liferay.portal.kernel.exception.SystemException)e;
182                 }
183 
184                 if (e instanceof java.rmi.RemoteException) {
185                     throw (java.rmi.RemoteException)e;
186                 }
187 
188                 throw new com.liferay.portal.kernel.exception.SystemException(e);
189             }
190 
191             return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
192         }
193         catch (com.liferay.portal.kernel.exception.SystemException se) {
194             _log.error(se, se);
195 
196             throw se;
197         }
198     }
199 
200     public static void deleteFolder(HttpPrincipal httpPrincipal, long folderId)
201         throws com.liferay.portal.kernel.exception.PortalException,
202             com.liferay.portal.kernel.exception.SystemException,
203             java.rmi.RemoteException {
204         try {
205             Object paramObj0 = new LongWrapper(folderId);
206 
207             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
208                     "deleteFolder", new Object[] { paramObj0 });
209 
210             try {
211                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
212             }
213             catch (Exception e) {
214                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
215                     throw (com.liferay.portal.kernel.exception.PortalException)e;
216                 }
217 
218                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
219                     throw (com.liferay.portal.kernel.exception.SystemException)e;
220                 }
221 
222                 if (e instanceof java.rmi.RemoteException) {
223                     throw (java.rmi.RemoteException)e;
224                 }
225 
226                 throw new com.liferay.portal.kernel.exception.SystemException(e);
227             }
228         }
229         catch (com.liferay.portal.kernel.exception.SystemException se) {
230             _log.error(se, se);
231 
232             throw se;
233         }
234     }
235 
236     public static void deleteFolder(HttpPrincipal httpPrincipal, long groupId,
237         long parentFolderId, java.lang.String name)
238         throws com.liferay.portal.kernel.exception.PortalException,
239             com.liferay.portal.kernel.exception.SystemException,
240             java.rmi.RemoteException {
241         try {
242             Object paramObj0 = new LongWrapper(groupId);
243 
244             Object paramObj1 = new LongWrapper(parentFolderId);
245 
246             Object paramObj2 = name;
247 
248             if (name == null) {
249                 paramObj2 = new NullWrapper("java.lang.String");
250             }
251 
252             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
253                     "deleteFolder",
254                     new Object[] { paramObj0, paramObj1, paramObj2 });
255 
256             try {
257                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
258             }
259             catch (Exception e) {
260                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
261                     throw (com.liferay.portal.kernel.exception.PortalException)e;
262                 }
263 
264                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
265                     throw (com.liferay.portal.kernel.exception.SystemException)e;
266                 }
267 
268                 if (e instanceof java.rmi.RemoteException) {
269                     throw (java.rmi.RemoteException)e;
270                 }
271 
272                 throw new com.liferay.portal.kernel.exception.SystemException(e);
273             }
274         }
275         catch (com.liferay.portal.kernel.exception.SystemException se) {
276             _log.error(se, se);
277 
278             throw se;
279         }
280     }
281 
282     public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
283         HttpPrincipal httpPrincipal, long groupId,
284         java.util.List<java.lang.Long> folderIds, int status, int start, int end)
285         throws com.liferay.portal.kernel.exception.SystemException {
286         try {
287             Object paramObj0 = new LongWrapper(groupId);
288 
289             Object paramObj1 = folderIds;
290 
291             if (folderIds == null) {
292                 paramObj1 = new NullWrapper("java.util.List");
293             }
294 
295             Object paramObj2 = new IntegerWrapper(status);
296 
297             Object paramObj3 = new IntegerWrapper(start);
298 
299             Object paramObj4 = new IntegerWrapper(end);
300 
301             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
302                     "getFileEntriesAndFileShortcuts",
303                     new Object[] {
304                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
305                     });
306 
307             Object returnObj = null;
308 
309             try {
310                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
311             }
312             catch (Exception e) {
313                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
314                     throw (com.liferay.portal.kernel.exception.SystemException)e;
315                 }
316 
317                 throw new com.liferay.portal.kernel.exception.SystemException(e);
318             }
319 
320             return (java.util.List<java.lang.Object>)returnObj;
321         }
322         catch (com.liferay.portal.kernel.exception.SystemException se) {
323             _log.error(se, se);
324 
325             throw se;
326         }
327     }
328 
329     public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
330         HttpPrincipal httpPrincipal, long groupId, long folderId, int status,
331         int start, int end)
332         throws com.liferay.portal.kernel.exception.SystemException {
333         try {
334             Object paramObj0 = new LongWrapper(groupId);
335 
336             Object paramObj1 = new LongWrapper(folderId);
337 
338             Object paramObj2 = new IntegerWrapper(status);
339 
340             Object paramObj3 = new IntegerWrapper(start);
341 
342             Object paramObj4 = new IntegerWrapper(end);
343 
344             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
345                     "getFileEntriesAndFileShortcuts",
346                     new Object[] {
347                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
348                     });
349 
350             Object returnObj = null;
351 
352             try {
353                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
354             }
355             catch (Exception e) {
356                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
357                     throw (com.liferay.portal.kernel.exception.SystemException)e;
358                 }
359 
360                 throw new com.liferay.portal.kernel.exception.SystemException(e);
361             }
362 
363             return (java.util.List<java.lang.Object>)returnObj;
364         }
365         catch (com.liferay.portal.kernel.exception.SystemException se) {
366             _log.error(se, se);
367 
368             throw se;
369         }
370     }
371 
372     public static int getFileEntriesAndFileShortcutsCount(
373         HttpPrincipal httpPrincipal, long groupId,
374         java.util.List<java.lang.Long> folderIds, int status)
375         throws com.liferay.portal.kernel.exception.SystemException {
376         try {
377             Object paramObj0 = new LongWrapper(groupId);
378 
379             Object paramObj1 = folderIds;
380 
381             if (folderIds == null) {
382                 paramObj1 = new NullWrapper("java.util.List");
383             }
384 
385             Object paramObj2 = new IntegerWrapper(status);
386 
387             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
388                     "getFileEntriesAndFileShortcutsCount",
389                     new Object[] { paramObj0, paramObj1, paramObj2 });
390 
391             Object returnObj = null;
392 
393             try {
394                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
395             }
396             catch (Exception e) {
397                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
398                     throw (com.liferay.portal.kernel.exception.SystemException)e;
399                 }
400 
401                 throw new com.liferay.portal.kernel.exception.SystemException(e);
402             }
403 
404             return ((Integer)returnObj).intValue();
405         }
406         catch (com.liferay.portal.kernel.exception.SystemException se) {
407             _log.error(se, se);
408 
409             throw se;
410         }
411     }
412 
413     public static int getFileEntriesAndFileShortcutsCount(
414         HttpPrincipal httpPrincipal, long groupId, long folderId, int status)
415         throws com.liferay.portal.kernel.exception.SystemException {
416         try {
417             Object paramObj0 = new LongWrapper(groupId);
418 
419             Object paramObj1 = new LongWrapper(folderId);
420 
421             Object paramObj2 = new IntegerWrapper(status);
422 
423             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
424                     "getFileEntriesAndFileShortcutsCount",
425                     new Object[] { paramObj0, paramObj1, paramObj2 });
426 
427             Object returnObj = null;
428 
429             try {
430                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
431             }
432             catch (Exception e) {
433                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
434                     throw (com.liferay.portal.kernel.exception.SystemException)e;
435                 }
436 
437                 throw new com.liferay.portal.kernel.exception.SystemException(e);
438             }
439 
440             return ((Integer)returnObj).intValue();
441         }
442         catch (com.liferay.portal.kernel.exception.SystemException se) {
443             _log.error(se, se);
444 
445             throw se;
446         }
447     }
448 
449     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
450         HttpPrincipal httpPrincipal, long folderId)
451         throws com.liferay.portal.kernel.exception.PortalException,
452             com.liferay.portal.kernel.exception.SystemException {
453         try {
454             Object paramObj0 = new LongWrapper(folderId);
455 
456             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
457                     "getFolder", new Object[] { paramObj0 });
458 
459             Object returnObj = null;
460 
461             try {
462                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
463             }
464             catch (Exception e) {
465                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
466                     throw (com.liferay.portal.kernel.exception.PortalException)e;
467                 }
468 
469                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
470                     throw (com.liferay.portal.kernel.exception.SystemException)e;
471                 }
472 
473                 throw new com.liferay.portal.kernel.exception.SystemException(e);
474             }
475 
476             return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
477         }
478         catch (com.liferay.portal.kernel.exception.SystemException se) {
479             _log.error(se, se);
480 
481             throw se;
482         }
483     }
484 
485     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
486         HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
487         java.lang.String name)
488         throws com.liferay.portal.kernel.exception.PortalException,
489             com.liferay.portal.kernel.exception.SystemException {
490         try {
491             Object paramObj0 = new LongWrapper(groupId);
492 
493             Object paramObj1 = new LongWrapper(parentFolderId);
494 
495             Object paramObj2 = name;
496 
497             if (name == null) {
498                 paramObj2 = new NullWrapper("java.lang.String");
499             }
500 
501             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
502                     "getFolder",
503                     new Object[] { paramObj0, paramObj1, paramObj2 });
504 
505             Object returnObj = null;
506 
507             try {
508                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
509             }
510             catch (Exception e) {
511                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
512                     throw (com.liferay.portal.kernel.exception.PortalException)e;
513                 }
514 
515                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
516                     throw (com.liferay.portal.kernel.exception.SystemException)e;
517                 }
518 
519                 throw new com.liferay.portal.kernel.exception.SystemException(e);
520             }
521 
522             return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
523         }
524         catch (com.liferay.portal.kernel.exception.SystemException se) {
525             _log.error(se, se);
526 
527             throw se;
528         }
529     }
530 
531     public static long getFolderId(HttpPrincipal httpPrincipal, long groupId,
532         long parentFolderId, java.lang.String name)
533         throws com.liferay.portal.kernel.exception.PortalException,
534             com.liferay.portal.kernel.exception.SystemException {
535         try {
536             Object paramObj0 = new LongWrapper(groupId);
537 
538             Object paramObj1 = new LongWrapper(parentFolderId);
539 
540             Object paramObj2 = name;
541 
542             if (name == null) {
543                 paramObj2 = new NullWrapper("java.lang.String");
544             }
545 
546             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
547                     "getFolderId",
548                     new Object[] { paramObj0, paramObj1, paramObj2 });
549 
550             Object returnObj = null;
551 
552             try {
553                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
554             }
555             catch (Exception e) {
556                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
557                     throw (com.liferay.portal.kernel.exception.PortalException)e;
558                 }
559 
560                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
561                     throw (com.liferay.portal.kernel.exception.SystemException)e;
562                 }
563 
564                 throw new com.liferay.portal.kernel.exception.SystemException(e);
565             }
566 
567             return ((Long)returnObj).longValue();
568         }
569         catch (com.liferay.portal.kernel.exception.SystemException se) {
570             _log.error(se, se);
571 
572             throw se;
573         }
574     }
575 
576     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
577         HttpPrincipal httpPrincipal, long groupId, long parentFolderId)
578         throws com.liferay.portal.kernel.exception.SystemException {
579         try {
580             Object paramObj0 = new LongWrapper(groupId);
581 
582             Object paramObj1 = new LongWrapper(parentFolderId);
583 
584             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
585                     "getFolders", new Object[] { paramObj0, paramObj1 });
586 
587             Object returnObj = null;
588 
589             try {
590                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
591             }
592             catch (Exception e) {
593                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
594                     throw (com.liferay.portal.kernel.exception.SystemException)e;
595                 }
596 
597                 throw new com.liferay.portal.kernel.exception.SystemException(e);
598             }
599 
600             return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder>)returnObj;
601         }
602         catch (com.liferay.portal.kernel.exception.SystemException se) {
603             _log.error(se, se);
604 
605             throw se;
606         }
607     }
608 
609     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
610         HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
611         int start, int end)
612         throws com.liferay.portal.kernel.exception.SystemException {
613         try {
614             Object paramObj0 = new LongWrapper(groupId);
615 
616             Object paramObj1 = new LongWrapper(parentFolderId);
617 
618             Object paramObj2 = new IntegerWrapper(start);
619 
620             Object paramObj3 = new IntegerWrapper(end);
621 
622             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
623                     "getFolders",
624                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
625 
626             Object returnObj = null;
627 
628             try {
629                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
630             }
631             catch (Exception e) {
632                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
633                     throw (com.liferay.portal.kernel.exception.SystemException)e;
634                 }
635 
636                 throw new com.liferay.portal.kernel.exception.SystemException(e);
637             }
638 
639             return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder>)returnObj;
640         }
641         catch (com.liferay.portal.kernel.exception.SystemException se) {
642             _log.error(se, se);
643 
644             throw se;
645         }
646     }
647 
648     public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
649         HttpPrincipal httpPrincipal, long groupId,
650         java.util.List<java.lang.Long> folderIds, int status, int start, int end)
651         throws com.liferay.portal.kernel.exception.SystemException {
652         try {
653             Object paramObj0 = new LongWrapper(groupId);
654 
655             Object paramObj1 = folderIds;
656 
657             if (folderIds == null) {
658                 paramObj1 = new NullWrapper("java.util.List");
659             }
660 
661             Object paramObj2 = new IntegerWrapper(status);
662 
663             Object paramObj3 = new IntegerWrapper(start);
664 
665             Object paramObj4 = new IntegerWrapper(end);
666 
667             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
668                     "getFoldersAndFileEntriesAndFileShortcuts",
669                     new Object[] {
670                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
671                     });
672 
673             Object returnObj = null;
674 
675             try {
676                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
677             }
678             catch (Exception e) {
679                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
680                     throw (com.liferay.portal.kernel.exception.SystemException)e;
681                 }
682 
683                 throw new com.liferay.portal.kernel.exception.SystemException(e);
684             }
685 
686             return (java.util.List<java.lang.Object>)returnObj;
687         }
688         catch (com.liferay.portal.kernel.exception.SystemException se) {
689             _log.error(se, se);
690 
691             throw se;
692         }
693     }
694 
695     public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
696         HttpPrincipal httpPrincipal, long groupId, long folderId, int status,
697         int start, int end)
698         throws com.liferay.portal.kernel.exception.PortalException,
699             com.liferay.portal.kernel.exception.SystemException {
700         try {
701             Object paramObj0 = new LongWrapper(groupId);
702 
703             Object paramObj1 = new LongWrapper(folderId);
704 
705             Object paramObj2 = new IntegerWrapper(status);
706 
707             Object paramObj3 = new IntegerWrapper(start);
708 
709             Object paramObj4 = new IntegerWrapper(end);
710 
711             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
712                     "getFoldersAndFileEntriesAndFileShortcuts",
713                     new Object[] {
714                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
715                     });
716 
717             Object returnObj = null;
718 
719             try {
720                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
721             }
722             catch (Exception e) {
723                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
724                     throw (com.liferay.portal.kernel.exception.PortalException)e;
725                 }
726 
727                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
728                     throw (com.liferay.portal.kernel.exception.SystemException)e;
729                 }
730 
731                 throw new com.liferay.portal.kernel.exception.SystemException(e);
732             }
733 
734             return (java.util.List<java.lang.Object>)returnObj;
735         }
736         catch (com.liferay.portal.kernel.exception.SystemException se) {
737             _log.error(se, se);
738 
739             throw se;
740         }
741     }
742 
743     public static int getFoldersAndFileEntriesAndFileShortcutsCount(
744         HttpPrincipal httpPrincipal, long groupId,
745         java.util.List<java.lang.Long> folderIds, int status)
746         throws com.liferay.portal.kernel.exception.SystemException {
747         try {
748             Object paramObj0 = new LongWrapper(groupId);
749 
750             Object paramObj1 = folderIds;
751 
752             if (folderIds == null) {
753                 paramObj1 = new NullWrapper("java.util.List");
754             }
755 
756             Object paramObj2 = new IntegerWrapper(status);
757 
758             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
759                     "getFoldersAndFileEntriesAndFileShortcutsCount",
760                     new Object[] { paramObj0, paramObj1, paramObj2 });
761 
762             Object returnObj = null;
763 
764             try {
765                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
766             }
767             catch (Exception e) {
768                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
769                     throw (com.liferay.portal.kernel.exception.SystemException)e;
770                 }
771 
772                 throw new com.liferay.portal.kernel.exception.SystemException(e);
773             }
774 
775             return ((Integer)returnObj).intValue();
776         }
777         catch (com.liferay.portal.kernel.exception.SystemException se) {
778             _log.error(se, se);
779 
780             throw se;
781         }
782     }
783 
784     public static int getFoldersAndFileEntriesAndFileShortcutsCount(
785         HttpPrincipal httpPrincipal, long groupId, long folderId, int status)
786         throws com.liferay.portal.kernel.exception.PortalException,
787             com.liferay.portal.kernel.exception.SystemException {
788         try {
789             Object paramObj0 = new LongWrapper(groupId);
790 
791             Object paramObj1 = new LongWrapper(folderId);
792 
793             Object paramObj2 = new IntegerWrapper(status);
794 
795             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
796                     "getFoldersAndFileEntriesAndFileShortcutsCount",
797                     new Object[] { paramObj0, paramObj1, paramObj2 });
798 
799             Object returnObj = null;
800 
801             try {
802                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
803             }
804             catch (Exception e) {
805                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
806                     throw (com.liferay.portal.kernel.exception.PortalException)e;
807                 }
808 
809                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
810                     throw (com.liferay.portal.kernel.exception.SystemException)e;
811                 }
812 
813                 throw new com.liferay.portal.kernel.exception.SystemException(e);
814             }
815 
816             return ((Integer)returnObj).intValue();
817         }
818         catch (com.liferay.portal.kernel.exception.SystemException se) {
819             _log.error(se, se);
820 
821             throw se;
822         }
823     }
824 
825     public static int getFoldersCount(HttpPrincipal httpPrincipal,
826         long groupId, long parentFolderId)
827         throws com.liferay.portal.kernel.exception.SystemException {
828         try {
829             Object paramObj0 = new LongWrapper(groupId);
830 
831             Object paramObj1 = new LongWrapper(parentFolderId);
832 
833             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
834                     "getFoldersCount", new Object[] { paramObj0, paramObj1 });
835 
836             Object returnObj = null;
837 
838             try {
839                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
840             }
841             catch (Exception e) {
842                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
843                     throw (com.liferay.portal.kernel.exception.SystemException)e;
844                 }
845 
846                 throw new com.liferay.portal.kernel.exception.SystemException(e);
847             }
848 
849             return ((Integer)returnObj).intValue();
850         }
851         catch (com.liferay.portal.kernel.exception.SystemException se) {
852             _log.error(se, se);
853 
854             throw se;
855         }
856     }
857 
858     public static void getSubfolderIds(HttpPrincipal httpPrincipal,
859         java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
860         throws com.liferay.portal.kernel.exception.PortalException,
861             com.liferay.portal.kernel.exception.SystemException {
862         try {
863             Object paramObj0 = folderIds;
864 
865             if (folderIds == null) {
866                 paramObj0 = new NullWrapper("java.util.List");
867             }
868 
869             Object paramObj1 = new LongWrapper(groupId);
870 
871             Object paramObj2 = new LongWrapper(folderId);
872 
873             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
874                     "getSubfolderIds",
875                     new Object[] { paramObj0, paramObj1, paramObj2 });
876 
877             try {
878                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
879             }
880             catch (Exception e) {
881                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
882                     throw (com.liferay.portal.kernel.exception.PortalException)e;
883                 }
884 
885                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
886                     throw (com.liferay.portal.kernel.exception.SystemException)e;
887                 }
888 
889                 throw new com.liferay.portal.kernel.exception.SystemException(e);
890             }
891         }
892         catch (com.liferay.portal.kernel.exception.SystemException se) {
893             _log.error(se, se);
894 
895             throw se;
896         }
897     }
898 
899     public static boolean hasInheritableLock(HttpPrincipal httpPrincipal,
900         long folderId)
901         throws com.liferay.portal.kernel.exception.PortalException,
902             com.liferay.portal.kernel.exception.SystemException {
903         try {
904             Object paramObj0 = new LongWrapper(folderId);
905 
906             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
907                     "hasInheritableLock", new Object[] { paramObj0 });
908 
909             Object returnObj = null;
910 
911             try {
912                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
913             }
914             catch (Exception e) {
915                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
916                     throw (com.liferay.portal.kernel.exception.PortalException)e;
917                 }
918 
919                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
920                     throw (com.liferay.portal.kernel.exception.SystemException)e;
921                 }
922 
923                 throw new com.liferay.portal.kernel.exception.SystemException(e);
924             }
925 
926             return ((Boolean)returnObj).booleanValue();
927         }
928         catch (com.liferay.portal.kernel.exception.SystemException se) {
929             _log.error(se, se);
930 
931             throw se;
932         }
933     }
934 
935     public static com.liferay.portal.model.Lock lockFolder(
936         HttpPrincipal httpPrincipal, long folderId)
937         throws com.liferay.portal.kernel.exception.PortalException,
938             com.liferay.portal.kernel.exception.SystemException,
939             java.rmi.RemoteException {
940         try {
941             Object paramObj0 = new LongWrapper(folderId);
942 
943             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
944                     "lockFolder", new Object[] { paramObj0 });
945 
946             Object returnObj = null;
947 
948             try {
949                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
950             }
951             catch (Exception e) {
952                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
953                     throw (com.liferay.portal.kernel.exception.PortalException)e;
954                 }
955 
956                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
957                     throw (com.liferay.portal.kernel.exception.SystemException)e;
958                 }
959 
960                 if (e instanceof java.rmi.RemoteException) {
961                     throw (java.rmi.RemoteException)e;
962                 }
963 
964                 throw new com.liferay.portal.kernel.exception.SystemException(e);
965             }
966 
967             return (com.liferay.portal.model.Lock)returnObj;
968         }
969         catch (com.liferay.portal.kernel.exception.SystemException se) {
970             _log.error(se, se);
971 
972             throw se;
973         }
974     }
975 
976     public static com.liferay.portal.model.Lock lockFolder(
977         HttpPrincipal httpPrincipal, long folderId, java.lang.String owner,
978         boolean inheritable, long expirationTime)
979         throws com.liferay.portal.kernel.exception.PortalException,
980             com.liferay.portal.kernel.exception.SystemException,
981             java.rmi.RemoteException {
982         try {
983             Object paramObj0 = new LongWrapper(folderId);
984 
985             Object paramObj1 = owner;
986 
987             if (owner == null) {
988                 paramObj1 = new NullWrapper("java.lang.String");
989             }
990 
991             Object paramObj2 = new BooleanWrapper(inheritable);
992 
993             Object paramObj3 = new LongWrapper(expirationTime);
994 
995             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
996                     "lockFolder",
997                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
998 
999             Object returnObj = null;
1000
1001            try {
1002                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1003            }
1004            catch (Exception e) {
1005                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1006                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1007                }
1008
1009                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1010                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1011                }
1012
1013                if (e instanceof java.rmi.RemoteException) {
1014                    throw (java.rmi.RemoteException)e;
1015                }
1016
1017                throw new com.liferay.portal.kernel.exception.SystemException(e);
1018            }
1019
1020            return (com.liferay.portal.model.Lock)returnObj;
1021        }
1022        catch (com.liferay.portal.kernel.exception.SystemException se) {
1023            _log.error(se, se);
1024
1025            throw se;
1026        }
1027    }
1028
1029    public static com.liferay.portal.model.Lock refreshFolderLock(
1030        HttpPrincipal httpPrincipal, java.lang.String lockUuid,
1031        long expirationTime)
1032        throws com.liferay.portal.kernel.exception.PortalException,
1033            com.liferay.portal.kernel.exception.SystemException {
1034        try {
1035            Object paramObj0 = lockUuid;
1036
1037            if (lockUuid == null) {
1038                paramObj0 = new NullWrapper("java.lang.String");
1039            }
1040
1041            Object paramObj1 = new LongWrapper(expirationTime);
1042
1043            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1044                    "refreshFolderLock", new Object[] { paramObj0, paramObj1 });
1045
1046            Object returnObj = null;
1047
1048            try {
1049                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1050            }
1051            catch (Exception e) {
1052                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1053                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1054                }
1055
1056                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1057                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1058                }
1059
1060                throw new com.liferay.portal.kernel.exception.SystemException(e);
1061            }
1062
1063            return (com.liferay.portal.model.Lock)returnObj;
1064        }
1065        catch (com.liferay.portal.kernel.exception.SystemException se) {
1066            _log.error(se, se);
1067
1068            throw se;
1069        }
1070    }
1071
1072    public static void unlockFolder(HttpPrincipal httpPrincipal, long groupId,
1073        long folderId, java.lang.String lockUuid)
1074        throws com.liferay.portal.kernel.exception.PortalException,
1075            com.liferay.portal.kernel.exception.SystemException {
1076        try {
1077            Object paramObj0 = new LongWrapper(groupId);
1078
1079            Object paramObj1 = new LongWrapper(folderId);
1080
1081            Object paramObj2 = lockUuid;
1082
1083            if (lockUuid == null) {
1084                paramObj2 = new NullWrapper("java.lang.String");
1085            }
1086
1087            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1088                    "unlockFolder",
1089                    new Object[] { paramObj0, paramObj1, paramObj2 });
1090
1091            try {
1092                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1093            }
1094            catch (Exception e) {
1095                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1096                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1097                }
1098
1099                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1100                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1101                }
1102
1103                throw new com.liferay.portal.kernel.exception.SystemException(e);
1104            }
1105        }
1106        catch (com.liferay.portal.kernel.exception.SystemException se) {
1107            _log.error(se, se);
1108
1109            throw se;
1110        }
1111    }
1112
1113    public static void unlockFolder(HttpPrincipal httpPrincipal, long groupId,
1114        long parentFolderId, java.lang.String name, java.lang.String lockUuid)
1115        throws com.liferay.portal.kernel.exception.PortalException,
1116            com.liferay.portal.kernel.exception.SystemException {
1117        try {
1118            Object paramObj0 = new LongWrapper(groupId);
1119
1120            Object paramObj1 = new LongWrapper(parentFolderId);
1121
1122            Object paramObj2 = name;
1123
1124            if (name == null) {
1125                paramObj2 = new NullWrapper("java.lang.String");
1126            }
1127
1128            Object paramObj3 = lockUuid;
1129
1130            if (lockUuid == null) {
1131                paramObj3 = new NullWrapper("java.lang.String");
1132            }
1133
1134            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1135                    "unlockFolder",
1136                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1137
1138            try {
1139                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1140            }
1141            catch (Exception e) {
1142                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1143                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1144                }
1145
1146                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1147                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1148                }
1149
1150                throw new com.liferay.portal.kernel.exception.SystemException(e);
1151            }
1152        }
1153        catch (com.liferay.portal.kernel.exception.SystemException se) {
1154            _log.error(se, se);
1155
1156            throw se;
1157        }
1158    }
1159
1160    public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
1161        HttpPrincipal httpPrincipal, long folderId, long parentFolderId,
1162        java.lang.String name, java.lang.String description,
1163        com.liferay.portal.service.ServiceContext serviceContext)
1164        throws com.liferay.portal.kernel.exception.PortalException,
1165            com.liferay.portal.kernel.exception.SystemException,
1166            java.rmi.RemoteException {
1167        try {
1168            Object paramObj0 = new LongWrapper(folderId);
1169
1170            Object paramObj1 = new LongWrapper(parentFolderId);
1171
1172            Object paramObj2 = name;
1173
1174            if (name == null) {
1175                paramObj2 = new NullWrapper("java.lang.String");
1176            }
1177
1178            Object paramObj3 = description;
1179
1180            if (description == null) {
1181                paramObj3 = new NullWrapper("java.lang.String");
1182            }
1183
1184            Object paramObj4 = serviceContext;
1185
1186            if (serviceContext == null) {
1187                paramObj4 = new NullWrapper(
1188                        "com.liferay.portal.service.ServiceContext");
1189            }
1190
1191            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1192                    "updateFolder",
1193                    new Object[] {
1194                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
1195                    });
1196
1197            Object returnObj = null;
1198
1199            try {
1200                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1201            }
1202            catch (Exception e) {
1203                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1204                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1205                }
1206
1207                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1208                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1209                }
1210
1211                if (e instanceof java.rmi.RemoteException) {
1212                    throw (java.rmi.RemoteException)e;
1213                }
1214
1215                throw new com.liferay.portal.kernel.exception.SystemException(e);
1216            }
1217
1218            return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
1219        }
1220        catch (com.liferay.portal.kernel.exception.SystemException se) {
1221            _log.error(se, se);
1222
1223            throw se;
1224        }
1225    }
1226
1227    public static boolean verifyInheritableLock(HttpPrincipal httpPrincipal,
1228        long folderId, java.lang.String lockUuid)
1229        throws com.liferay.portal.kernel.exception.PortalException,
1230            com.liferay.portal.kernel.exception.SystemException {
1231        try {
1232            Object paramObj0 = new LongWrapper(folderId);
1233
1234            Object paramObj1 = lockUuid;
1235
1236            if (lockUuid == null) {
1237                paramObj1 = new NullWrapper("java.lang.String");
1238            }
1239
1240            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1241                    "verifyInheritableLock",
1242                    new Object[] { paramObj0, paramObj1 });
1243
1244            Object returnObj = null;
1245
1246            try {
1247                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1248            }
1249            catch (Exception e) {
1250                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1251                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1252                }
1253
1254                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1255                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1256                }
1257
1258                throw new com.liferay.portal.kernel.exception.SystemException(e);
1259            }
1260
1261            return ((Boolean)returnObj).booleanValue();
1262        }
1263        catch (com.liferay.portal.kernel.exception.SystemException se) {
1264            _log.error(se, se);
1265
1266            throw se;
1267        }
1268    }
1269
1270    private static Log _log = LogFactoryUtil.getLog(DLFolderServiceHttp.class);
1271}