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