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