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