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