1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.documentlibrary.service.http;
21  
22  import com.liferay.portal.kernel.log.Log;
23  import com.liferay.portal.kernel.log.LogFactoryUtil;
24  import com.liferay.portal.kernel.util.BooleanWrapper;
25  import com.liferay.portal.kernel.util.LongWrapper;
26  import com.liferay.portal.kernel.util.MethodWrapper;
27  import com.liferay.portal.kernel.util.NullWrapper;
28  import com.liferay.portal.security.auth.HttpPrincipal;
29  import com.liferay.portal.service.http.TunnelUtil;
30  
31  import com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil;
32  
33  /**
34   * <a href="DLFolderServiceHttp.java.html"><b><i>View Source</i></b></a>
35   *
36   * <p>
37   * ServiceBuilder generated this class. Modifications in this class will be
38   * overwritten the next time is generated.
39   * </p>
40   *
41   * <p>
42   * This class provides a HTTP utility for the
43   * <code>com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil</code> service
44   * utility. The static methods of this class calls the same methods of the
45   * service utility. However, the signatures are different because it requires an
46   * additional <code>com.liferay.portal.security.auth.HttpPrincipal</code>
47   * parameter.
48   * </p>
49   *
50   * <p>
51   * The benefits of using the HTTP utility is that it is fast and allows for
52   * tunneling without the cost of serializing to text. The drawback is that it
53   * only works with Java.
54   * </p>
55   *
56   * <p>
57   * Set the property <code>tunnel.servlet.hosts.allowed</code> in
58   * portal.properties to configure security.
59   * </p>
60   *
61   * <p>
62   * The HTTP utility is only generated for remote services.
63   * </p>
64   *
65   * @author Brian Wing Shun Chan
66   *
67   * @see com.liferay.portal.security.auth.HttpPrincipal
68   * @see com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil
69   * @see com.liferay.portlet.documentlibrary.service.http.DLFolderServiceSoap
70   *
71   */
72  public class DLFolderServiceHttp {
73      public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
74          HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
75          java.lang.String name, java.lang.String description,
76          com.liferay.portal.service.ServiceContext serviceContext)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException {
79          try {
80              Object paramObj0 = new LongWrapper(groupId);
81  
82              Object paramObj1 = new LongWrapper(parentFolderId);
83  
84              Object paramObj2 = name;
85  
86              if (name == null) {
87                  paramObj2 = new NullWrapper("java.lang.String");
88              }
89  
90              Object paramObj3 = description;
91  
92              if (description == null) {
93                  paramObj3 = new NullWrapper("java.lang.String");
94              }
95  
96              Object paramObj4 = serviceContext;
97  
98              if (serviceContext == null) {
99                  paramObj4 = new NullWrapper(
100                         "com.liferay.portal.service.ServiceContext");
101             }
102 
103             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
104                     "addFolder",
105                     new Object[] {
106                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
107                     });
108 
109             Object returnObj = null;
110 
111             try {
112                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
113             }
114             catch (Exception e) {
115                 if (e instanceof com.liferay.portal.PortalException) {
116                     throw (com.liferay.portal.PortalException)e;
117                 }
118 
119                 if (e instanceof com.liferay.portal.SystemException) {
120                     throw (com.liferay.portal.SystemException)e;
121                 }
122 
123                 throw new com.liferay.portal.SystemException(e);
124             }
125 
126             return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
127         }
128         catch (com.liferay.portal.SystemException se) {
129             _log.error(se, se);
130 
131             throw se;
132         }
133     }
134 
135     public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
136         HttpPrincipal httpPrincipal, long groupId, long sourceFolderId,
137         long parentFolderId, java.lang.String name,
138         java.lang.String description,
139         com.liferay.portal.service.ServiceContext serviceContext)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException, java.rmi.RemoteException {
142         try {
143             Object paramObj0 = new LongWrapper(groupId);
144 
145             Object paramObj1 = new LongWrapper(sourceFolderId);
146 
147             Object paramObj2 = new LongWrapper(parentFolderId);
148 
149             Object paramObj3 = name;
150 
151             if (name == null) {
152                 paramObj3 = new NullWrapper("java.lang.String");
153             }
154 
155             Object paramObj4 = description;
156 
157             if (description == null) {
158                 paramObj4 = new NullWrapper("java.lang.String");
159             }
160 
161             Object paramObj5 = serviceContext;
162 
163             if (serviceContext == null) {
164                 paramObj5 = new NullWrapper(
165                         "com.liferay.portal.service.ServiceContext");
166             }
167 
168             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
169                     "copyFolder",
170                     new Object[] {
171                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
172                         paramObj5
173                     });
174 
175             Object returnObj = null;
176 
177             try {
178                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
179             }
180             catch (Exception e) {
181                 if (e instanceof com.liferay.portal.PortalException) {
182                     throw (com.liferay.portal.PortalException)e;
183                 }
184 
185                 if (e instanceof com.liferay.portal.SystemException) {
186                     throw (com.liferay.portal.SystemException)e;
187                 }
188 
189                 if (e instanceof java.rmi.RemoteException) {
190                     throw (java.rmi.RemoteException)e;
191                 }
192 
193                 throw new com.liferay.portal.SystemException(e);
194             }
195 
196             return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
197         }
198         catch (com.liferay.portal.SystemException se) {
199             _log.error(se, se);
200 
201             throw se;
202         }
203     }
204 
205     public static void deleteFolder(HttpPrincipal httpPrincipal, long folderId)
206         throws com.liferay.portal.PortalException,
207             com.liferay.portal.SystemException, java.rmi.RemoteException {
208         try {
209             Object paramObj0 = new LongWrapper(folderId);
210 
211             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
212                     "deleteFolder", new Object[] { paramObj0 });
213 
214             try {
215                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
216             }
217             catch (Exception e) {
218                 if (e instanceof com.liferay.portal.PortalException) {
219                     throw (com.liferay.portal.PortalException)e;
220                 }
221 
222                 if (e instanceof com.liferay.portal.SystemException) {
223                     throw (com.liferay.portal.SystemException)e;
224                 }
225 
226                 if (e instanceof java.rmi.RemoteException) {
227                     throw (java.rmi.RemoteException)e;
228                 }
229 
230                 throw new com.liferay.portal.SystemException(e);
231             }
232         }
233         catch (com.liferay.portal.SystemException se) {
234             _log.error(se, se);
235 
236             throw se;
237         }
238     }
239 
240     public static void deleteFolder(HttpPrincipal httpPrincipal, long groupId,
241         long parentFolderId, java.lang.String name)
242         throws com.liferay.portal.PortalException,
243             com.liferay.portal.SystemException, java.rmi.RemoteException {
244         try {
245             Object paramObj0 = new LongWrapper(groupId);
246 
247             Object paramObj1 = new LongWrapper(parentFolderId);
248 
249             Object paramObj2 = name;
250 
251             if (name == null) {
252                 paramObj2 = new NullWrapper("java.lang.String");
253             }
254 
255             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
256                     "deleteFolder",
257                     new Object[] { paramObj0, paramObj1, paramObj2 });
258 
259             try {
260                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
261             }
262             catch (Exception e) {
263                 if (e instanceof com.liferay.portal.PortalException) {
264                     throw (com.liferay.portal.PortalException)e;
265                 }
266 
267                 if (e instanceof com.liferay.portal.SystemException) {
268                     throw (com.liferay.portal.SystemException)e;
269                 }
270 
271                 if (e instanceof java.rmi.RemoteException) {
272                     throw (java.rmi.RemoteException)e;
273                 }
274 
275                 throw new com.liferay.portal.SystemException(e);
276             }
277         }
278         catch (com.liferay.portal.SystemException se) {
279             _log.error(se, se);
280 
281             throw se;
282         }
283     }
284 
285     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
286         HttpPrincipal httpPrincipal, long folderId)
287         throws com.liferay.portal.PortalException,
288             com.liferay.portal.SystemException {
289         try {
290             Object paramObj0 = new LongWrapper(folderId);
291 
292             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
293                     "getFolder", new Object[] { paramObj0 });
294 
295             Object returnObj = null;
296 
297             try {
298                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
299             }
300             catch (Exception e) {
301                 if (e instanceof com.liferay.portal.PortalException) {
302                     throw (com.liferay.portal.PortalException)e;
303                 }
304 
305                 if (e instanceof com.liferay.portal.SystemException) {
306                     throw (com.liferay.portal.SystemException)e;
307                 }
308 
309                 throw new com.liferay.portal.SystemException(e);
310             }
311 
312             return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
313         }
314         catch (com.liferay.portal.SystemException se) {
315             _log.error(se, se);
316 
317             throw se;
318         }
319     }
320 
321     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
322         HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
323         java.lang.String name)
324         throws com.liferay.portal.PortalException,
325             com.liferay.portal.SystemException {
326         try {
327             Object paramObj0 = new LongWrapper(groupId);
328 
329             Object paramObj1 = new LongWrapper(parentFolderId);
330 
331             Object paramObj2 = name;
332 
333             if (name == null) {
334                 paramObj2 = new NullWrapper("java.lang.String");
335             }
336 
337             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
338                     "getFolder",
339                     new Object[] { paramObj0, paramObj1, paramObj2 });
340 
341             Object returnObj = null;
342 
343             try {
344                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
345             }
346             catch (Exception e) {
347                 if (e instanceof com.liferay.portal.PortalException) {
348                     throw (com.liferay.portal.PortalException)e;
349                 }
350 
351                 if (e instanceof com.liferay.portal.SystemException) {
352                     throw (com.liferay.portal.SystemException)e;
353                 }
354 
355                 throw new com.liferay.portal.SystemException(e);
356             }
357 
358             return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
359         }
360         catch (com.liferay.portal.SystemException se) {
361             _log.error(se, se);
362 
363             throw se;
364         }
365     }
366 
367     public static long getFolderId(HttpPrincipal httpPrincipal, long groupId,
368         long parentFolderId, java.lang.String name)
369         throws com.liferay.portal.PortalException,
370             com.liferay.portal.SystemException {
371         try {
372             Object paramObj0 = new LongWrapper(groupId);
373 
374             Object paramObj1 = new LongWrapper(parentFolderId);
375 
376             Object paramObj2 = name;
377 
378             if (name == null) {
379                 paramObj2 = new NullWrapper("java.lang.String");
380             }
381 
382             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
383                     "getFolderId",
384                     new Object[] { paramObj0, paramObj1, paramObj2 });
385 
386             Object returnObj = null;
387 
388             try {
389                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
390             }
391             catch (Exception e) {
392                 if (e instanceof com.liferay.portal.PortalException) {
393                     throw (com.liferay.portal.PortalException)e;
394                 }
395 
396                 if (e instanceof com.liferay.portal.SystemException) {
397                     throw (com.liferay.portal.SystemException)e;
398                 }
399 
400                 throw new com.liferay.portal.SystemException(e);
401             }
402 
403             return ((Long)returnObj).longValue();
404         }
405         catch (com.liferay.portal.SystemException se) {
406             _log.error(se, se);
407 
408             throw se;
409         }
410     }
411 
412     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
413         HttpPrincipal httpPrincipal, long groupId, long parentFolderId)
414         throws com.liferay.portal.PortalException,
415             com.liferay.portal.SystemException {
416         try {
417             Object paramObj0 = new LongWrapper(groupId);
418 
419             Object paramObj1 = new LongWrapper(parentFolderId);
420 
421             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
422                     "getFolders", new Object[] { paramObj0, paramObj1 });
423 
424             Object returnObj = null;
425 
426             try {
427                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
428             }
429             catch (Exception e) {
430                 if (e instanceof com.liferay.portal.PortalException) {
431                     throw (com.liferay.portal.PortalException)e;
432                 }
433 
434                 if (e instanceof com.liferay.portal.SystemException) {
435                     throw (com.liferay.portal.SystemException)e;
436                 }
437 
438                 throw new com.liferay.portal.SystemException(e);
439             }
440 
441             return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder>)returnObj;
442         }
443         catch (com.liferay.portal.SystemException se) {
444             _log.error(se, se);
445 
446             throw se;
447         }
448     }
449 
450     public static boolean hasInheritableLock(HttpPrincipal httpPrincipal,
451         long folderId)
452         throws com.liferay.portal.SystemException,
453             com.liferay.portal.PortalException {
454         try {
455             Object paramObj0 = new LongWrapper(folderId);
456 
457             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
458                     "hasInheritableLock", new Object[] { paramObj0 });
459 
460             Object returnObj = null;
461 
462             try {
463                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
464             }
465             catch (Exception e) {
466                 if (e instanceof com.liferay.portal.PortalException) {
467                     throw (com.liferay.portal.PortalException)e;
468                 }
469 
470                 throw new com.liferay.portal.SystemException(e);
471             }
472 
473             return ((Boolean)returnObj).booleanValue();
474         }
475         catch (com.liferay.portal.SystemException se) {
476             _log.error(se, se);
477 
478             throw se;
479         }
480     }
481 
482     public static com.liferay.lock.model.Lock lockFolder(
483         HttpPrincipal httpPrincipal, long folderId)
484         throws com.liferay.portal.PortalException,
485             com.liferay.portal.SystemException, java.rmi.RemoteException {
486         try {
487             Object paramObj0 = new LongWrapper(folderId);
488 
489             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
490                     "lockFolder", new Object[] { paramObj0 });
491 
492             Object returnObj = null;
493 
494             try {
495                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
496             }
497             catch (Exception e) {
498                 if (e instanceof com.liferay.portal.PortalException) {
499                     throw (com.liferay.portal.PortalException)e;
500                 }
501 
502                 if (e instanceof com.liferay.portal.SystemException) {
503                     throw (com.liferay.portal.SystemException)e;
504                 }
505 
506                 if (e instanceof java.rmi.RemoteException) {
507                     throw (java.rmi.RemoteException)e;
508                 }
509 
510                 throw new com.liferay.portal.SystemException(e);
511             }
512 
513             return (com.liferay.lock.model.Lock)returnObj;
514         }
515         catch (com.liferay.portal.SystemException se) {
516             _log.error(se, se);
517 
518             throw se;
519         }
520     }
521 
522     public static com.liferay.lock.model.Lock lockFolder(
523         HttpPrincipal httpPrincipal, long folderId, java.lang.String owner,
524         boolean inheritable, long expirationTime)
525         throws com.liferay.portal.PortalException,
526             com.liferay.portal.SystemException, java.rmi.RemoteException {
527         try {
528             Object paramObj0 = new LongWrapper(folderId);
529 
530             Object paramObj1 = owner;
531 
532             if (owner == null) {
533                 paramObj1 = new NullWrapper("java.lang.String");
534             }
535 
536             Object paramObj2 = new BooleanWrapper(inheritable);
537 
538             Object paramObj3 = new LongWrapper(expirationTime);
539 
540             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
541                     "lockFolder",
542                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
543 
544             Object returnObj = null;
545 
546             try {
547                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
548             }
549             catch (Exception e) {
550                 if (e instanceof com.liferay.portal.PortalException) {
551                     throw (com.liferay.portal.PortalException)e;
552                 }
553 
554                 if (e instanceof com.liferay.portal.SystemException) {
555                     throw (com.liferay.portal.SystemException)e;
556                 }
557 
558                 if (e instanceof java.rmi.RemoteException) {
559                     throw (java.rmi.RemoteException)e;
560                 }
561 
562                 throw new com.liferay.portal.SystemException(e);
563             }
564 
565             return (com.liferay.lock.model.Lock)returnObj;
566         }
567         catch (com.liferay.portal.SystemException se) {
568             _log.error(se, se);
569 
570             throw se;
571         }
572     }
573 
574     public static com.liferay.lock.model.Lock refreshFolderLock(
575         HttpPrincipal httpPrincipal, java.lang.String lockUuid,
576         long expirationTime)
577         throws com.liferay.portal.SystemException,
578             com.liferay.portal.PortalException {
579         try {
580             Object paramObj0 = lockUuid;
581 
582             if (lockUuid == null) {
583                 paramObj0 = new NullWrapper("java.lang.String");
584             }
585 
586             Object paramObj1 = new LongWrapper(expirationTime);
587 
588             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
589                     "refreshFolderLock", new Object[] { paramObj0, paramObj1 });
590 
591             Object returnObj = null;
592 
593             try {
594                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
595             }
596             catch (Exception e) {
597                 if (e instanceof com.liferay.portal.PortalException) {
598                     throw (com.liferay.portal.PortalException)e;
599                 }
600 
601                 throw new com.liferay.portal.SystemException(e);
602             }
603 
604             return (com.liferay.lock.model.Lock)returnObj;
605         }
606         catch (com.liferay.portal.SystemException se) {
607             _log.error(se, se);
608 
609             throw se;
610         }
611     }
612 
613     public static void reIndexSearch(HttpPrincipal httpPrincipal, long companyId)
614         throws com.liferay.portal.PortalException,
615             com.liferay.portal.SystemException {
616         try {
617             Object paramObj0 = new LongWrapper(companyId);
618 
619             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
620                     "reIndexSearch", new Object[] { paramObj0 });
621 
622             try {
623                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
624             }
625             catch (Exception e) {
626                 if (e instanceof com.liferay.portal.PortalException) {
627                     throw (com.liferay.portal.PortalException)e;
628                 }
629 
630                 if (e instanceof com.liferay.portal.SystemException) {
631                     throw (com.liferay.portal.SystemException)e;
632                 }
633 
634                 throw new com.liferay.portal.SystemException(e);
635             }
636         }
637         catch (com.liferay.portal.SystemException se) {
638             _log.error(se, se);
639 
640             throw se;
641         }
642     }
643 
644     public static void unlockFolder(HttpPrincipal httpPrincipal, long folderId,
645         java.lang.String lockUuid)
646         throws com.liferay.portal.SystemException,
647             com.liferay.portal.PortalException {
648         try {
649             Object paramObj0 = new LongWrapper(folderId);
650 
651             Object paramObj1 = lockUuid;
652 
653             if (lockUuid == null) {
654                 paramObj1 = new NullWrapper("java.lang.String");
655             }
656 
657             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
658                     "unlockFolder", new Object[] { paramObj0, paramObj1 });
659 
660             try {
661                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
662             }
663             catch (Exception e) {
664                 if (e instanceof com.liferay.portal.PortalException) {
665                     throw (com.liferay.portal.PortalException)e;
666                 }
667 
668                 throw new com.liferay.portal.SystemException(e);
669             }
670         }
671         catch (com.liferay.portal.SystemException se) {
672             _log.error(se, se);
673 
674             throw se;
675         }
676     }
677 
678     public static void unlockFolder(HttpPrincipal httpPrincipal, long groupId,
679         long parentFolderId, java.lang.String name, java.lang.String lockUuid)
680         throws com.liferay.portal.PortalException,
681             com.liferay.portal.SystemException {
682         try {
683             Object paramObj0 = new LongWrapper(groupId);
684 
685             Object paramObj1 = new LongWrapper(parentFolderId);
686 
687             Object paramObj2 = name;
688 
689             if (name == null) {
690                 paramObj2 = new NullWrapper("java.lang.String");
691             }
692 
693             Object paramObj3 = lockUuid;
694 
695             if (lockUuid == null) {
696                 paramObj3 = new NullWrapper("java.lang.String");
697             }
698 
699             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
700                     "unlockFolder",
701                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
702 
703             try {
704                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
705             }
706             catch (Exception e) {
707                 if (e instanceof com.liferay.portal.PortalException) {
708                     throw (com.liferay.portal.PortalException)e;
709                 }
710 
711                 if (e instanceof com.liferay.portal.SystemException) {
712                     throw (com.liferay.portal.SystemException)e;
713                 }
714 
715                 throw new com.liferay.portal.SystemException(e);
716             }
717         }
718         catch (com.liferay.portal.SystemException se) {
719             _log.error(se, se);
720 
721             throw se;
722         }
723     }
724 
725     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
726         HttpPrincipal httpPrincipal, long folderId, long parentFolderId,
727         java.lang.String name, java.lang.String description,
728         com.liferay.portal.service.ServiceContext serviceContext)
729         throws com.liferay.portal.PortalException,
730             com.liferay.portal.SystemException, java.rmi.RemoteException {
731         try {
732             Object paramObj0 = new LongWrapper(folderId);
733 
734             Object paramObj1 = new LongWrapper(parentFolderId);
735 
736             Object paramObj2 = name;
737 
738             if (name == null) {
739                 paramObj2 = new NullWrapper("java.lang.String");
740             }
741 
742             Object paramObj3 = description;
743 
744             if (description == null) {
745                 paramObj3 = new NullWrapper("java.lang.String");
746             }
747 
748             Object paramObj4 = serviceContext;
749 
750             if (serviceContext == null) {
751                 paramObj4 = new NullWrapper(
752                         "com.liferay.portal.service.ServiceContext");
753             }
754 
755             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
756                     "updateFolder",
757                     new Object[] {
758                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
759                     });
760 
761             Object returnObj = null;
762 
763             try {
764                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
765             }
766             catch (Exception e) {
767                 if (e instanceof com.liferay.portal.PortalException) {
768                     throw (com.liferay.portal.PortalException)e;
769                 }
770 
771                 if (e instanceof com.liferay.portal.SystemException) {
772                     throw (com.liferay.portal.SystemException)e;
773                 }
774 
775                 if (e instanceof java.rmi.RemoteException) {
776                     throw (java.rmi.RemoteException)e;
777                 }
778 
779                 throw new com.liferay.portal.SystemException(e);
780             }
781 
782             return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
783         }
784         catch (com.liferay.portal.SystemException se) {
785             _log.error(se, se);
786 
787             throw se;
788         }
789     }
790 
791     public static boolean verifyInheritableLock(HttpPrincipal httpPrincipal,
792         long folderId, java.lang.String lockUuid)
793         throws com.liferay.portal.SystemException,
794             com.liferay.portal.PortalException {
795         try {
796             Object paramObj0 = new LongWrapper(folderId);
797 
798             Object paramObj1 = lockUuid;
799 
800             if (lockUuid == null) {
801                 paramObj1 = new NullWrapper("java.lang.String");
802             }
803 
804             MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
805                     "verifyInheritableLock",
806                     new Object[] { paramObj0, paramObj1 });
807 
808             Object returnObj = null;
809 
810             try {
811                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
812             }
813             catch (Exception e) {
814                 if (e instanceof com.liferay.portal.PortalException) {
815                     throw (com.liferay.portal.PortalException)e;
816                 }
817 
818                 throw new com.liferay.portal.SystemException(e);
819             }
820 
821             return ((Boolean)returnObj).booleanValue();
822         }
823         catch (com.liferay.portal.SystemException se) {
824             _log.error(se, se);
825 
826             throw se;
827         }
828     }
829 
830     private static Log _log = LogFactoryUtil.getLog(DLFolderServiceHttp.class);
831 }