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