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