001
014
015 package com.liferay.portlet.documentlibrary.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.http.TunnelUtil;
023
024 import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil;
025
026
056 public class DLFileEntryServiceHttp {
057 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
058 HttpPrincipal httpPrincipal, long groupId, long repositoryId,
059 long folderId, java.lang.String sourceFileName,
060 java.lang.String mimeType, java.lang.String title,
061 java.lang.String description, java.lang.String changeLog,
062 long fileEntryTypeId,
063 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
064 java.io.File file, java.io.InputStream is, long size,
065 com.liferay.portal.service.ServiceContext serviceContext)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 try {
069 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
070 "addFileEntry", _addFileEntryParameterTypes0);
071
072 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
073 repositoryId, folderId, sourceFileName, mimeType, title,
074 description, changeLog, fileEntryTypeId, fieldsMap, file,
075 is, size, serviceContext);
076
077 Object returnObj = null;
078
079 try {
080 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
081 }
082 catch (Exception e) {
083 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
084 throw (com.liferay.portal.kernel.exception.PortalException)e;
085 }
086
087 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
088 throw (com.liferay.portal.kernel.exception.SystemException)e;
089 }
090
091 throw new com.liferay.portal.kernel.exception.SystemException(e);
092 }
093
094 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
095 }
096 catch (com.liferay.portal.kernel.exception.SystemException se) {
097 _log.error(se, se);
098
099 throw se;
100 }
101 }
102
103 public static void cancelCheckOut(HttpPrincipal httpPrincipal,
104 long fileEntryId)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException {
107 try {
108 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
109 "cancelCheckOut", _cancelCheckOutParameterTypes1);
110
111 MethodHandler methodHandler = new MethodHandler(methodKey,
112 fileEntryId);
113
114 try {
115 TunnelUtil.invoke(httpPrincipal, methodHandler);
116 }
117 catch (Exception e) {
118 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
119 throw (com.liferay.portal.kernel.exception.PortalException)e;
120 }
121
122 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
123 throw (com.liferay.portal.kernel.exception.SystemException)e;
124 }
125
126 throw new com.liferay.portal.kernel.exception.SystemException(e);
127 }
128 }
129 catch (com.liferay.portal.kernel.exception.SystemException se) {
130 _log.error(se, se);
131
132 throw se;
133 }
134 }
135
136 public static void checkInFileEntry(HttpPrincipal httpPrincipal,
137 long fileEntryId, boolean major, java.lang.String changeLog,
138 com.liferay.portal.service.ServiceContext serviceContext)
139 throws com.liferay.portal.kernel.exception.PortalException,
140 com.liferay.portal.kernel.exception.SystemException {
141 try {
142 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
143 "checkInFileEntry", _checkInFileEntryParameterTypes2);
144
145 MethodHandler methodHandler = new MethodHandler(methodKey,
146 fileEntryId, major, changeLog, serviceContext);
147
148 try {
149 TunnelUtil.invoke(httpPrincipal, methodHandler);
150 }
151 catch (Exception e) {
152 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
153 throw (com.liferay.portal.kernel.exception.PortalException)e;
154 }
155
156 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
157 throw (com.liferay.portal.kernel.exception.SystemException)e;
158 }
159
160 throw new com.liferay.portal.kernel.exception.SystemException(e);
161 }
162 }
163 catch (com.liferay.portal.kernel.exception.SystemException se) {
164 _log.error(se, se);
165
166 throw se;
167 }
168 }
169
170 public static void checkInFileEntry(HttpPrincipal httpPrincipal,
171 long fileEntryId, java.lang.String lockUuid)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException {
174 try {
175 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
176 "checkInFileEntry", _checkInFileEntryParameterTypes3);
177
178 MethodHandler methodHandler = new MethodHandler(methodKey,
179 fileEntryId, lockUuid);
180
181 try {
182 TunnelUtil.invoke(httpPrincipal, methodHandler);
183 }
184 catch (Exception e) {
185 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
186 throw (com.liferay.portal.kernel.exception.PortalException)e;
187 }
188
189 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
190 throw (com.liferay.portal.kernel.exception.SystemException)e;
191 }
192
193 throw new com.liferay.portal.kernel.exception.SystemException(e);
194 }
195 }
196 catch (com.liferay.portal.kernel.exception.SystemException se) {
197 _log.error(se, se);
198
199 throw se;
200 }
201 }
202
203 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
204 HttpPrincipal httpPrincipal, long fileEntryId)
205 throws com.liferay.portal.kernel.exception.PortalException,
206 com.liferay.portal.kernel.exception.SystemException {
207 try {
208 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
209 "checkOutFileEntry", _checkOutFileEntryParameterTypes4);
210
211 MethodHandler methodHandler = new MethodHandler(methodKey,
212 fileEntryId);
213
214 Object returnObj = null;
215
216 try {
217 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
218 }
219 catch (Exception e) {
220 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
221 throw (com.liferay.portal.kernel.exception.PortalException)e;
222 }
223
224 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
225 throw (com.liferay.portal.kernel.exception.SystemException)e;
226 }
227
228 throw new com.liferay.portal.kernel.exception.SystemException(e);
229 }
230
231 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
232 }
233 catch (com.liferay.portal.kernel.exception.SystemException se) {
234 _log.error(se, se);
235
236 throw se;
237 }
238 }
239
240 public static com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
241 HttpPrincipal httpPrincipal, long fileEntryId, java.lang.String owner,
242 long expirationTime)
243 throws com.liferay.portal.kernel.exception.PortalException,
244 com.liferay.portal.kernel.exception.SystemException {
245 try {
246 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
247 "checkOutFileEntry", _checkOutFileEntryParameterTypes5);
248
249 MethodHandler methodHandler = new MethodHandler(methodKey,
250 fileEntryId, owner, expirationTime);
251
252 Object returnObj = null;
253
254 try {
255 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
256 }
257 catch (Exception e) {
258 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
259 throw (com.liferay.portal.kernel.exception.PortalException)e;
260 }
261
262 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
263 throw (com.liferay.portal.kernel.exception.SystemException)e;
264 }
265
266 throw new com.liferay.portal.kernel.exception.SystemException(e);
267 }
268
269 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
270 }
271 catch (com.liferay.portal.kernel.exception.SystemException se) {
272 _log.error(se, se);
273
274 throw se;
275 }
276 }
277
278 public static com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
279 HttpPrincipal httpPrincipal, long groupId, long repositoryId,
280 long fileEntryId, long destFolderId,
281 com.liferay.portal.service.ServiceContext serviceContext)
282 throws com.liferay.portal.kernel.exception.PortalException,
283 com.liferay.portal.kernel.exception.SystemException {
284 try {
285 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
286 "copyFileEntry", _copyFileEntryParameterTypes6);
287
288 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
289 repositoryId, fileEntryId, destFolderId, serviceContext);
290
291 Object returnObj = null;
292
293 try {
294 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
295 }
296 catch (Exception e) {
297 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
298 throw (com.liferay.portal.kernel.exception.PortalException)e;
299 }
300
301 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
302 throw (com.liferay.portal.kernel.exception.SystemException)e;
303 }
304
305 throw new com.liferay.portal.kernel.exception.SystemException(e);
306 }
307
308 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
309 }
310 catch (com.liferay.portal.kernel.exception.SystemException se) {
311 _log.error(se, se);
312
313 throw se;
314 }
315 }
316
317 public static void deleteFileEntry(HttpPrincipal httpPrincipal,
318 long fileEntryId)
319 throws com.liferay.portal.kernel.exception.PortalException,
320 com.liferay.portal.kernel.exception.SystemException {
321 try {
322 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
323 "deleteFileEntry", _deleteFileEntryParameterTypes7);
324
325 MethodHandler methodHandler = new MethodHandler(methodKey,
326 fileEntryId);
327
328 try {
329 TunnelUtil.invoke(httpPrincipal, methodHandler);
330 }
331 catch (Exception e) {
332 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
333 throw (com.liferay.portal.kernel.exception.PortalException)e;
334 }
335
336 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
337 throw (com.liferay.portal.kernel.exception.SystemException)e;
338 }
339
340 throw new com.liferay.portal.kernel.exception.SystemException(e);
341 }
342 }
343 catch (com.liferay.portal.kernel.exception.SystemException se) {
344 _log.error(se, se);
345
346 throw se;
347 }
348 }
349
350 public static void deleteFileEntry(HttpPrincipal httpPrincipal,
351 long groupId, long folderId, java.lang.String title)
352 throws com.liferay.portal.kernel.exception.PortalException,
353 com.liferay.portal.kernel.exception.SystemException {
354 try {
355 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
356 "deleteFileEntry", _deleteFileEntryParameterTypes8);
357
358 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
359 folderId, title);
360
361 try {
362 TunnelUtil.invoke(httpPrincipal, methodHandler);
363 }
364 catch (Exception e) {
365 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
366 throw (com.liferay.portal.kernel.exception.PortalException)e;
367 }
368
369 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
370 throw (com.liferay.portal.kernel.exception.SystemException)e;
371 }
372
373 throw new com.liferay.portal.kernel.exception.SystemException(e);
374 }
375 }
376 catch (com.liferay.portal.kernel.exception.SystemException se) {
377 _log.error(se, se);
378
379 throw se;
380 }
381 }
382
383 public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
384 HttpPrincipal httpPrincipal, long imageId)
385 throws com.liferay.portal.kernel.exception.PortalException,
386 com.liferay.portal.kernel.exception.SystemException {
387 try {
388 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
389 "fetchFileEntryByImageId",
390 _fetchFileEntryByImageIdParameterTypes9);
391
392 MethodHandler methodHandler = new MethodHandler(methodKey, imageId);
393
394 Object returnObj = null;
395
396 try {
397 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
398 }
399 catch (Exception e) {
400 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
401 throw (com.liferay.portal.kernel.exception.PortalException)e;
402 }
403
404 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
405 throw (com.liferay.portal.kernel.exception.SystemException)e;
406 }
407
408 throw new com.liferay.portal.kernel.exception.SystemException(e);
409 }
410
411 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
412 }
413 catch (com.liferay.portal.kernel.exception.SystemException se) {
414 _log.error(se, se);
415
416 throw se;
417 }
418 }
419
420 public static java.io.InputStream getFileAsStream(
421 HttpPrincipal httpPrincipal, long fileEntryId, java.lang.String version)
422 throws com.liferay.portal.kernel.exception.PortalException,
423 com.liferay.portal.kernel.exception.SystemException {
424 try {
425 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
426 "getFileAsStream", _getFileAsStreamParameterTypes10);
427
428 MethodHandler methodHandler = new MethodHandler(methodKey,
429 fileEntryId, version);
430
431 Object returnObj = null;
432
433 try {
434 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
435 }
436 catch (Exception e) {
437 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
438 throw (com.liferay.portal.kernel.exception.PortalException)e;
439 }
440
441 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
442 throw (com.liferay.portal.kernel.exception.SystemException)e;
443 }
444
445 throw new com.liferay.portal.kernel.exception.SystemException(e);
446 }
447
448 return (java.io.InputStream)returnObj;
449 }
450 catch (com.liferay.portal.kernel.exception.SystemException se) {
451 _log.error(se, se);
452
453 throw se;
454 }
455 }
456
457 public static java.io.InputStream getFileAsStream(
458 HttpPrincipal httpPrincipal, long fileEntryId,
459 java.lang.String version, boolean incrementCounter)
460 throws com.liferay.portal.kernel.exception.PortalException,
461 com.liferay.portal.kernel.exception.SystemException {
462 try {
463 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
464 "getFileAsStream", _getFileAsStreamParameterTypes11);
465
466 MethodHandler methodHandler = new MethodHandler(methodKey,
467 fileEntryId, version, incrementCounter);
468
469 Object returnObj = null;
470
471 try {
472 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
473 }
474 catch (Exception e) {
475 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
476 throw (com.liferay.portal.kernel.exception.PortalException)e;
477 }
478
479 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
480 throw (com.liferay.portal.kernel.exception.SystemException)e;
481 }
482
483 throw new com.liferay.portal.kernel.exception.SystemException(e);
484 }
485
486 return (java.io.InputStream)returnObj;
487 }
488 catch (com.liferay.portal.kernel.exception.SystemException se) {
489 _log.error(se, se);
490
491 throw se;
492 }
493 }
494
495 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
496 HttpPrincipal httpPrincipal, long groupId, long folderId, int start,
497 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
498 throws com.liferay.portal.kernel.exception.SystemException {
499 try {
500 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
501 "getFileEntries", _getFileEntriesParameterTypes12);
502
503 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
504 folderId, start, end, obc);
505
506 Object returnObj = null;
507
508 try {
509 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
510 }
511 catch (Exception e) {
512 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
513 throw (com.liferay.portal.kernel.exception.SystemException)e;
514 }
515
516 throw new com.liferay.portal.kernel.exception.SystemException(e);
517 }
518
519 return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
520 }
521 catch (com.liferay.portal.kernel.exception.SystemException se) {
522 _log.error(se, se);
523
524 throw se;
525 }
526 }
527
528 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
529 HttpPrincipal httpPrincipal, long groupId, long folderId,
530 long fileEntryTypeId, int start, int end,
531 com.liferay.portal.kernel.util.OrderByComparator obc)
532 throws com.liferay.portal.kernel.exception.SystemException {
533 try {
534 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
535 "getFileEntries", _getFileEntriesParameterTypes13);
536
537 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
538 folderId, fileEntryTypeId, start, end, obc);
539
540 Object returnObj = null;
541
542 try {
543 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
544 }
545 catch (Exception e) {
546 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
547 throw (com.liferay.portal.kernel.exception.SystemException)e;
548 }
549
550 throw new com.liferay.portal.kernel.exception.SystemException(e);
551 }
552
553 return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
554 }
555 catch (com.liferay.portal.kernel.exception.SystemException se) {
556 _log.error(se, se);
557
558 throw se;
559 }
560 }
561
562 public static int getFileEntriesCount(HttpPrincipal httpPrincipal,
563 long groupId, long folderId)
564 throws com.liferay.portal.kernel.exception.SystemException {
565 try {
566 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
567 "getFileEntriesCount", _getFileEntriesCountParameterTypes14);
568
569 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
570 folderId);
571
572 Object returnObj = null;
573
574 try {
575 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
576 }
577 catch (Exception e) {
578 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
579 throw (com.liferay.portal.kernel.exception.SystemException)e;
580 }
581
582 throw new com.liferay.portal.kernel.exception.SystemException(e);
583 }
584
585 return ((Integer)returnObj).intValue();
586 }
587 catch (com.liferay.portal.kernel.exception.SystemException se) {
588 _log.error(se, se);
589
590 throw se;
591 }
592 }
593
594 public static int getFileEntriesCount(HttpPrincipal httpPrincipal,
595 long groupId, long folderId, long fileEntryTypeId)
596 throws com.liferay.portal.kernel.exception.SystemException {
597 try {
598 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
599 "getFileEntriesCount", _getFileEntriesCountParameterTypes15);
600
601 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
602 folderId, fileEntryTypeId);
603
604 Object returnObj = null;
605
606 try {
607 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
608 }
609 catch (Exception e) {
610 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
611 throw (com.liferay.portal.kernel.exception.SystemException)e;
612 }
613
614 throw new com.liferay.portal.kernel.exception.SystemException(e);
615 }
616
617 return ((Integer)returnObj).intValue();
618 }
619 catch (com.liferay.portal.kernel.exception.SystemException se) {
620 _log.error(se, se);
621
622 throw se;
623 }
624 }
625
626 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
627 HttpPrincipal httpPrincipal, long fileEntryId)
628 throws com.liferay.portal.kernel.exception.PortalException,
629 com.liferay.portal.kernel.exception.SystemException {
630 try {
631 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
632 "getFileEntry", _getFileEntryParameterTypes16);
633
634 MethodHandler methodHandler = new MethodHandler(methodKey,
635 fileEntryId);
636
637 Object returnObj = null;
638
639 try {
640 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
641 }
642 catch (Exception e) {
643 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
644 throw (com.liferay.portal.kernel.exception.PortalException)e;
645 }
646
647 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
648 throw (com.liferay.portal.kernel.exception.SystemException)e;
649 }
650
651 throw new com.liferay.portal.kernel.exception.SystemException(e);
652 }
653
654 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
655 }
656 catch (com.liferay.portal.kernel.exception.SystemException se) {
657 _log.error(se, se);
658
659 throw se;
660 }
661 }
662
663 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
664 HttpPrincipal httpPrincipal, long groupId, long folderId,
665 java.lang.String title)
666 throws com.liferay.portal.kernel.exception.PortalException,
667 com.liferay.portal.kernel.exception.SystemException {
668 try {
669 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
670 "getFileEntry", _getFileEntryParameterTypes17);
671
672 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
673 folderId, title);
674
675 Object returnObj = null;
676
677 try {
678 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
679 }
680 catch (Exception e) {
681 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
682 throw (com.liferay.portal.kernel.exception.PortalException)e;
683 }
684
685 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
686 throw (com.liferay.portal.kernel.exception.SystemException)e;
687 }
688
689 throw new com.liferay.portal.kernel.exception.SystemException(e);
690 }
691
692 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
693 }
694 catch (com.liferay.portal.kernel.exception.SystemException se) {
695 _log.error(se, se);
696
697 throw se;
698 }
699 }
700
701 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
702 HttpPrincipal httpPrincipal, java.lang.String uuid, long groupId)
703 throws com.liferay.portal.kernel.exception.PortalException,
704 com.liferay.portal.kernel.exception.SystemException {
705 try {
706 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
707 "getFileEntryByUuidAndGroupId",
708 _getFileEntryByUuidAndGroupIdParameterTypes18);
709
710 MethodHandler methodHandler = new MethodHandler(methodKey, uuid,
711 groupId);
712
713 Object returnObj = null;
714
715 try {
716 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
717 }
718 catch (Exception e) {
719 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
720 throw (com.liferay.portal.kernel.exception.PortalException)e;
721 }
722
723 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
724 throw (com.liferay.portal.kernel.exception.SystemException)e;
725 }
726
727 throw new com.liferay.portal.kernel.exception.SystemException(e);
728 }
729
730 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
731 }
732 catch (com.liferay.portal.kernel.exception.SystemException se) {
733 _log.error(se, se);
734
735 throw se;
736 }
737 }
738
739 public static com.liferay.portal.model.Lock getFileEntryLock(
740 HttpPrincipal httpPrincipal, long fileEntryId)
741 throws com.liferay.portal.kernel.exception.SystemException {
742 try {
743 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
744 "getFileEntryLock", _getFileEntryLockParameterTypes19);
745
746 MethodHandler methodHandler = new MethodHandler(methodKey,
747 fileEntryId);
748
749 Object returnObj = null;
750
751 try {
752 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
753 }
754 catch (Exception e) {
755 throw new com.liferay.portal.kernel.exception.SystemException(e);
756 }
757
758 return (com.liferay.portal.model.Lock)returnObj;
759 }
760 catch (com.liferay.portal.kernel.exception.SystemException se) {
761 _log.error(se, se);
762
763 throw se;
764 }
765 }
766
767 public static int getFoldersFileEntriesCount(HttpPrincipal httpPrincipal,
768 long groupId, java.util.List<java.lang.Long> folderIds, int status)
769 throws com.liferay.portal.kernel.exception.SystemException {
770 try {
771 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
772 "getFoldersFileEntriesCount",
773 _getFoldersFileEntriesCountParameterTypes20);
774
775 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
776 folderIds, status);
777
778 Object returnObj = null;
779
780 try {
781 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
782 }
783 catch (Exception e) {
784 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
785 throw (com.liferay.portal.kernel.exception.SystemException)e;
786 }
787
788 throw new com.liferay.portal.kernel.exception.SystemException(e);
789 }
790
791 return ((Integer)returnObj).intValue();
792 }
793 catch (com.liferay.portal.kernel.exception.SystemException se) {
794 _log.error(se, se);
795
796 throw se;
797 }
798 }
799
800 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
801 HttpPrincipal httpPrincipal, long groupId, long userId,
802 long rootFolderId, int start, int end,
803 com.liferay.portal.kernel.util.OrderByComparator obc)
804 throws com.liferay.portal.kernel.exception.SystemException {
805 try {
806 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
807 "getGroupFileEntries", _getGroupFileEntriesParameterTypes21);
808
809 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
810 userId, rootFolderId, start, end, obc);
811
812 Object returnObj = null;
813
814 try {
815 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
816 }
817 catch (Exception e) {
818 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
819 throw (com.liferay.portal.kernel.exception.SystemException)e;
820 }
821
822 throw new com.liferay.portal.kernel.exception.SystemException(e);
823 }
824
825 return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
826 }
827 catch (com.liferay.portal.kernel.exception.SystemException se) {
828 _log.error(se, se);
829
830 throw se;
831 }
832 }
833
834 public static int getGroupFileEntriesCount(HttpPrincipal httpPrincipal,
835 long groupId, long userId, long rootFolderId)
836 throws com.liferay.portal.kernel.exception.SystemException {
837 try {
838 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
839 "getGroupFileEntriesCount",
840 _getGroupFileEntriesCountParameterTypes22);
841
842 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
843 userId, rootFolderId);
844
845 Object returnObj = null;
846
847 try {
848 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
849 }
850 catch (Exception e) {
851 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
852 throw (com.liferay.portal.kernel.exception.SystemException)e;
853 }
854
855 throw new com.liferay.portal.kernel.exception.SystemException(e);
856 }
857
858 return ((Integer)returnObj).intValue();
859 }
860 catch (com.liferay.portal.kernel.exception.SystemException se) {
861 _log.error(se, se);
862
863 throw se;
864 }
865 }
866
867 public static boolean hasFileEntryLock(HttpPrincipal httpPrincipal,
868 long fileEntryId)
869 throws com.liferay.portal.kernel.exception.PortalException,
870 com.liferay.portal.kernel.exception.SystemException {
871 try {
872 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
873 "hasFileEntryLock", _hasFileEntryLockParameterTypes23);
874
875 MethodHandler methodHandler = new MethodHandler(methodKey,
876 fileEntryId);
877
878 Object returnObj = null;
879
880 try {
881 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
882 }
883 catch (Exception e) {
884 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
885 throw (com.liferay.portal.kernel.exception.PortalException)e;
886 }
887
888 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
889 throw (com.liferay.portal.kernel.exception.SystemException)e;
890 }
891
892 throw new com.liferay.portal.kernel.exception.SystemException(e);
893 }
894
895 return ((Boolean)returnObj).booleanValue();
896 }
897 catch (com.liferay.portal.kernel.exception.SystemException se) {
898 _log.error(se, se);
899
900 throw se;
901 }
902 }
903
904 public static boolean isFileEntryCheckedOut(HttpPrincipal httpPrincipal,
905 long fileEntryId)
906 throws com.liferay.portal.kernel.exception.PortalException,
907 com.liferay.portal.kernel.exception.SystemException {
908 try {
909 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
910 "isFileEntryCheckedOut",
911 _isFileEntryCheckedOutParameterTypes24);
912
913 MethodHandler methodHandler = new MethodHandler(methodKey,
914 fileEntryId);
915
916 Object returnObj = null;
917
918 try {
919 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
920 }
921 catch (Exception e) {
922 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
923 throw (com.liferay.portal.kernel.exception.PortalException)e;
924 }
925
926 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
927 throw (com.liferay.portal.kernel.exception.SystemException)e;
928 }
929
930 throw new com.liferay.portal.kernel.exception.SystemException(e);
931 }
932
933 return ((Boolean)returnObj).booleanValue();
934 }
935 catch (com.liferay.portal.kernel.exception.SystemException se) {
936 _log.error(se, se);
937
938 throw se;
939 }
940 }
941
942 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
943 HttpPrincipal httpPrincipal, long fileEntryId, long newFolderId,
944 com.liferay.portal.service.ServiceContext serviceContext)
945 throws com.liferay.portal.kernel.exception.PortalException,
946 com.liferay.portal.kernel.exception.SystemException {
947 try {
948 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
949 "moveFileEntry", _moveFileEntryParameterTypes25);
950
951 MethodHandler methodHandler = new MethodHandler(methodKey,
952 fileEntryId, newFolderId, serviceContext);
953
954 Object returnObj = null;
955
956 try {
957 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
958 }
959 catch (Exception e) {
960 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
961 throw (com.liferay.portal.kernel.exception.PortalException)e;
962 }
963
964 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
965 throw (com.liferay.portal.kernel.exception.SystemException)e;
966 }
967
968 throw new com.liferay.portal.kernel.exception.SystemException(e);
969 }
970
971 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
972 }
973 catch (com.liferay.portal.kernel.exception.SystemException se) {
974 _log.error(se, se);
975
976 throw se;
977 }
978 }
979
980 public static com.liferay.portal.model.Lock refreshFileEntryLock(
981 HttpPrincipal httpPrincipal, java.lang.String lockUuid,
982 long expirationTime)
983 throws com.liferay.portal.kernel.exception.PortalException,
984 com.liferay.portal.kernel.exception.SystemException {
985 try {
986 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
987 "refreshFileEntryLock",
988 _refreshFileEntryLockParameterTypes26);
989
990 MethodHandler methodHandler = new MethodHandler(methodKey,
991 lockUuid, expirationTime);
992
993 Object returnObj = null;
994
995 try {
996 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
997 }
998 catch (Exception e) {
999 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1000 throw (com.liferay.portal.kernel.exception.PortalException)e;
1001 }
1002
1003 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1004 throw (com.liferay.portal.kernel.exception.SystemException)e;
1005 }
1006
1007 throw new com.liferay.portal.kernel.exception.SystemException(e);
1008 }
1009
1010 return (com.liferay.portal.model.Lock)returnObj;
1011 }
1012 catch (com.liferay.portal.kernel.exception.SystemException se) {
1013 _log.error(se, se);
1014
1015 throw se;
1016 }
1017 }
1018
1019 public static void revertFileEntry(HttpPrincipal httpPrincipal,
1020 long fileEntryId, java.lang.String version,
1021 com.liferay.portal.service.ServiceContext serviceContext)
1022 throws com.liferay.portal.kernel.exception.PortalException,
1023 com.liferay.portal.kernel.exception.SystemException {
1024 try {
1025 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
1026 "revertFileEntry", _revertFileEntryParameterTypes27);
1027
1028 MethodHandler methodHandler = new MethodHandler(methodKey,
1029 fileEntryId, version, serviceContext);
1030
1031 try {
1032 TunnelUtil.invoke(httpPrincipal, methodHandler);
1033 }
1034 catch (Exception e) {
1035 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1036 throw (com.liferay.portal.kernel.exception.PortalException)e;
1037 }
1038
1039 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1040 throw (com.liferay.portal.kernel.exception.SystemException)e;
1041 }
1042
1043 throw new com.liferay.portal.kernel.exception.SystemException(e);
1044 }
1045 }
1046 catch (com.liferay.portal.kernel.exception.SystemException se) {
1047 _log.error(se, se);
1048
1049 throw se;
1050 }
1051 }
1052
1053 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
1054 HttpPrincipal httpPrincipal, long fileEntryId,
1055 java.lang.String sourceFileName, java.lang.String mimeType,
1056 java.lang.String title, java.lang.String description,
1057 java.lang.String changeLog, boolean majorVersion, long fileEntryTypeId,
1058 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
1059 java.io.File file, java.io.InputStream is, long size,
1060 com.liferay.portal.service.ServiceContext serviceContext)
1061 throws com.liferay.portal.kernel.exception.PortalException,
1062 com.liferay.portal.kernel.exception.SystemException {
1063 try {
1064 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
1065 "updateFileEntry", _updateFileEntryParameterTypes28);
1066
1067 MethodHandler methodHandler = new MethodHandler(methodKey,
1068 fileEntryId, sourceFileName, mimeType, title, description,
1069 changeLog, majorVersion, fileEntryTypeId, fieldsMap, file,
1070 is, size, serviceContext);
1071
1072 Object returnObj = null;
1073
1074 try {
1075 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1076 }
1077 catch (Exception e) {
1078 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1079 throw (com.liferay.portal.kernel.exception.PortalException)e;
1080 }
1081
1082 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1083 throw (com.liferay.portal.kernel.exception.SystemException)e;
1084 }
1085
1086 throw new com.liferay.portal.kernel.exception.SystemException(e);
1087 }
1088
1089 return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
1090 }
1091 catch (com.liferay.portal.kernel.exception.SystemException se) {
1092 _log.error(se, se);
1093
1094 throw se;
1095 }
1096 }
1097
1098 public static boolean verifyFileEntryCheckOut(HttpPrincipal httpPrincipal,
1099 long fileEntryId, java.lang.String lockUuid)
1100 throws com.liferay.portal.kernel.exception.PortalException,
1101 com.liferay.portal.kernel.exception.SystemException {
1102 try {
1103 MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
1104 "verifyFileEntryCheckOut",
1105 _verifyFileEntryCheckOutParameterTypes29);
1106
1107 MethodHandler methodHandler = new MethodHandler(methodKey,
1108 fileEntryId, lockUuid);
1109
1110 Object returnObj = null;
1111
1112 try {
1113 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1114 }
1115 catch (Exception e) {
1116 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1117 throw (com.liferay.portal.kernel.exception.PortalException)e;
1118 }
1119
1120 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1121 throw (com.liferay.portal.kernel.exception.SystemException)e;
1122 }
1123
1124 throw new com.liferay.portal.kernel.exception.SystemException(e);
1125 }
1126
1127 return ((Boolean)returnObj).booleanValue();
1128 }
1129 catch (com.liferay.portal.kernel.exception.SystemException se) {
1130 _log.error(se, se);
1131
1132 throw se;
1133 }
1134 }
1135
1136 private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceHttp.class);
1137 private static final Class<?>[] _addFileEntryParameterTypes0 = new Class[] {
1138 long.class, long.class, long.class, java.lang.String.class,
1139 java.lang.String.class, java.lang.String.class,
1140 java.lang.String.class, java.lang.String.class, long.class,
1141 java.util.Map.class, java.io.File.class, java.io.InputStream.class,
1142 long.class, com.liferay.portal.service.ServiceContext.class
1143 };
1144 private static final Class<?>[] _cancelCheckOutParameterTypes1 = new Class[] {
1145 long.class
1146 };
1147 private static final Class<?>[] _checkInFileEntryParameterTypes2 = new Class[] {
1148 long.class, boolean.class, java.lang.String.class,
1149 com.liferay.portal.service.ServiceContext.class
1150 };
1151 private static final Class<?>[] _checkInFileEntryParameterTypes3 = new Class[] {
1152 long.class, java.lang.String.class
1153 };
1154 private static final Class<?>[] _checkOutFileEntryParameterTypes4 = new Class[] {
1155 long.class
1156 };
1157 private static final Class<?>[] _checkOutFileEntryParameterTypes5 = new Class[] {
1158 long.class, java.lang.String.class, long.class
1159 };
1160 private static final Class<?>[] _copyFileEntryParameterTypes6 = new Class[] {
1161 long.class, long.class, long.class, long.class,
1162 com.liferay.portal.service.ServiceContext.class
1163 };
1164 private static final Class<?>[] _deleteFileEntryParameterTypes7 = new Class[] {
1165 long.class
1166 };
1167 private static final Class<?>[] _deleteFileEntryParameterTypes8 = new Class[] {
1168 long.class, long.class, java.lang.String.class
1169 };
1170 private static final Class<?>[] _fetchFileEntryByImageIdParameterTypes9 = new Class[] {
1171 long.class
1172 };
1173 private static final Class<?>[] _getFileAsStreamParameterTypes10 = new Class[] {
1174 long.class, java.lang.String.class
1175 };
1176 private static final Class<?>[] _getFileAsStreamParameterTypes11 = new Class[] {
1177 long.class, java.lang.String.class, boolean.class
1178 };
1179 private static final Class<?>[] _getFileEntriesParameterTypes12 = new Class[] {
1180 long.class, long.class, int.class, int.class,
1181 com.liferay.portal.kernel.util.OrderByComparator.class
1182 };
1183 private static final Class<?>[] _getFileEntriesParameterTypes13 = new Class[] {
1184 long.class, long.class, long.class, int.class, int.class,
1185 com.liferay.portal.kernel.util.OrderByComparator.class
1186 };
1187 private static final Class<?>[] _getFileEntriesCountParameterTypes14 = new Class[] {
1188 long.class, long.class
1189 };
1190 private static final Class<?>[] _getFileEntriesCountParameterTypes15 = new Class[] {
1191 long.class, long.class, long.class
1192 };
1193 private static final Class<?>[] _getFileEntryParameterTypes16 = new Class[] {
1194 long.class
1195 };
1196 private static final Class<?>[] _getFileEntryParameterTypes17 = new Class[] {
1197 long.class, long.class, java.lang.String.class
1198 };
1199 private static final Class<?>[] _getFileEntryByUuidAndGroupIdParameterTypes18 =
1200 new Class[] { java.lang.String.class, long.class };
1201 private static final Class<?>[] _getFileEntryLockParameterTypes19 = new Class[] {
1202 long.class
1203 };
1204 private static final Class<?>[] _getFoldersFileEntriesCountParameterTypes20 = new Class[] {
1205 long.class, java.util.List.class, int.class
1206 };
1207 private static final Class<?>[] _getGroupFileEntriesParameterTypes21 = new Class[] {
1208 long.class, long.class, long.class, int.class, int.class,
1209 com.liferay.portal.kernel.util.OrderByComparator.class
1210 };
1211 private static final Class<?>[] _getGroupFileEntriesCountParameterTypes22 = new Class[] {
1212 long.class, long.class, long.class
1213 };
1214 private static final Class<?>[] _hasFileEntryLockParameterTypes23 = new Class[] {
1215 long.class
1216 };
1217 private static final Class<?>[] _isFileEntryCheckedOutParameterTypes24 = new Class[] {
1218 long.class
1219 };
1220 private static final Class<?>[] _moveFileEntryParameterTypes25 = new Class[] {
1221 long.class, long.class,
1222 com.liferay.portal.service.ServiceContext.class
1223 };
1224 private static final Class<?>[] _refreshFileEntryLockParameterTypes26 = new Class[] {
1225 java.lang.String.class, long.class
1226 };
1227 private static final Class<?>[] _revertFileEntryParameterTypes27 = new Class[] {
1228 long.class, java.lang.String.class,
1229 com.liferay.portal.service.ServiceContext.class
1230 };
1231 private static final Class<?>[] _updateFileEntryParameterTypes28 = new Class[] {
1232 long.class, java.lang.String.class, java.lang.String.class,
1233 java.lang.String.class, java.lang.String.class,
1234 java.lang.String.class, boolean.class, long.class,
1235 java.util.Map.class, java.io.File.class, java.io.InputStream.class,
1236 long.class, com.liferay.portal.service.ServiceContext.class
1237 };
1238 private static final Class<?>[] _verifyFileEntryCheckOutParameterTypes29 = new Class[] {
1239 long.class, java.lang.String.class
1240 };
1241 }