1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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   * {@link com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil} service utility. The
48   * static methods of this class calls the same methods of the service utility.
49   * However, the signatures are different because it requires an additional
50   * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
51   * </p>
52   *
53   * <p>
54   * The benefits of using the HTTP utility is that it is fast and allows for
55   * tunneling without the cost of serializing to text. The drawback is that it
56   * only works with Java.
57   * </p>
58   *
59   * <p>
60   * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
61   * configure security.
62   * </p>
63   *
64   * <p>
65   * The HTTP utility is only generated for remote services.
66   * </p>
67   *
68   * @author    Brian Wing Shun Chan
69   * @see       DLFileEntryServiceSoap
70   * @see       com.liferay.portal.security.auth.HttpPrincipal
71   * @see       com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil
72   * @generated
73   */
74  public class DLFileEntryServiceHttp {
75      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
76          HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
77          java.lang.String title, java.lang.String description,
78          java.lang.String[] tagsEntries, java.lang.String extraSettings,
79          java.io.File file, boolean addCommunityPermissions,
80          boolean addGuestPermissions)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException {
83          try {
84              Object paramObj0 = new LongWrapper(folderId);
85  
86              Object paramObj1 = name;
87  
88              if (name == null) {
89                  paramObj1 = new NullWrapper("java.lang.String");
90              }
91  
92              Object paramObj2 = title;
93  
94              if (title == null) {
95                  paramObj2 = new NullWrapper("java.lang.String");
96              }
97  
98              Object paramObj3 = description;
99  
100             if (description == null) {
101                 paramObj3 = new NullWrapper("java.lang.String");
102             }
103 
104             Object paramObj4 = tagsEntries;
105 
106             if (tagsEntries == null) {
107                 paramObj4 = new NullWrapper("[Ljava.lang.String;");
108             }
109 
110             Object paramObj5 = extraSettings;
111 
112             if (extraSettings == null) {
113                 paramObj5 = new NullWrapper("java.lang.String");
114             }
115 
116             Object paramObj6 = file;
117 
118             if (file == null) {
119                 paramObj6 = new NullWrapper("java.io.File");
120             }
121 
122             Object paramObj7 = new BooleanWrapper(addCommunityPermissions);
123 
124             Object paramObj8 = new BooleanWrapper(addGuestPermissions);
125 
126             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
127                     "addFileEntry",
128                     new Object[] {
129                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
130                         paramObj5, paramObj6, paramObj7, paramObj8
131                     });
132 
133             Object returnObj = null;
134 
135             try {
136                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
137             }
138             catch (Exception e) {
139                 if (e instanceof com.liferay.portal.PortalException) {
140                     throw (com.liferay.portal.PortalException)e;
141                 }
142 
143                 if (e instanceof com.liferay.portal.SystemException) {
144                     throw (com.liferay.portal.SystemException)e;
145                 }
146 
147                 throw new com.liferay.portal.SystemException(e);
148             }
149 
150             return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
151         }
152         catch (com.liferay.portal.SystemException se) {
153             _log.error(se, se);
154 
155             throw se;
156         }
157     }
158 
159     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
160         HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
161         java.lang.String title, java.lang.String description,
162         java.lang.String[] tagsEntries, java.lang.String extraSettings,
163         byte[] bytes, boolean addCommunityPermissions,
164         boolean addGuestPermissions)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         try {
168             Object paramObj0 = new LongWrapper(folderId);
169 
170             Object paramObj1 = name;
171 
172             if (name == null) {
173                 paramObj1 = new NullWrapper("java.lang.String");
174             }
175 
176             Object paramObj2 = title;
177 
178             if (title == null) {
179                 paramObj2 = new NullWrapper("java.lang.String");
180             }
181 
182             Object paramObj3 = description;
183 
184             if (description == null) {
185                 paramObj3 = new NullWrapper("java.lang.String");
186             }
187 
188             Object paramObj4 = tagsEntries;
189 
190             if (tagsEntries == null) {
191                 paramObj4 = new NullWrapper("[Ljava.lang.String;");
192             }
193 
194             Object paramObj5 = extraSettings;
195 
196             if (extraSettings == null) {
197                 paramObj5 = new NullWrapper("java.lang.String");
198             }
199 
200             Object paramObj6 = bytes;
201 
202             if (bytes == null) {
203                 paramObj6 = new NullWrapper("[B");
204             }
205 
206             Object paramObj7 = new BooleanWrapper(addCommunityPermissions);
207 
208             Object paramObj8 = new BooleanWrapper(addGuestPermissions);
209 
210             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
211                     "addFileEntry",
212                     new Object[] {
213                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
214                         paramObj5, paramObj6, paramObj7, paramObj8
215                     });
216 
217             Object returnObj = null;
218 
219             try {
220                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
221             }
222             catch (Exception e) {
223                 if (e instanceof com.liferay.portal.PortalException) {
224                     throw (com.liferay.portal.PortalException)e;
225                 }
226 
227                 if (e instanceof com.liferay.portal.SystemException) {
228                     throw (com.liferay.portal.SystemException)e;
229                 }
230 
231                 throw new com.liferay.portal.SystemException(e);
232             }
233 
234             return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
235         }
236         catch (com.liferay.portal.SystemException se) {
237             _log.error(se, se);
238 
239             throw se;
240         }
241     }
242 
243     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
244         HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
245         java.lang.String title, java.lang.String description,
246         java.lang.String[] tagsEntries, java.lang.String extraSettings,
247         java.io.File file, java.lang.String[] communityPermissions,
248         java.lang.String[] guestPermissions)
249         throws com.liferay.portal.PortalException,
250             com.liferay.portal.SystemException {
251         try {
252             Object paramObj0 = new LongWrapper(folderId);
253 
254             Object paramObj1 = name;
255 
256             if (name == null) {
257                 paramObj1 = new NullWrapper("java.lang.String");
258             }
259 
260             Object paramObj2 = title;
261 
262             if (title == null) {
263                 paramObj2 = new NullWrapper("java.lang.String");
264             }
265 
266             Object paramObj3 = description;
267 
268             if (description == null) {
269                 paramObj3 = new NullWrapper("java.lang.String");
270             }
271 
272             Object paramObj4 = tagsEntries;
273 
274             if (tagsEntries == null) {
275                 paramObj4 = new NullWrapper("[Ljava.lang.String;");
276             }
277 
278             Object paramObj5 = extraSettings;
279 
280             if (extraSettings == null) {
281                 paramObj5 = new NullWrapper("java.lang.String");
282             }
283 
284             Object paramObj6 = file;
285 
286             if (file == null) {
287                 paramObj6 = new NullWrapper("java.io.File");
288             }
289 
290             Object paramObj7 = communityPermissions;
291 
292             if (communityPermissions == null) {
293                 paramObj7 = new NullWrapper("[Ljava.lang.String;");
294             }
295 
296             Object paramObj8 = guestPermissions;
297 
298             if (guestPermissions == null) {
299                 paramObj8 = new NullWrapper("[Ljava.lang.String;");
300             }
301 
302             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
303                     "addFileEntry",
304                     new Object[] {
305                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
306                         paramObj5, paramObj6, paramObj7, paramObj8
307                     });
308 
309             Object returnObj = null;
310 
311             try {
312                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
313             }
314             catch (Exception e) {
315                 if (e instanceof com.liferay.portal.PortalException) {
316                     throw (com.liferay.portal.PortalException)e;
317                 }
318 
319                 if (e instanceof com.liferay.portal.SystemException) {
320                     throw (com.liferay.portal.SystemException)e;
321                 }
322 
323                 throw new com.liferay.portal.SystemException(e);
324             }
325 
326             return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
327         }
328         catch (com.liferay.portal.SystemException se) {
329             _log.error(se, se);
330 
331             throw se;
332         }
333     }
334 
335     public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
336         HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
337         java.lang.String title, java.lang.String description,
338         java.lang.String[] tagsEntries, java.lang.String extraSettings,
339         byte[] bytes, java.lang.String[] communityPermissions,
340         java.lang.String[] guestPermissions)
341         throws com.liferay.portal.PortalException,
342             com.liferay.portal.SystemException {
343         try {
344             Object paramObj0 = new LongWrapper(folderId);
345 
346             Object paramObj1 = name;
347 
348             if (name == null) {
349                 paramObj1 = new NullWrapper("java.lang.String");
350             }
351 
352             Object paramObj2 = title;
353 
354             if (title == null) {
355                 paramObj2 = new NullWrapper("java.lang.String");
356             }
357 
358             Object paramObj3 = description;
359 
360             if (description == null) {
361                 paramObj3 = new NullWrapper("java.lang.String");
362             }
363 
364             Object paramObj4 = tagsEntries;
365 
366             if (tagsEntries == null) {
367                 paramObj4 = new NullWrapper("[Ljava.lang.String;");
368             }
369 
370             Object paramObj5 = extraSettings;
371 
372             if (extraSettings == null) {
373                 paramObj5 = new NullWrapper("java.lang.String");
374             }
375 
376             Object paramObj6 = bytes;
377 
378             if (bytes == null) {
379                 paramObj6 = new NullWrapper("[B");
380             }
381 
382             Object paramObj7 = communityPermissions;
383 
384             if (communityPermissions == null) {
385                 paramObj7 = new NullWrapper("[Ljava.lang.String;");
386             }
387 
388             Object paramObj8 = guestPermissions;
389 
390             if (guestPermissions == null) {
391                 paramObj8 = new NullWrapper("[Ljava.lang.String;");
392             }
393 
394             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
395                     "addFileEntry",
396                     new Object[] {
397                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
398                         paramObj5, paramObj6, paramObj7, paramObj8
399                     });
400 
401             Object returnObj = null;
402 
403             try {
404                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
405             }
406             catch (Exception e) {
407                 if (e instanceof com.liferay.portal.PortalException) {
408                     throw (com.liferay.portal.PortalException)e;
409                 }
410 
411                 if (e instanceof com.liferay.portal.SystemException) {
412                     throw (com.liferay.portal.SystemException)e;
413                 }
414 
415                 throw new com.liferay.portal.SystemException(e);
416             }
417 
418             return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
419         }
420         catch (com.liferay.portal.SystemException se) {
421             _log.error(se, se);
422 
423             throw se;
424         }
425     }
426 
427     public static void deleteFileEntry(HttpPrincipal httpPrincipal,
428         long folderId, java.lang.String name)
429         throws com.liferay.portal.PortalException,
430             com.liferay.portal.SystemException, java.rmi.RemoteException {
431         try {
432             Object paramObj0 = new LongWrapper(folderId);
433 
434             Object paramObj1 = name;
435 
436             if (name == null) {
437                 paramObj1 = new NullWrapper("java.lang.String");
438             }
439 
440             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
441                     "deleteFileEntry", new Object[] { paramObj0, paramObj1 });
442 
443             try {
444                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
445             }
446             catch (Exception e) {
447                 if (e instanceof com.liferay.portal.PortalException) {
448                     throw (com.liferay.portal.PortalException)e;
449                 }
450 
451                 if (e instanceof com.liferay.portal.SystemException) {
452                     throw (com.liferay.portal.SystemException)e;
453                 }
454 
455                 if (e instanceof java.rmi.RemoteException) {
456                     throw (java.rmi.RemoteException)e;
457                 }
458 
459                 throw new com.liferay.portal.SystemException(e);
460             }
461         }
462         catch (com.liferay.portal.SystemException se) {
463             _log.error(se, se);
464 
465             throw se;
466         }
467     }
468 
469     public static void deleteFileEntry(HttpPrincipal httpPrincipal,
470         long folderId, java.lang.String name, double version)
471         throws com.liferay.portal.PortalException,
472             com.liferay.portal.SystemException, java.rmi.RemoteException {
473         try {
474             Object paramObj0 = new LongWrapper(folderId);
475 
476             Object paramObj1 = name;
477 
478             if (name == null) {
479                 paramObj1 = new NullWrapper("java.lang.String");
480             }
481 
482             Object paramObj2 = new DoubleWrapper(version);
483 
484             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
485                     "deleteFileEntry",
486                     new Object[] { paramObj0, paramObj1, paramObj2 });
487 
488             try {
489                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
490             }
491             catch (Exception e) {
492                 if (e instanceof com.liferay.portal.PortalException) {
493                     throw (com.liferay.portal.PortalException)e;
494                 }
495 
496                 if (e instanceof com.liferay.portal.SystemException) {
497                     throw (com.liferay.portal.SystemException)e;
498                 }
499 
500                 if (e instanceof java.rmi.RemoteException) {
501                     throw (java.rmi.RemoteException)e;
502                 }
503 
504                 throw new com.liferay.portal.SystemException(e);
505             }
506         }
507         catch (com.liferay.portal.SystemException se) {
508             _log.error(se, se);
509 
510             throw se;
511         }
512     }
513 
514     public static void deleteFileEntryByTitle(HttpPrincipal httpPrincipal,
515         long folderId, java.lang.String titleWithExtension)
516         throws com.liferay.portal.PortalException,
517             com.liferay.portal.SystemException, java.rmi.RemoteException {
518         try {
519             Object paramObj0 = new LongWrapper(folderId);
520 
521             Object paramObj1 = titleWithExtension;
522 
523             if (titleWithExtension == null) {
524                 paramObj1 = new NullWrapper("java.lang.String");
525             }
526 
527             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
528                     "deleteFileEntryByTitle",
529                     new Object[] { paramObj0, paramObj1 });
530 
531             try {
532                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
533             }
534             catch (Exception e) {
535                 if (e instanceof com.liferay.portal.PortalException) {
536                     throw (com.liferay.portal.PortalException)e;
537                 }
538 
539                 if (e instanceof com.liferay.portal.SystemException) {
540                     throw (com.liferay.portal.SystemException)e;
541                 }
542 
543                 if (e instanceof java.rmi.RemoteException) {
544                     throw (java.rmi.RemoteException)e;
545                 }
546 
547                 throw new com.liferay.portal.SystemException(e);
548             }
549         }
550         catch (com.liferay.portal.SystemException se) {
551             _log.error(se, se);
552 
553             throw se;
554         }
555     }
556 
557     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
558         HttpPrincipal httpPrincipal, long folderId)
559         throws com.liferay.portal.PortalException,
560             com.liferay.portal.SystemException {
561         try {
562             Object paramObj0 = new LongWrapper(folderId);
563 
564             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
565                     "getFileEntries", new Object[] { paramObj0 });
566 
567             Object returnObj = null;
568 
569             try {
570                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
571             }
572             catch (Exception e) {
573                 if (e instanceof com.liferay.portal.PortalException) {
574                     throw (com.liferay.portal.PortalException)e;
575                 }
576 
577                 if (e instanceof com.liferay.portal.SystemException) {
578                     throw (com.liferay.portal.SystemException)e;
579                 }
580 
581                 throw new com.liferay.portal.SystemException(e);
582             }
583 
584             return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
585         }
586         catch (com.liferay.portal.SystemException se) {
587             _log.error(se, se);
588 
589             throw se;
590         }
591     }
592 
593     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
594         HttpPrincipal httpPrincipal, long folderId, java.lang.String name)
595         throws com.liferay.portal.PortalException,
596             com.liferay.portal.SystemException {
597         try {
598             Object paramObj0 = new LongWrapper(folderId);
599 
600             Object paramObj1 = name;
601 
602             if (name == null) {
603                 paramObj1 = new NullWrapper("java.lang.String");
604             }
605 
606             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
607                     "getFileEntry", new Object[] { paramObj0, paramObj1 });
608 
609             Object returnObj = null;
610 
611             try {
612                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
613             }
614             catch (Exception e) {
615                 if (e instanceof com.liferay.portal.PortalException) {
616                     throw (com.liferay.portal.PortalException)e;
617                 }
618 
619                 if (e instanceof com.liferay.portal.SystemException) {
620                     throw (com.liferay.portal.SystemException)e;
621                 }
622 
623                 throw new com.liferay.portal.SystemException(e);
624             }
625 
626             return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
627         }
628         catch (com.liferay.portal.SystemException se) {
629             _log.error(se, se);
630 
631             throw se;
632         }
633     }
634 
635     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
636         HttpPrincipal httpPrincipal, long folderId,
637         java.lang.String titleWithExtension)
638         throws com.liferay.portal.PortalException,
639             com.liferay.portal.SystemException {
640         try {
641             Object paramObj0 = new LongWrapper(folderId);
642 
643             Object paramObj1 = titleWithExtension;
644 
645             if (titleWithExtension == null) {
646                 paramObj1 = new NullWrapper("java.lang.String");
647             }
648 
649             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
650                     "getFileEntryByTitle", new Object[] { paramObj0, paramObj1 });
651 
652             Object returnObj = null;
653 
654             try {
655                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
656             }
657             catch (Exception e) {
658                 if (e instanceof com.liferay.portal.PortalException) {
659                     throw (com.liferay.portal.PortalException)e;
660                 }
661 
662                 if (e instanceof com.liferay.portal.SystemException) {
663                     throw (com.liferay.portal.SystemException)e;
664                 }
665 
666                 throw new com.liferay.portal.SystemException(e);
667             }
668 
669             return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
670         }
671         catch (com.liferay.portal.SystemException se) {
672             _log.error(se, se);
673 
674             throw se;
675         }
676     }
677 
678     public static com.liferay.portal.model.Lock getFileEntryLock(
679         HttpPrincipal httpPrincipal, long folderId, java.lang.String name)
680         throws com.liferay.portal.PortalException,
681             com.liferay.portal.SystemException, java.rmi.RemoteException {
682         try {
683             Object paramObj0 = new LongWrapper(folderId);
684 
685             Object paramObj1 = name;
686 
687             if (name == null) {
688                 paramObj1 = new NullWrapper("java.lang.String");
689             }
690 
691             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
692                     "getFileEntryLock", new Object[] { paramObj0, paramObj1 });
693 
694             Object returnObj = null;
695 
696             try {
697                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
698             }
699             catch (Exception e) {
700                 if (e instanceof com.liferay.portal.PortalException) {
701                     throw (com.liferay.portal.PortalException)e;
702                 }
703 
704                 if (e instanceof com.liferay.portal.SystemException) {
705                     throw (com.liferay.portal.SystemException)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             return (com.liferay.portal.model.Lock)returnObj;
716         }
717         catch (com.liferay.portal.SystemException se) {
718             _log.error(se, se);
719 
720             throw se;
721         }
722     }
723 
724     public static com.liferay.portal.model.Lock lockFileEntry(
725         HttpPrincipal httpPrincipal, long folderId, java.lang.String name)
726         throws com.liferay.portal.PortalException,
727             com.liferay.portal.SystemException, java.rmi.RemoteException {
728         try {
729             Object paramObj0 = new LongWrapper(folderId);
730 
731             Object paramObj1 = name;
732 
733             if (name == null) {
734                 paramObj1 = new NullWrapper("java.lang.String");
735             }
736 
737             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
738                     "lockFileEntry", new Object[] { paramObj0, paramObj1 });
739 
740             Object returnObj = null;
741 
742             try {
743                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
744             }
745             catch (Exception e) {
746                 if (e instanceof com.liferay.portal.PortalException) {
747                     throw (com.liferay.portal.PortalException)e;
748                 }
749 
750                 if (e instanceof com.liferay.portal.SystemException) {
751                     throw (com.liferay.portal.SystemException)e;
752                 }
753 
754                 if (e instanceof java.rmi.RemoteException) {
755                     throw (java.rmi.RemoteException)e;
756                 }
757 
758                 throw new com.liferay.portal.SystemException(e);
759             }
760 
761             return (com.liferay.portal.model.Lock)returnObj;
762         }
763         catch (com.liferay.portal.SystemException se) {
764             _log.error(se, se);
765 
766             throw se;
767         }
768     }
769 
770     public static com.liferay.portal.model.Lock lockFileEntry(
771         HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
772         java.lang.String owner, long expirationTime)
773         throws com.liferay.portal.PortalException,
774             com.liferay.portal.SystemException, java.rmi.RemoteException {
775         try {
776             Object paramObj0 = new LongWrapper(folderId);
777 
778             Object paramObj1 = name;
779 
780             if (name == null) {
781                 paramObj1 = new NullWrapper("java.lang.String");
782             }
783 
784             Object paramObj2 = owner;
785 
786             if (owner == null) {
787                 paramObj2 = new NullWrapper("java.lang.String");
788             }
789 
790             Object paramObj3 = new LongWrapper(expirationTime);
791 
792             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
793                     "lockFileEntry",
794                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
795 
796             Object returnObj = null;
797 
798             try {
799                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
800             }
801             catch (Exception e) {
802                 if (e instanceof com.liferay.portal.PortalException) {
803                     throw (com.liferay.portal.PortalException)e;
804                 }
805 
806                 if (e instanceof com.liferay.portal.SystemException) {
807                     throw (com.liferay.portal.SystemException)e;
808                 }
809 
810                 if (e instanceof java.rmi.RemoteException) {
811                     throw (java.rmi.RemoteException)e;
812                 }
813 
814                 throw new com.liferay.portal.SystemException(e);
815             }
816 
817             return (com.liferay.portal.model.Lock)returnObj;
818         }
819         catch (com.liferay.portal.SystemException se) {
820             _log.error(se, se);
821 
822             throw se;
823         }
824     }
825 
826     public static com.liferay.portal.model.Lock refreshFileEntryLock(
827         HttpPrincipal httpPrincipal, java.lang.String lockUuid,
828         long expirationTime)
829         throws com.liferay.portal.PortalException,
830             com.liferay.portal.SystemException, java.rmi.RemoteException {
831         try {
832             Object paramObj0 = lockUuid;
833 
834             if (lockUuid == null) {
835                 paramObj0 = new NullWrapper("java.lang.String");
836             }
837 
838             Object paramObj1 = new LongWrapper(expirationTime);
839 
840             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
841                     "refreshFileEntryLock",
842                     new Object[] { paramObj0, paramObj1 });
843 
844             Object returnObj = null;
845 
846             try {
847                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
848             }
849             catch (Exception e) {
850                 if (e instanceof com.liferay.portal.PortalException) {
851                     throw (com.liferay.portal.PortalException)e;
852                 }
853 
854                 if (e instanceof com.liferay.portal.SystemException) {
855                     throw (com.liferay.portal.SystemException)e;
856                 }
857 
858                 if (e instanceof java.rmi.RemoteException) {
859                     throw (java.rmi.RemoteException)e;
860                 }
861 
862                 throw new com.liferay.portal.SystemException(e);
863             }
864 
865             return (com.liferay.portal.model.Lock)returnObj;
866         }
867         catch (com.liferay.portal.SystemException se) {
868             _log.error(se, se);
869 
870             throw se;
871         }
872     }
873 
874     public static void unlockFileEntry(HttpPrincipal httpPrincipal,
875         long folderId, java.lang.String name)
876         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
877         try {
878             Object paramObj0 = new LongWrapper(folderId);
879 
880             Object paramObj1 = name;
881 
882             if (name == null) {
883                 paramObj1 = new NullWrapper("java.lang.String");
884             }
885 
886             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
887                     "unlockFileEntry", new Object[] { paramObj0, paramObj1 });
888 
889             try {
890                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
891             }
892             catch (Exception e) {
893                 if (e instanceof com.liferay.portal.SystemException) {
894                     throw (com.liferay.portal.SystemException)e;
895                 }
896 
897                 if (e instanceof java.rmi.RemoteException) {
898                     throw (java.rmi.RemoteException)e;
899                 }
900 
901                 throw new com.liferay.portal.SystemException(e);
902             }
903         }
904         catch (com.liferay.portal.SystemException se) {
905             _log.error(se, se);
906 
907             throw se;
908         }
909     }
910 
911     public static void unlockFileEntry(HttpPrincipal httpPrincipal,
912         long folderId, java.lang.String name, java.lang.String lockUuid)
913         throws com.liferay.portal.PortalException,
914             com.liferay.portal.SystemException, java.rmi.RemoteException {
915         try {
916             Object paramObj0 = new LongWrapper(folderId);
917 
918             Object paramObj1 = name;
919 
920             if (name == null) {
921                 paramObj1 = new NullWrapper("java.lang.String");
922             }
923 
924             Object paramObj2 = lockUuid;
925 
926             if (lockUuid == null) {
927                 paramObj2 = new NullWrapper("java.lang.String");
928             }
929 
930             MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
931                     "unlockFileEntry",
932                     new Object[] { paramObj0, paramObj1, paramObj2 });
933 
934             try {
935                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
936             }
937             catch (Exception e) {
938                 if (e instanceof com.liferay.portal.PortalException) {
939                     throw (com.liferay.portal.PortalException)e;
940                 }
941 
942                 if (e instanceof com.liferay.portal.SystemException) {
943                     throw (com.liferay.portal.SystemException)e;
944                 }
945 
946                 if (e instanceof java.rmi.RemoteException) {
947                     throw (java.rmi.RemoteException)e;
948                 }
949 
950                 throw new com.liferay.portal.SystemException(e);
951             }
952         }
953         catch (com.liferay.portal.SystemException se) {
954             _log.error(se, se);
955 
956             throw se;
957         }
958     }
959 
960     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
961         HttpPrincipal httpPrincipal, long folderId, long newFolderId,
962         java.lang.String name, java.lang.String sourceFileName,
963         java.lang.String title, java.lang.String description,
964         java.lang.String[] tagsEntries, java.lang.String extraSettings,
965         byte[] bytes)
966         throws com.liferay.portal.PortalException,
967             com.liferay.portal.SystemException, java.rmi.RemoteException {
968         try {
969             Object paramObj0 = new LongWrapper(folderId);
970 
971             Object paramObj1 = new LongWrapper(newFolderId);
972 
973             Object paramObj2 = name;
974 
975             if (name == null) {
976                 paramObj2 = new NullWrapper("java.lang.String");
977             }
978 
979             Object paramObj3 = sourceFileName;
980 
981             if (sourceFileName == null) {
982                 paramObj3 = new NullWrapper("java.lang.String");
983             }
984 
985             Object paramObj4 = title;
986 
987             if (title == null) {
988                 paramObj4 = new NullWrapper("java.lang.String");
989             }
990 
991             Object paramObj5 = description;
992 
993             if (description == null) {
994                 paramObj5 = new NullWrapper("java.lang.String");
995             }
996 
997             Object paramObj6 = tagsEntries;
998 
999             if (tagsEntries == null) {
1000                paramObj6 = new NullWrapper("[Ljava.lang.String;");
1001            }
1002
1003            Object paramObj7 = extraSettings;
1004
1005            if (extraSettings == null) {
1006                paramObj7 = new NullWrapper("java.lang.String");
1007            }
1008
1009            Object paramObj8 = bytes;
1010
1011            if (bytes == null) {
1012                paramObj8 = new NullWrapper("[B");
1013            }
1014
1015            MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
1016                    "updateFileEntry",
1017                    new Object[] {
1018                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1019                        paramObj5, paramObj6, paramObj7, paramObj8
1020                    });
1021
1022            Object returnObj = null;
1023
1024            try {
1025                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1026            }
1027            catch (Exception e) {
1028                if (e instanceof com.liferay.portal.PortalException) {
1029                    throw (com.liferay.portal.PortalException)e;
1030                }
1031
1032                if (e instanceof com.liferay.portal.SystemException) {
1033                    throw (com.liferay.portal.SystemException)e;
1034                }
1035
1036                if (e instanceof java.rmi.RemoteException) {
1037                    throw (java.rmi.RemoteException)e;
1038                }
1039
1040                throw new com.liferay.portal.SystemException(e);
1041            }
1042
1043            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
1044        }
1045        catch (com.liferay.portal.SystemException se) {
1046            _log.error(se, se);
1047
1048            throw se;
1049        }
1050    }
1051
1052    private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceHttp.class);
1053}