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.DoubleWrapper;
20 import com.liferay.portal.kernel.util.LongWrapper;
21 import com.liferay.portal.kernel.util.MethodWrapper;
22 import com.liferay.portal.kernel.util.NullWrapper;
23 import com.liferay.portal.security.auth.HttpPrincipal;
24 import com.liferay.portal.service.http.TunnelUtil;
25
26 import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil;
27
28
65 public class DLFileEntryServiceHttp {
66 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
67 HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
68 java.lang.String title, java.lang.String description,
69 java.lang.String extraSettings, byte[] bytes,
70 com.liferay.portal.service.ServiceContext serviceContext)
71 throws com.liferay.portal.PortalException,
72 com.liferay.portal.SystemException {
73 try {
74 Object paramObj0 = new LongWrapper(folderId);
75
76 Object paramObj1 = name;
77
78 if (name == null) {
79 paramObj1 = new NullWrapper("java.lang.String");
80 }
81
82 Object paramObj2 = title;
83
84 if (title == null) {
85 paramObj2 = new NullWrapper("java.lang.String");
86 }
87
88 Object paramObj3 = description;
89
90 if (description == null) {
91 paramObj3 = new NullWrapper("java.lang.String");
92 }
93
94 Object paramObj4 = extraSettings;
95
96 if (extraSettings == null) {
97 paramObj4 = new NullWrapper("java.lang.String");
98 }
99
100 Object paramObj5 = bytes;
101
102 if (bytes == null) {
103 paramObj5 = new NullWrapper("[B");
104 }
105
106 Object paramObj6 = serviceContext;
107
108 if (serviceContext == null) {
109 paramObj6 = new NullWrapper(
110 "com.liferay.portal.service.ServiceContext");
111 }
112
113 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
114 "addFileEntry",
115 new Object[] {
116 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
117 paramObj5, paramObj6
118 });
119
120 Object returnObj = null;
121
122 try {
123 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
124 }
125 catch (Exception e) {
126 if (e instanceof com.liferay.portal.PortalException) {
127 throw (com.liferay.portal.PortalException)e;
128 }
129
130 if (e instanceof com.liferay.portal.SystemException) {
131 throw (com.liferay.portal.SystemException)e;
132 }
133
134 throw new com.liferay.portal.SystemException(e);
135 }
136
137 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
138 }
139 catch (com.liferay.portal.SystemException se) {
140 _log.error(se, se);
141
142 throw se;
143 }
144 }
145
146 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
147 HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
148 java.lang.String title, java.lang.String description,
149 java.lang.String extraSettings, java.io.File file,
150 com.liferay.portal.service.ServiceContext serviceContext)
151 throws com.liferay.portal.PortalException,
152 com.liferay.portal.SystemException {
153 try {
154 Object paramObj0 = new LongWrapper(folderId);
155
156 Object paramObj1 = name;
157
158 if (name == null) {
159 paramObj1 = new NullWrapper("java.lang.String");
160 }
161
162 Object paramObj2 = title;
163
164 if (title == null) {
165 paramObj2 = new NullWrapper("java.lang.String");
166 }
167
168 Object paramObj3 = description;
169
170 if (description == null) {
171 paramObj3 = new NullWrapper("java.lang.String");
172 }
173
174 Object paramObj4 = extraSettings;
175
176 if (extraSettings == null) {
177 paramObj4 = new NullWrapper("java.lang.String");
178 }
179
180 Object paramObj5 = file;
181
182 if (file == null) {
183 paramObj5 = new NullWrapper("java.io.File");
184 }
185
186 Object paramObj6 = serviceContext;
187
188 if (serviceContext == null) {
189 paramObj6 = new NullWrapper(
190 "com.liferay.portal.service.ServiceContext");
191 }
192
193 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
194 "addFileEntry",
195 new Object[] {
196 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
197 paramObj5, paramObj6
198 });
199
200 Object returnObj = null;
201
202 try {
203 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
204 }
205 catch (Exception e) {
206 if (e instanceof com.liferay.portal.PortalException) {
207 throw (com.liferay.portal.PortalException)e;
208 }
209
210 if (e instanceof com.liferay.portal.SystemException) {
211 throw (com.liferay.portal.SystemException)e;
212 }
213
214 throw new com.liferay.portal.SystemException(e);
215 }
216
217 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
218 }
219 catch (com.liferay.portal.SystemException se) {
220 _log.error(se, se);
221
222 throw se;
223 }
224 }
225
226 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
227 HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
228 java.lang.String title, java.lang.String description,
229 java.lang.String versionDescription, java.lang.String extraSettings,
230 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
231 throws com.liferay.portal.PortalException,
232 com.liferay.portal.SystemException {
233 try {
234 Object paramObj0 = new LongWrapper(folderId);
235
236 Object paramObj1 = name;
237
238 if (name == null) {
239 paramObj1 = new NullWrapper("java.lang.String");
240 }
241
242 Object paramObj2 = title;
243
244 if (title == null) {
245 paramObj2 = new NullWrapper("java.lang.String");
246 }
247
248 Object paramObj3 = description;
249
250 if (description == null) {
251 paramObj3 = new NullWrapper("java.lang.String");
252 }
253
254 Object paramObj4 = versionDescription;
255
256 if (versionDescription == null) {
257 paramObj4 = new NullWrapper("java.lang.String");
258 }
259
260 Object paramObj5 = extraSettings;
261
262 if (extraSettings == null) {
263 paramObj5 = new NullWrapper("java.lang.String");
264 }
265
266 Object paramObj6 = bytes;
267
268 if (bytes == null) {
269 paramObj6 = new NullWrapper("[B");
270 }
271
272 Object paramObj7 = serviceContext;
273
274 if (serviceContext == null) {
275 paramObj7 = new NullWrapper(
276 "com.liferay.portal.service.ServiceContext");
277 }
278
279 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
280 "addFileEntry",
281 new Object[] {
282 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
283 paramObj5, paramObj6, paramObj7
284 });
285
286 Object returnObj = null;
287
288 try {
289 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
290 }
291 catch (Exception e) {
292 if (e instanceof com.liferay.portal.PortalException) {
293 throw (com.liferay.portal.PortalException)e;
294 }
295
296 if (e instanceof com.liferay.portal.SystemException) {
297 throw (com.liferay.portal.SystemException)e;
298 }
299
300 throw new com.liferay.portal.SystemException(e);
301 }
302
303 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
304 }
305 catch (com.liferay.portal.SystemException se) {
306 _log.error(se, se);
307
308 throw se;
309 }
310 }
311
312 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
313 HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
314 java.lang.String title, java.lang.String description,
315 java.lang.String versionDescription, java.lang.String extraSettings,
316 java.io.File file,
317 com.liferay.portal.service.ServiceContext serviceContext)
318 throws com.liferay.portal.PortalException,
319 com.liferay.portal.SystemException {
320 try {
321 Object paramObj0 = new LongWrapper(folderId);
322
323 Object paramObj1 = name;
324
325 if (name == null) {
326 paramObj1 = new NullWrapper("java.lang.String");
327 }
328
329 Object paramObj2 = title;
330
331 if (title == null) {
332 paramObj2 = new NullWrapper("java.lang.String");
333 }
334
335 Object paramObj3 = description;
336
337 if (description == null) {
338 paramObj3 = new NullWrapper("java.lang.String");
339 }
340
341 Object paramObj4 = versionDescription;
342
343 if (versionDescription == null) {
344 paramObj4 = new NullWrapper("java.lang.String");
345 }
346
347 Object paramObj5 = extraSettings;
348
349 if (extraSettings == null) {
350 paramObj5 = new NullWrapper("java.lang.String");
351 }
352
353 Object paramObj6 = file;
354
355 if (file == null) {
356 paramObj6 = new NullWrapper("java.io.File");
357 }
358
359 Object paramObj7 = serviceContext;
360
361 if (serviceContext == null) {
362 paramObj7 = new NullWrapper(
363 "com.liferay.portal.service.ServiceContext");
364 }
365
366 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
367 "addFileEntry",
368 new Object[] {
369 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
370 paramObj5, paramObj6, paramObj7
371 });
372
373 Object returnObj = null;
374
375 try {
376 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
377 }
378 catch (Exception e) {
379 if (e instanceof com.liferay.portal.PortalException) {
380 throw (com.liferay.portal.PortalException)e;
381 }
382
383 if (e instanceof com.liferay.portal.SystemException) {
384 throw (com.liferay.portal.SystemException)e;
385 }
386
387 throw new com.liferay.portal.SystemException(e);
388 }
389
390 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
391 }
392 catch (com.liferay.portal.SystemException se) {
393 _log.error(se, se);
394
395 throw se;
396 }
397 }
398
399 public static void deleteFileEntry(HttpPrincipal httpPrincipal,
400 long folderId, java.lang.String name)
401 throws com.liferay.portal.PortalException,
402 com.liferay.portal.SystemException {
403 try {
404 Object paramObj0 = new LongWrapper(folderId);
405
406 Object paramObj1 = name;
407
408 if (name == null) {
409 paramObj1 = new NullWrapper("java.lang.String");
410 }
411
412 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
413 "deleteFileEntry", new Object[] { paramObj0, paramObj1 });
414
415 try {
416 TunnelUtil.invoke(httpPrincipal, methodWrapper);
417 }
418 catch (Exception e) {
419 if (e instanceof com.liferay.portal.PortalException) {
420 throw (com.liferay.portal.PortalException)e;
421 }
422
423 if (e instanceof com.liferay.portal.SystemException) {
424 throw (com.liferay.portal.SystemException)e;
425 }
426
427 throw new com.liferay.portal.SystemException(e);
428 }
429 }
430 catch (com.liferay.portal.SystemException se) {
431 _log.error(se, se);
432
433 throw se;
434 }
435 }
436
437 public static void deleteFileEntry(HttpPrincipal httpPrincipal,
438 long folderId, java.lang.String name, double version)
439 throws com.liferay.portal.PortalException,
440 com.liferay.portal.SystemException {
441 try {
442 Object paramObj0 = new LongWrapper(folderId);
443
444 Object paramObj1 = name;
445
446 if (name == null) {
447 paramObj1 = new NullWrapper("java.lang.String");
448 }
449
450 Object paramObj2 = new DoubleWrapper(version);
451
452 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
453 "deleteFileEntry",
454 new Object[] { paramObj0, paramObj1, paramObj2 });
455
456 try {
457 TunnelUtil.invoke(httpPrincipal, methodWrapper);
458 }
459 catch (Exception e) {
460 if (e instanceof com.liferay.portal.PortalException) {
461 throw (com.liferay.portal.PortalException)e;
462 }
463
464 if (e instanceof com.liferay.portal.SystemException) {
465 throw (com.liferay.portal.SystemException)e;
466 }
467
468 throw new com.liferay.portal.SystemException(e);
469 }
470 }
471 catch (com.liferay.portal.SystemException se) {
472 _log.error(se, se);
473
474 throw se;
475 }
476 }
477
478 public static void deleteFileEntryByTitle(HttpPrincipal httpPrincipal,
479 long folderId, java.lang.String titleWithExtension)
480 throws com.liferay.portal.PortalException,
481 com.liferay.portal.SystemException {
482 try {
483 Object paramObj0 = new LongWrapper(folderId);
484
485 Object paramObj1 = titleWithExtension;
486
487 if (titleWithExtension == null) {
488 paramObj1 = new NullWrapper("java.lang.String");
489 }
490
491 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
492 "deleteFileEntryByTitle",
493 new Object[] { paramObj0, paramObj1 });
494
495 try {
496 TunnelUtil.invoke(httpPrincipal, methodWrapper);
497 }
498 catch (Exception e) {
499 if (e instanceof com.liferay.portal.PortalException) {
500 throw (com.liferay.portal.PortalException)e;
501 }
502
503 if (e instanceof com.liferay.portal.SystemException) {
504 throw (com.liferay.portal.SystemException)e;
505 }
506
507 throw new com.liferay.portal.SystemException(e);
508 }
509 }
510 catch (com.liferay.portal.SystemException se) {
511 _log.error(se, se);
512
513 throw se;
514 }
515 }
516
517 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
518 HttpPrincipal httpPrincipal, long folderId)
519 throws com.liferay.portal.PortalException,
520 com.liferay.portal.SystemException {
521 try {
522 Object paramObj0 = new LongWrapper(folderId);
523
524 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
525 "getFileEntries", new Object[] { paramObj0 });
526
527 Object returnObj = null;
528
529 try {
530 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
531 }
532 catch (Exception e) {
533 if (e instanceof com.liferay.portal.PortalException) {
534 throw (com.liferay.portal.PortalException)e;
535 }
536
537 if (e instanceof com.liferay.portal.SystemException) {
538 throw (com.liferay.portal.SystemException)e;
539 }
540
541 throw new com.liferay.portal.SystemException(e);
542 }
543
544 return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
545 }
546 catch (com.liferay.portal.SystemException se) {
547 _log.error(se, se);
548
549 throw se;
550 }
551 }
552
553 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
554 HttpPrincipal httpPrincipal, long folderId, java.lang.String name)
555 throws com.liferay.portal.PortalException,
556 com.liferay.portal.SystemException {
557 try {
558 Object paramObj0 = new LongWrapper(folderId);
559
560 Object paramObj1 = name;
561
562 if (name == null) {
563 paramObj1 = new NullWrapper("java.lang.String");
564 }
565
566 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
567 "getFileEntry", new Object[] { paramObj0, paramObj1 });
568
569 Object returnObj = null;
570
571 try {
572 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
573 }
574 catch (Exception e) {
575 if (e instanceof com.liferay.portal.PortalException) {
576 throw (com.liferay.portal.PortalException)e;
577 }
578
579 if (e instanceof com.liferay.portal.SystemException) {
580 throw (com.liferay.portal.SystemException)e;
581 }
582
583 throw new com.liferay.portal.SystemException(e);
584 }
585
586 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
587 }
588 catch (com.liferay.portal.SystemException se) {
589 _log.error(se, se);
590
591 throw se;
592 }
593 }
594
595 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
596 HttpPrincipal httpPrincipal, long folderId,
597 java.lang.String titleWithExtension)
598 throws com.liferay.portal.PortalException,
599 com.liferay.portal.SystemException {
600 try {
601 Object paramObj0 = new LongWrapper(folderId);
602
603 Object paramObj1 = titleWithExtension;
604
605 if (titleWithExtension == null) {
606 paramObj1 = new NullWrapper("java.lang.String");
607 }
608
609 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
610 "getFileEntryByTitle", new Object[] { paramObj0, paramObj1 });
611
612 Object returnObj = null;
613
614 try {
615 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
616 }
617 catch (Exception e) {
618 if (e instanceof com.liferay.portal.PortalException) {
619 throw (com.liferay.portal.PortalException)e;
620 }
621
622 if (e instanceof com.liferay.portal.SystemException) {
623 throw (com.liferay.portal.SystemException)e;
624 }
625
626 throw new com.liferay.portal.SystemException(e);
627 }
628
629 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
630 }
631 catch (com.liferay.portal.SystemException se) {
632 _log.error(se, se);
633
634 throw se;
635 }
636 }
637
638 public static boolean hasFileEntryLock(HttpPrincipal httpPrincipal,
639 long folderId, java.lang.String name)
640 throws com.liferay.portal.PortalException,
641 com.liferay.portal.SystemException {
642 try {
643 Object paramObj0 = new LongWrapper(folderId);
644
645 Object paramObj1 = name;
646
647 if (name == null) {
648 paramObj1 = new NullWrapper("java.lang.String");
649 }
650
651 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
652 "hasFileEntryLock", new Object[] { paramObj0, paramObj1 });
653
654 Object returnObj = null;
655
656 try {
657 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
658 }
659 catch (Exception e) {
660 if (e instanceof com.liferay.portal.PortalException) {
661 throw (com.liferay.portal.PortalException)e;
662 }
663
664 if (e instanceof com.liferay.portal.SystemException) {
665 throw (com.liferay.portal.SystemException)e;
666 }
667
668 throw new com.liferay.portal.SystemException(e);
669 }
670
671 return ((Boolean)returnObj).booleanValue();
672 }
673 catch (com.liferay.portal.SystemException se) {
674 _log.error(se, se);
675
676 throw se;
677 }
678 }
679
680 public static com.liferay.portal.model.Lock lockFileEntry(
681 HttpPrincipal httpPrincipal, long folderId, java.lang.String name)
682 throws com.liferay.portal.PortalException,
683 com.liferay.portal.SystemException {
684 try {
685 Object paramObj0 = new LongWrapper(folderId);
686
687 Object paramObj1 = name;
688
689 if (name == null) {
690 paramObj1 = new NullWrapper("java.lang.String");
691 }
692
693 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
694 "lockFileEntry", new Object[] { paramObj0, paramObj1 });
695
696 Object returnObj = null;
697
698 try {
699 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
700 }
701 catch (Exception e) {
702 if (e instanceof com.liferay.portal.PortalException) {
703 throw (com.liferay.portal.PortalException)e;
704 }
705
706 if (e instanceof com.liferay.portal.SystemException) {
707 throw (com.liferay.portal.SystemException)e;
708 }
709
710 throw new com.liferay.portal.SystemException(e);
711 }
712
713 return (com.liferay.portal.model.Lock)returnObj;
714 }
715 catch (com.liferay.portal.SystemException se) {
716 _log.error(se, se);
717
718 throw se;
719 }
720 }
721
722 public static com.liferay.portal.model.Lock lockFileEntry(
723 HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
724 java.lang.String owner, long expirationTime)
725 throws com.liferay.portal.PortalException,
726 com.liferay.portal.SystemException {
727 try {
728 Object paramObj0 = new LongWrapper(folderId);
729
730 Object paramObj1 = name;
731
732 if (name == null) {
733 paramObj1 = new NullWrapper("java.lang.String");
734 }
735
736 Object paramObj2 = owner;
737
738 if (owner == null) {
739 paramObj2 = new NullWrapper("java.lang.String");
740 }
741
742 Object paramObj3 = new LongWrapper(expirationTime);
743
744 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
745 "lockFileEntry",
746 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
747
748 Object returnObj = null;
749
750 try {
751 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
752 }
753 catch (Exception e) {
754 if (e instanceof com.liferay.portal.PortalException) {
755 throw (com.liferay.portal.PortalException)e;
756 }
757
758 if (e instanceof com.liferay.portal.SystemException) {
759 throw (com.liferay.portal.SystemException)e;
760 }
761
762 throw new com.liferay.portal.SystemException(e);
763 }
764
765 return (com.liferay.portal.model.Lock)returnObj;
766 }
767 catch (com.liferay.portal.SystemException se) {
768 _log.error(se, se);
769
770 throw se;
771 }
772 }
773
774 public static com.liferay.portal.model.Lock refreshFileEntryLock(
775 HttpPrincipal httpPrincipal, java.lang.String lockUuid,
776 long expirationTime)
777 throws com.liferay.portal.PortalException,
778 com.liferay.portal.SystemException {
779 try {
780 Object paramObj0 = lockUuid;
781
782 if (lockUuid == null) {
783 paramObj0 = new NullWrapper("java.lang.String");
784 }
785
786 Object paramObj1 = new LongWrapper(expirationTime);
787
788 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
789 "refreshFileEntryLock",
790 new Object[] { paramObj0, paramObj1 });
791
792 Object returnObj = null;
793
794 try {
795 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
796 }
797 catch (Exception e) {
798 if (e instanceof com.liferay.portal.PortalException) {
799 throw (com.liferay.portal.PortalException)e;
800 }
801
802 if (e instanceof com.liferay.portal.SystemException) {
803 throw (com.liferay.portal.SystemException)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 void unlockFileEntry(HttpPrincipal httpPrincipal,
819 long folderId, java.lang.String name)
820 throws com.liferay.portal.SystemException {
821 try {
822 Object paramObj0 = new LongWrapper(folderId);
823
824 Object paramObj1 = name;
825
826 if (name == null) {
827 paramObj1 = new NullWrapper("java.lang.String");
828 }
829
830 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
831 "unlockFileEntry", new Object[] { paramObj0, paramObj1 });
832
833 try {
834 TunnelUtil.invoke(httpPrincipal, methodWrapper);
835 }
836 catch (Exception e) {
837 if (e instanceof com.liferay.portal.SystemException) {
838 throw (com.liferay.portal.SystemException)e;
839 }
840
841 throw new com.liferay.portal.SystemException(e);
842 }
843 }
844 catch (com.liferay.portal.SystemException se) {
845 _log.error(se, se);
846
847 throw se;
848 }
849 }
850
851 public static void unlockFileEntry(HttpPrincipal httpPrincipal,
852 long folderId, java.lang.String name, java.lang.String lockUuid)
853 throws com.liferay.portal.PortalException,
854 com.liferay.portal.SystemException {
855 try {
856 Object paramObj0 = new LongWrapper(folderId);
857
858 Object paramObj1 = name;
859
860 if (name == null) {
861 paramObj1 = new NullWrapper("java.lang.String");
862 }
863
864 Object paramObj2 = lockUuid;
865
866 if (lockUuid == null) {
867 paramObj2 = new NullWrapper("java.lang.String");
868 }
869
870 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
871 "unlockFileEntry",
872 new Object[] { paramObj0, paramObj1, paramObj2 });
873
874 try {
875 TunnelUtil.invoke(httpPrincipal, methodWrapper);
876 }
877 catch (Exception e) {
878 if (e instanceof com.liferay.portal.PortalException) {
879 throw (com.liferay.portal.PortalException)e;
880 }
881
882 if (e instanceof com.liferay.portal.SystemException) {
883 throw (com.liferay.portal.SystemException)e;
884 }
885
886 throw new com.liferay.portal.SystemException(e);
887 }
888 }
889 catch (com.liferay.portal.SystemException se) {
890 _log.error(se, se);
891
892 throw se;
893 }
894 }
895
896 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
897 HttpPrincipal httpPrincipal, long folderId, long newFolderId,
898 java.lang.String name, java.lang.String sourceFileName,
899 java.lang.String title, java.lang.String description,
900 java.lang.String extraSettings, byte[] bytes,
901 com.liferay.portal.service.ServiceContext serviceContext)
902 throws com.liferay.portal.PortalException,
903 com.liferay.portal.SystemException {
904 try {
905 Object paramObj0 = new LongWrapper(folderId);
906
907 Object paramObj1 = new LongWrapper(newFolderId);
908
909 Object paramObj2 = name;
910
911 if (name == null) {
912 paramObj2 = new NullWrapper("java.lang.String");
913 }
914
915 Object paramObj3 = sourceFileName;
916
917 if (sourceFileName == null) {
918 paramObj3 = new NullWrapper("java.lang.String");
919 }
920
921 Object paramObj4 = title;
922
923 if (title == null) {
924 paramObj4 = new NullWrapper("java.lang.String");
925 }
926
927 Object paramObj5 = description;
928
929 if (description == null) {
930 paramObj5 = new NullWrapper("java.lang.String");
931 }
932
933 Object paramObj6 = extraSettings;
934
935 if (extraSettings == null) {
936 paramObj6 = new NullWrapper("java.lang.String");
937 }
938
939 Object paramObj7 = bytes;
940
941 if (bytes == null) {
942 paramObj7 = new NullWrapper("[B");
943 }
944
945 Object paramObj8 = serviceContext;
946
947 if (serviceContext == null) {
948 paramObj8 = new NullWrapper(
949 "com.liferay.portal.service.ServiceContext");
950 }
951
952 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
953 "updateFileEntry",
954 new Object[] {
955 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
956 paramObj5, paramObj6, paramObj7, paramObj8
957 });
958
959 Object returnObj = null;
960
961 try {
962 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
963 }
964 catch (Exception e) {
965 if (e instanceof com.liferay.portal.PortalException) {
966 throw (com.liferay.portal.PortalException)e;
967 }
968
969 if (e instanceof com.liferay.portal.SystemException) {
970 throw (com.liferay.portal.SystemException)e;
971 }
972
973 throw new com.liferay.portal.SystemException(e);
974 }
975
976 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
977 }
978 catch (com.liferay.portal.SystemException se) {
979 _log.error(se, se);
980
981 throw se;
982 }
983 }
984
985 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
986 HttpPrincipal httpPrincipal, long folderId, long newFolderId,
987 java.lang.String name, java.lang.String sourceFileName,
988 java.lang.String title, java.lang.String description,
989 java.lang.String extraSettings, java.io.File file,
990 com.liferay.portal.service.ServiceContext serviceContext)
991 throws com.liferay.portal.PortalException,
992 com.liferay.portal.SystemException {
993 try {
994 Object paramObj0 = new LongWrapper(folderId);
995
996 Object paramObj1 = new LongWrapper(newFolderId);
997
998 Object paramObj2 = name;
999
1000 if (name == null) {
1001 paramObj2 = new NullWrapper("java.lang.String");
1002 }
1003
1004 Object paramObj3 = sourceFileName;
1005
1006 if (sourceFileName == null) {
1007 paramObj3 = new NullWrapper("java.lang.String");
1008 }
1009
1010 Object paramObj4 = title;
1011
1012 if (title == null) {
1013 paramObj4 = new NullWrapper("java.lang.String");
1014 }
1015
1016 Object paramObj5 = description;
1017
1018 if (description == null) {
1019 paramObj5 = new NullWrapper("java.lang.String");
1020 }
1021
1022 Object paramObj6 = extraSettings;
1023
1024 if (extraSettings == null) {
1025 paramObj6 = new NullWrapper("java.lang.String");
1026 }
1027
1028 Object paramObj7 = file;
1029
1030 if (file == null) {
1031 paramObj7 = new NullWrapper("java.io.File");
1032 }
1033
1034 Object paramObj8 = serviceContext;
1035
1036 if (serviceContext == null) {
1037 paramObj8 = new NullWrapper(
1038 "com.liferay.portal.service.ServiceContext");
1039 }
1040
1041 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
1042 "updateFileEntry",
1043 new Object[] {
1044 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1045 paramObj5, paramObj6, paramObj7, paramObj8
1046 });
1047
1048 Object returnObj = null;
1049
1050 try {
1051 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1052 }
1053 catch (Exception e) {
1054 if (e instanceof com.liferay.portal.PortalException) {
1055 throw (com.liferay.portal.PortalException)e;
1056 }
1057
1058 if (e instanceof com.liferay.portal.SystemException) {
1059 throw (com.liferay.portal.SystemException)e;
1060 }
1061
1062 throw new com.liferay.portal.SystemException(e);
1063 }
1064
1065 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
1066 }
1067 catch (com.liferay.portal.SystemException se) {
1068 _log.error(se, se);
1069
1070 throw se;
1071 }
1072 }
1073
1074 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
1075 HttpPrincipal httpPrincipal, long folderId, long newFolderId,
1076 java.lang.String name, java.lang.String sourceFileName,
1077 java.lang.String title, java.lang.String description,
1078 java.lang.String versionDescription, java.lang.String extraSettings,
1079 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
1080 throws com.liferay.portal.PortalException,
1081 com.liferay.portal.SystemException {
1082 try {
1083 Object paramObj0 = new LongWrapper(folderId);
1084
1085 Object paramObj1 = new LongWrapper(newFolderId);
1086
1087 Object paramObj2 = name;
1088
1089 if (name == null) {
1090 paramObj2 = new NullWrapper("java.lang.String");
1091 }
1092
1093 Object paramObj3 = sourceFileName;
1094
1095 if (sourceFileName == null) {
1096 paramObj3 = new NullWrapper("java.lang.String");
1097 }
1098
1099 Object paramObj4 = title;
1100
1101 if (title == null) {
1102 paramObj4 = new NullWrapper("java.lang.String");
1103 }
1104
1105 Object paramObj5 = description;
1106
1107 if (description == null) {
1108 paramObj5 = new NullWrapper("java.lang.String");
1109 }
1110
1111 Object paramObj6 = versionDescription;
1112
1113 if (versionDescription == null) {
1114 paramObj6 = new NullWrapper("java.lang.String");
1115 }
1116
1117 Object paramObj7 = extraSettings;
1118
1119 if (extraSettings == null) {
1120 paramObj7 = new NullWrapper("java.lang.String");
1121 }
1122
1123 Object paramObj8 = bytes;
1124
1125 if (bytes == null) {
1126 paramObj8 = new NullWrapper("[B");
1127 }
1128
1129 Object paramObj9 = serviceContext;
1130
1131 if (serviceContext == null) {
1132 paramObj9 = new NullWrapper(
1133 "com.liferay.portal.service.ServiceContext");
1134 }
1135
1136 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
1137 "updateFileEntry",
1138 new Object[] {
1139 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1140 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
1141 });
1142
1143 Object returnObj = null;
1144
1145 try {
1146 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1147 }
1148 catch (Exception e) {
1149 if (e instanceof com.liferay.portal.PortalException) {
1150 throw (com.liferay.portal.PortalException)e;
1151 }
1152
1153 if (e instanceof com.liferay.portal.SystemException) {
1154 throw (com.liferay.portal.SystemException)e;
1155 }
1156
1157 throw new com.liferay.portal.SystemException(e);
1158 }
1159
1160 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
1161 }
1162 catch (com.liferay.portal.SystemException se) {
1163 _log.error(se, se);
1164
1165 throw se;
1166 }
1167 }
1168
1169 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
1170 HttpPrincipal httpPrincipal, long folderId, long newFolderId,
1171 java.lang.String name, java.lang.String sourceFileName,
1172 java.lang.String title, java.lang.String description,
1173 java.lang.String versionDescription, java.lang.String extraSettings,
1174 java.io.File file,
1175 com.liferay.portal.service.ServiceContext serviceContext)
1176 throws com.liferay.portal.PortalException,
1177 com.liferay.portal.SystemException {
1178 try {
1179 Object paramObj0 = new LongWrapper(folderId);
1180
1181 Object paramObj1 = new LongWrapper(newFolderId);
1182
1183 Object paramObj2 = name;
1184
1185 if (name == null) {
1186 paramObj2 = new NullWrapper("java.lang.String");
1187 }
1188
1189 Object paramObj3 = sourceFileName;
1190
1191 if (sourceFileName == null) {
1192 paramObj3 = new NullWrapper("java.lang.String");
1193 }
1194
1195 Object paramObj4 = title;
1196
1197 if (title == null) {
1198 paramObj4 = new NullWrapper("java.lang.String");
1199 }
1200
1201 Object paramObj5 = description;
1202
1203 if (description == null) {
1204 paramObj5 = new NullWrapper("java.lang.String");
1205 }
1206
1207 Object paramObj6 = versionDescription;
1208
1209 if (versionDescription == null) {
1210 paramObj6 = new NullWrapper("java.lang.String");
1211 }
1212
1213 Object paramObj7 = extraSettings;
1214
1215 if (extraSettings == null) {
1216 paramObj7 = new NullWrapper("java.lang.String");
1217 }
1218
1219 Object paramObj8 = file;
1220
1221 if (file == null) {
1222 paramObj8 = new NullWrapper("java.io.File");
1223 }
1224
1225 Object paramObj9 = serviceContext;
1226
1227 if (serviceContext == null) {
1228 paramObj9 = new NullWrapper(
1229 "com.liferay.portal.service.ServiceContext");
1230 }
1231
1232 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
1233 "updateFileEntry",
1234 new Object[] {
1235 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1236 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
1237 });
1238
1239 Object returnObj = null;
1240
1241 try {
1242 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1243 }
1244 catch (Exception e) {
1245 if (e instanceof com.liferay.portal.PortalException) {
1246 throw (com.liferay.portal.PortalException)e;
1247 }
1248
1249 if (e instanceof com.liferay.portal.SystemException) {
1250 throw (com.liferay.portal.SystemException)e;
1251 }
1252
1253 throw new com.liferay.portal.SystemException(e);
1254 }
1255
1256 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
1257 }
1258 catch (com.liferay.portal.SystemException se) {
1259 _log.error(se, se);
1260
1261 throw se;
1262 }
1263 }
1264
1265 public static boolean verifyFileEntryLock(HttpPrincipal httpPrincipal,
1266 long folderId, java.lang.String name, java.lang.String lockUuid)
1267 throws com.liferay.portal.PortalException,
1268 com.liferay.portal.SystemException {
1269 try {
1270 Object paramObj0 = new LongWrapper(folderId);
1271
1272 Object paramObj1 = name;
1273
1274 if (name == null) {
1275 paramObj1 = new NullWrapper("java.lang.String");
1276 }
1277
1278 Object paramObj2 = lockUuid;
1279
1280 if (lockUuid == null) {
1281 paramObj2 = new NullWrapper("java.lang.String");
1282 }
1283
1284 MethodWrapper methodWrapper = new MethodWrapper(DLFileEntryServiceUtil.class.getName(),
1285 "verifyFileEntryLock",
1286 new Object[] { paramObj0, paramObj1, paramObj2 });
1287
1288 Object returnObj = null;
1289
1290 try {
1291 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1292 }
1293 catch (Exception e) {
1294 if (e instanceof com.liferay.portal.PortalException) {
1295 throw (com.liferay.portal.PortalException)e;
1296 }
1297
1298 if (e instanceof com.liferay.portal.SystemException) {
1299 throw (com.liferay.portal.SystemException)e;
1300 }
1301
1302 throw new com.liferay.portal.SystemException(e);
1303 }
1304
1305 return ((Boolean)returnObj).booleanValue();
1306 }
1307 catch (com.liferay.portal.SystemException se) {
1308 _log.error(se, se);
1309
1310 throw se;
1311 }
1312 }
1313
1314 private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceHttp.class);
1315}