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