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.PortalException,
468 com.liferay.portal.kernel.exception.SystemException {
469 try {
470 Object paramObj0 = userGroups;
471
472 if (userGroups == null) {
473 paramObj0 = new NullWrapper("java.util.List");
474 }
475
476 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
477 "getUserGroupsGroups", new Object[] { paramObj0 });
478
479 Object returnObj = null;
480
481 try {
482 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
483 }
484 catch (Exception e) {
485 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
486 throw (com.liferay.portal.kernel.exception.PortalException)e;
487 }
488
489 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
490 throw (com.liferay.portal.kernel.exception.SystemException)e;
491 }
492
493 throw new com.liferay.portal.kernel.exception.SystemException(e);
494 }
495
496 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
497 }
498 catch (com.liferay.portal.kernel.exception.SystemException se) {
499 _log.error(se, se);
500
501 throw se;
502 }
503 }
504
505 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
506 HttpPrincipal httpPrincipal, long userId, int start, int end)
507 throws com.liferay.portal.kernel.exception.PortalException,
508 com.liferay.portal.kernel.exception.SystemException {
509 try {
510 Object paramObj0 = new LongWrapper(userId);
511
512 Object paramObj1 = new IntegerWrapper(start);
513
514 Object paramObj2 = new IntegerWrapper(end);
515
516 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
517 "getUserOrganizationsGroups",
518 new Object[] { paramObj0, paramObj1, paramObj2 });
519
520 Object returnObj = null;
521
522 try {
523 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
524 }
525 catch (Exception e) {
526 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
527 throw (com.liferay.portal.kernel.exception.PortalException)e;
528 }
529
530 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
531 throw (com.liferay.portal.kernel.exception.SystemException)e;
532 }
533
534 throw new com.liferay.portal.kernel.exception.SystemException(e);
535 }
536
537 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
538 }
539 catch (com.liferay.portal.kernel.exception.SystemException se) {
540 _log.error(se, se);
541
542 throw se;
543 }
544 }
545
546 public static boolean hasUserGroup(HttpPrincipal httpPrincipal,
547 long userId, long groupId)
548 throws com.liferay.portal.kernel.exception.SystemException {
549 try {
550 Object paramObj0 = new LongWrapper(userId);
551
552 Object paramObj1 = new LongWrapper(groupId);
553
554 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
555 "hasUserGroup", new Object[] { paramObj0, paramObj1 });
556
557 Object returnObj = null;
558
559 try {
560 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
561 }
562 catch (Exception e) {
563 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
564 throw (com.liferay.portal.kernel.exception.SystemException)e;
565 }
566
567 throw new com.liferay.portal.kernel.exception.SystemException(e);
568 }
569
570 return ((Boolean)returnObj).booleanValue();
571 }
572 catch (com.liferay.portal.kernel.exception.SystemException se) {
573 _log.error(se, se);
574
575 throw se;
576 }
577 }
578
579 public static java.util.List<com.liferay.portal.model.Group> search(
580 HttpPrincipal httpPrincipal, long companyId, java.lang.String name,
581 java.lang.String description, java.lang.String[] params, int start,
582 int end) throws com.liferay.portal.kernel.exception.SystemException {
583 try {
584 Object paramObj0 = new LongWrapper(companyId);
585
586 Object paramObj1 = name;
587
588 if (name == null) {
589 paramObj1 = new NullWrapper("java.lang.String");
590 }
591
592 Object paramObj2 = description;
593
594 if (description == null) {
595 paramObj2 = new NullWrapper("java.lang.String");
596 }
597
598 Object paramObj3 = params;
599
600 if (params == null) {
601 paramObj3 = new NullWrapper("[Ljava.lang.String;");
602 }
603
604 Object paramObj4 = new IntegerWrapper(start);
605
606 Object paramObj5 = new IntegerWrapper(end);
607
608 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
609 "search",
610 new Object[] {
611 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
612 paramObj5
613 });
614
615 Object returnObj = null;
616
617 try {
618 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
619 }
620 catch (Exception e) {
621 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
622 throw (com.liferay.portal.kernel.exception.SystemException)e;
623 }
624
625 throw new com.liferay.portal.kernel.exception.SystemException(e);
626 }
627
628 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
629 }
630 catch (com.liferay.portal.kernel.exception.SystemException se) {
631 _log.error(se, se);
632
633 throw se;
634 }
635 }
636
637 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
638 java.lang.String name, java.lang.String description,
639 java.lang.String[] params)
640 throws com.liferay.portal.kernel.exception.SystemException {
641 try {
642 Object paramObj0 = new LongWrapper(companyId);
643
644 Object paramObj1 = name;
645
646 if (name == null) {
647 paramObj1 = new NullWrapper("java.lang.String");
648 }
649
650 Object paramObj2 = description;
651
652 if (description == null) {
653 paramObj2 = new NullWrapper("java.lang.String");
654 }
655
656 Object paramObj3 = params;
657
658 if (params == null) {
659 paramObj3 = new NullWrapper("[Ljava.lang.String;");
660 }
661
662 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
663 "searchCount",
664 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
665
666 Object returnObj = null;
667
668 try {
669 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
670 }
671 catch (Exception e) {
672 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
673 throw (com.liferay.portal.kernel.exception.SystemException)e;
674 }
675
676 throw new com.liferay.portal.kernel.exception.SystemException(e);
677 }
678
679 return ((Integer)returnObj).intValue();
680 }
681 catch (com.liferay.portal.kernel.exception.SystemException se) {
682 _log.error(se, se);
683
684 throw se;
685 }
686 }
687
688 public static void setRoleGroups(HttpPrincipal httpPrincipal, long roleId,
689 long[] groupIds)
690 throws com.liferay.portal.kernel.exception.PortalException,
691 com.liferay.portal.kernel.exception.SystemException {
692 try {
693 Object paramObj0 = new LongWrapper(roleId);
694
695 Object paramObj1 = groupIds;
696
697 if (groupIds == null) {
698 paramObj1 = new NullWrapper("[J");
699 }
700
701 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
702 "setRoleGroups", new Object[] { paramObj0, paramObj1 });
703
704 try {
705 TunnelUtil.invoke(httpPrincipal, methodWrapper);
706 }
707 catch (Exception e) {
708 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
709 throw (com.liferay.portal.kernel.exception.PortalException)e;
710 }
711
712 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
713 throw (com.liferay.portal.kernel.exception.SystemException)e;
714 }
715
716 throw new com.liferay.portal.kernel.exception.SystemException(e);
717 }
718 }
719 catch (com.liferay.portal.kernel.exception.SystemException se) {
720 _log.error(se, se);
721
722 throw se;
723 }
724 }
725
726 public static void unsetRoleGroups(HttpPrincipal httpPrincipal,
727 long roleId, long[] groupIds)
728 throws com.liferay.portal.kernel.exception.PortalException,
729 com.liferay.portal.kernel.exception.SystemException {
730 try {
731 Object paramObj0 = new LongWrapper(roleId);
732
733 Object paramObj1 = groupIds;
734
735 if (groupIds == null) {
736 paramObj1 = new NullWrapper("[J");
737 }
738
739 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
740 "unsetRoleGroups", new Object[] { paramObj0, paramObj1 });
741
742 try {
743 TunnelUtil.invoke(httpPrincipal, methodWrapper);
744 }
745 catch (Exception e) {
746 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
747 throw (com.liferay.portal.kernel.exception.PortalException)e;
748 }
749
750 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
751 throw (com.liferay.portal.kernel.exception.SystemException)e;
752 }
753
754 throw new com.liferay.portal.kernel.exception.SystemException(e);
755 }
756 }
757 catch (com.liferay.portal.kernel.exception.SystemException se) {
758 _log.error(se, se);
759
760 throw se;
761 }
762 }
763
764 public static com.liferay.portal.model.Group updateFriendlyURL(
765 HttpPrincipal httpPrincipal, long groupId, java.lang.String friendlyURL)
766 throws com.liferay.portal.kernel.exception.PortalException,
767 com.liferay.portal.kernel.exception.SystemException {
768 try {
769 Object paramObj0 = new LongWrapper(groupId);
770
771 Object paramObj1 = friendlyURL;
772
773 if (friendlyURL == null) {
774 paramObj1 = new NullWrapper("java.lang.String");
775 }
776
777 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
778 "updateFriendlyURL", new Object[] { paramObj0, paramObj1 });
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.PortalException) {
787 throw (com.liferay.portal.kernel.exception.PortalException)e;
788 }
789
790 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
791 throw (com.liferay.portal.kernel.exception.SystemException)e;
792 }
793
794 throw new com.liferay.portal.kernel.exception.SystemException(e);
795 }
796
797 return (com.liferay.portal.model.Group)returnObj;
798 }
799 catch (com.liferay.portal.kernel.exception.SystemException se) {
800 _log.error(se, se);
801
802 throw se;
803 }
804 }
805
806 public static com.liferay.portal.model.Group updateGroup(
807 HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
808 java.lang.String description, int type, java.lang.String friendlyURL,
809 boolean active, com.liferay.portal.service.ServiceContext serviceContext)
810 throws com.liferay.portal.kernel.exception.PortalException,
811 com.liferay.portal.kernel.exception.SystemException {
812 try {
813 Object paramObj0 = new LongWrapper(groupId);
814
815 Object paramObj1 = name;
816
817 if (name == null) {
818 paramObj1 = new NullWrapper("java.lang.String");
819 }
820
821 Object paramObj2 = description;
822
823 if (description == null) {
824 paramObj2 = new NullWrapper("java.lang.String");
825 }
826
827 Object paramObj3 = new IntegerWrapper(type);
828
829 Object paramObj4 = friendlyURL;
830
831 if (friendlyURL == null) {
832 paramObj4 = new NullWrapper("java.lang.String");
833 }
834
835 Object paramObj5 = new BooleanWrapper(active);
836
837 Object paramObj6 = serviceContext;
838
839 if (serviceContext == null) {
840 paramObj6 = new NullWrapper(
841 "com.liferay.portal.service.ServiceContext");
842 }
843
844 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
845 "updateGroup",
846 new Object[] {
847 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
848 paramObj5, paramObj6
849 });
850
851 Object returnObj = null;
852
853 try {
854 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
855 }
856 catch (Exception e) {
857 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
858 throw (com.liferay.portal.kernel.exception.PortalException)e;
859 }
860
861 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
862 throw (com.liferay.portal.kernel.exception.SystemException)e;
863 }
864
865 throw new com.liferay.portal.kernel.exception.SystemException(e);
866 }
867
868 return (com.liferay.portal.model.Group)returnObj;
869 }
870 catch (com.liferay.portal.kernel.exception.SystemException se) {
871 _log.error(se, se);
872
873 throw se;
874 }
875 }
876
877 public static com.liferay.portal.model.Group updateGroup(
878 HttpPrincipal httpPrincipal, long groupId, java.lang.String typeSettings)
879 throws com.liferay.portal.kernel.exception.PortalException,
880 com.liferay.portal.kernel.exception.SystemException {
881 try {
882 Object paramObj0 = new LongWrapper(groupId);
883
884 Object paramObj1 = typeSettings;
885
886 if (typeSettings == null) {
887 paramObj1 = new NullWrapper("java.lang.String");
888 }
889
890 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
891 "updateGroup", new Object[] { paramObj0, paramObj1 });
892
893 Object returnObj = null;
894
895 try {
896 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
897 }
898 catch (Exception e) {
899 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
900 throw (com.liferay.portal.kernel.exception.PortalException)e;
901 }
902
903 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
904 throw (com.liferay.portal.kernel.exception.SystemException)e;
905 }
906
907 throw new com.liferay.portal.kernel.exception.SystemException(e);
908 }
909
910 return (com.liferay.portal.model.Group)returnObj;
911 }
912 catch (com.liferay.portal.kernel.exception.SystemException se) {
913 _log.error(se, se);
914
915 throw se;
916 }
917 }
918
919 public static com.liferay.portal.model.Group updateWorkflow(
920 HttpPrincipal httpPrincipal, long groupId, boolean workflowEnabled,
921 int workflowStages, java.lang.String workflowRoleNames)
922 throws com.liferay.portal.kernel.exception.PortalException,
923 com.liferay.portal.kernel.exception.SystemException {
924 try {
925 Object paramObj0 = new LongWrapper(groupId);
926
927 Object paramObj1 = new BooleanWrapper(workflowEnabled);
928
929 Object paramObj2 = new IntegerWrapper(workflowStages);
930
931 Object paramObj3 = workflowRoleNames;
932
933 if (workflowRoleNames == null) {
934 paramObj3 = new NullWrapper("java.lang.String");
935 }
936
937 MethodWrapper methodWrapper = new MethodWrapper(GroupServiceUtil.class.getName(),
938 "updateWorkflow",
939 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
940
941 Object returnObj = null;
942
943 try {
944 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
945 }
946 catch (Exception e) {
947 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
948 throw (com.liferay.portal.kernel.exception.PortalException)e;
949 }
950
951 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
952 throw (com.liferay.portal.kernel.exception.SystemException)e;
953 }
954
955 throw new com.liferay.portal.kernel.exception.SystemException(e);
956 }
957
958 return (com.liferay.portal.model.Group)returnObj;
959 }
960 catch (com.liferay.portal.kernel.exception.SystemException se) {
961 _log.error(se, se);
962
963 throw se;
964 }
965 }
966
967 private static Log _log = LogFactoryUtil.getLog(GroupServiceHttp.class);
968 }