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