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