1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
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.MethodHandler;
20  import com.liferay.portal.kernel.util.MethodKey;
21  import com.liferay.portal.security.auth.HttpPrincipal;
22  import com.liferay.portal.service.GroupServiceUtil;
23  
24  /**
25   * <a href="GroupServiceHttp.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * <p>
33   * This class provides a HTTP utility for the
34   * {@link com.liferay.portal.service.GroupServiceUtil} service utility. The
35   * static methods of this class calls the same methods of the service utility.
36   * However, the signatures are different because it requires an additional
37   * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
38   * </p>
39   *
40   * <p>
41   * The benefits of using the HTTP utility is that it is fast and allows for
42   * tunneling without the cost of serializing to text. The drawback is that it
43   * only works with Java.
44   * </p>
45   *
46   * <p>
47   * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
48   * configure security.
49   * </p>
50   *
51   * <p>
52   * The HTTP utility is only generated for remote services.
53   * </p>
54   *
55   * @author    Brian Wing Shun Chan
56   * @see       GroupServiceSoap
57   * @see       com.liferay.portal.security.auth.HttpPrincipal
58   * @see       com.liferay.portal.service.GroupServiceUtil
59   * @generated
60   */
61  public class GroupServiceHttp {
62      public static com.liferay.portal.model.Group addGroup(
63          HttpPrincipal httpPrincipal, java.lang.String name,
64          java.lang.String description, int type, java.lang.String friendlyURL,
65          boolean active, com.liferay.portal.service.ServiceContext serviceContext)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException {
68          try {
69              MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
70                      "addGroup", _addGroupParameterTypes0);
71  
72              MethodHandler methodHandler = new MethodHandler(methodKey, name,
73                      description, type, friendlyURL, active, serviceContext);
74  
75              Object returnObj = null;
76  
77              try {
78                  returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
79              }
80              catch (Exception e) {
81                  if (e instanceof com.liferay.portal.PortalException) {
82                      throw (com.liferay.portal.PortalException)e;
83                  }
84  
85                  if (e instanceof com.liferay.portal.SystemException) {
86                      throw (com.liferay.portal.SystemException)e;
87                  }
88  
89                  throw new com.liferay.portal.SystemException(e);
90              }
91  
92              return (com.liferay.portal.model.Group)returnObj;
93          }
94          catch (com.liferay.portal.SystemException se) {
95              _log.error(se, se);
96  
97              throw se;
98          }
99      }
100 
101     public static com.liferay.portal.model.Group addGroup(
102         HttpPrincipal httpPrincipal, long liveGroupId, java.lang.String name,
103         java.lang.String description, int type, java.lang.String friendlyURL,
104         boolean active, com.liferay.portal.service.ServiceContext serviceContext)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException {
107         try {
108             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
109                     "addGroup", _addGroupParameterTypes1);
110 
111             MethodHandler methodHandler = new MethodHandler(methodKey,
112                     liveGroupId, name, description, type, friendlyURL, active,
113                     serviceContext);
114 
115             Object returnObj = null;
116 
117             try {
118                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
119             }
120             catch (Exception e) {
121                 if (e instanceof com.liferay.portal.PortalException) {
122                     throw (com.liferay.portal.PortalException)e;
123                 }
124 
125                 if (e instanceof com.liferay.portal.SystemException) {
126                     throw (com.liferay.portal.SystemException)e;
127                 }
128 
129                 throw new com.liferay.portal.SystemException(e);
130             }
131 
132             return (com.liferay.portal.model.Group)returnObj;
133         }
134         catch (com.liferay.portal.SystemException se) {
135             _log.error(se, se);
136 
137             throw se;
138         }
139     }
140 
141     public static void addRoleGroups(HttpPrincipal httpPrincipal, long roleId,
142         long[] groupIds)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         try {
146             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
147                     "addRoleGroups", _addRoleGroupsParameterTypes2);
148 
149             MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
150                     groupIds);
151 
152             try {
153                 TunnelUtil.invoke(httpPrincipal, methodHandler);
154             }
155             catch (Exception e) {
156                 if (e instanceof com.liferay.portal.PortalException) {
157                     throw (com.liferay.portal.PortalException)e;
158                 }
159 
160                 if (e instanceof com.liferay.portal.SystemException) {
161                     throw (com.liferay.portal.SystemException)e;
162                 }
163 
164                 throw new com.liferay.portal.SystemException(e);
165             }
166         }
167         catch (com.liferay.portal.SystemException se) {
168             _log.error(se, se);
169 
170             throw se;
171         }
172     }
173 
174     public static void deleteGroup(HttpPrincipal httpPrincipal, long groupId)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException {
177         try {
178             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
179                     "deleteGroup", _deleteGroupParameterTypes3);
180 
181             MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
182 
183             try {
184                 TunnelUtil.invoke(httpPrincipal, methodHandler);
185             }
186             catch (Exception e) {
187                 if (e instanceof com.liferay.portal.PortalException) {
188                     throw (com.liferay.portal.PortalException)e;
189                 }
190 
191                 if (e instanceof com.liferay.portal.SystemException) {
192                     throw (com.liferay.portal.SystemException)e;
193                 }
194 
195                 throw new com.liferay.portal.SystemException(e);
196             }
197         }
198         catch (com.liferay.portal.SystemException se) {
199             _log.error(se, se);
200 
201             throw se;
202         }
203     }
204 
205     public static com.liferay.portal.model.Group getGroup(
206         HttpPrincipal httpPrincipal, long groupId)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         try {
210             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
211                     "getGroup", _getGroupParameterTypes4);
212 
213             MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
214 
215             Object returnObj = null;
216 
217             try {
218                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
219             }
220             catch (Exception e) {
221                 if (e instanceof com.liferay.portal.PortalException) {
222                     throw (com.liferay.portal.PortalException)e;
223                 }
224 
225                 if (e instanceof com.liferay.portal.SystemException) {
226                     throw (com.liferay.portal.SystemException)e;
227                 }
228 
229                 throw new com.liferay.portal.SystemException(e);
230             }
231 
232             return (com.liferay.portal.model.Group)returnObj;
233         }
234         catch (com.liferay.portal.SystemException se) {
235             _log.error(se, se);
236 
237             throw se;
238         }
239     }
240 
241     public static com.liferay.portal.model.Group getGroup(
242         HttpPrincipal httpPrincipal, long companyId, java.lang.String name)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException {
245         try {
246             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
247                     "getGroup", _getGroupParameterTypes5);
248 
249             MethodHandler methodHandler = new MethodHandler(methodKey,
250                     companyId, name);
251 
252             Object returnObj = null;
253 
254             try {
255                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
256             }
257             catch (Exception e) {
258                 if (e instanceof com.liferay.portal.PortalException) {
259                     throw (com.liferay.portal.PortalException)e;
260                 }
261 
262                 if (e instanceof com.liferay.portal.SystemException) {
263                     throw (com.liferay.portal.SystemException)e;
264                 }
265 
266                 throw new com.liferay.portal.SystemException(e);
267             }
268 
269             return (com.liferay.portal.model.Group)returnObj;
270         }
271         catch (com.liferay.portal.SystemException se) {
272             _log.error(se, se);
273 
274             throw se;
275         }
276     }
277 
278     public static java.util.List<com.liferay.portal.model.Group> getManageableGroups(
279         HttpPrincipal httpPrincipal, java.lang.String actionId, int max)
280         throws com.liferay.portal.PortalException,
281             com.liferay.portal.SystemException {
282         try {
283             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
284                     "getManageableGroups", _getManageableGroupsParameterTypes6);
285 
286             MethodHandler methodHandler = new MethodHandler(methodKey,
287                     actionId, max);
288 
289             Object returnObj = null;
290 
291             try {
292                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
293             }
294             catch (Exception e) {
295                 if (e instanceof com.liferay.portal.PortalException) {
296                     throw (com.liferay.portal.PortalException)e;
297                 }
298 
299                 if (e instanceof com.liferay.portal.SystemException) {
300                     throw (com.liferay.portal.SystemException)e;
301                 }
302 
303                 throw new com.liferay.portal.SystemException(e);
304             }
305 
306             return (java.util.List<com.liferay.portal.model.Group>)returnObj;
307         }
308         catch (com.liferay.portal.SystemException se) {
309             _log.error(se, se);
310 
311             throw se;
312         }
313     }
314 
315     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
316         HttpPrincipal httpPrincipal,
317         java.util.List<com.liferay.portal.model.Organization> organizations)
318         throws com.liferay.portal.SystemException {
319         try {
320             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
321                     "getOrganizationsGroups",
322                     _getOrganizationsGroupsParameterTypes7);
323 
324             MethodHandler methodHandler = new MethodHandler(methodKey,
325                     organizations);
326 
327             Object returnObj = null;
328 
329             try {
330                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
331             }
332             catch (Exception e) {
333                 throw new com.liferay.portal.SystemException(e);
334             }
335 
336             return (java.util.List<com.liferay.portal.model.Group>)returnObj;
337         }
338         catch (com.liferay.portal.SystemException se) {
339             _log.error(se, se);
340 
341             throw se;
342         }
343     }
344 
345     public static com.liferay.portal.model.Group getUserGroup(
346         HttpPrincipal httpPrincipal, long companyId, long userId)
347         throws com.liferay.portal.PortalException,
348             com.liferay.portal.SystemException {
349         try {
350             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
351                     "getUserGroup", _getUserGroupParameterTypes8);
352 
353             MethodHandler methodHandler = new MethodHandler(methodKey,
354                     companyId, userId);
355 
356             Object returnObj = null;
357 
358             try {
359                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
360             }
361             catch (Exception e) {
362                 if (e instanceof com.liferay.portal.PortalException) {
363                     throw (com.liferay.portal.PortalException)e;
364                 }
365 
366                 if (e instanceof com.liferay.portal.SystemException) {
367                     throw (com.liferay.portal.SystemException)e;
368                 }
369 
370                 throw new com.liferay.portal.SystemException(e);
371             }
372 
373             return (com.liferay.portal.model.Group)returnObj;
374         }
375         catch (com.liferay.portal.SystemException se) {
376             _log.error(se, se);
377 
378             throw se;
379         }
380     }
381 
382     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
383         HttpPrincipal httpPrincipal,
384         java.util.List<com.liferay.portal.model.UserGroup> userGroups)
385         throws com.liferay.portal.SystemException {
386         try {
387             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
388                     "getUserGroupsGroups", _getUserGroupsGroupsParameterTypes9);
389 
390             MethodHandler methodHandler = new MethodHandler(methodKey,
391                     userGroups);
392 
393             Object returnObj = null;
394 
395             try {
396                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
397             }
398             catch (Exception e) {
399                 throw new com.liferay.portal.SystemException(e);
400             }
401 
402             return (java.util.List<com.liferay.portal.model.Group>)returnObj;
403         }
404         catch (com.liferay.portal.SystemException se) {
405             _log.error(se, se);
406 
407             throw se;
408         }
409     }
410 
411     public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
412         HttpPrincipal httpPrincipal, long userId, int start, int end)
413         throws com.liferay.portal.PortalException,
414             com.liferay.portal.SystemException {
415         try {
416             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
417                     "getUserOrganizationsGroups",
418                     _getUserOrganizationsGroupsParameterTypes10);
419 
420             MethodHandler methodHandler = new MethodHandler(methodKey, userId,
421                     start, end);
422 
423             Object returnObj = null;
424 
425             try {
426                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
427             }
428             catch (Exception e) {
429                 if (e instanceof com.liferay.portal.PortalException) {
430                     throw (com.liferay.portal.PortalException)e;
431                 }
432 
433                 if (e instanceof com.liferay.portal.SystemException) {
434                     throw (com.liferay.portal.SystemException)e;
435                 }
436 
437                 throw new com.liferay.portal.SystemException(e);
438             }
439 
440             return (java.util.List<com.liferay.portal.model.Group>)returnObj;
441         }
442         catch (com.liferay.portal.SystemException se) {
443             _log.error(se, se);
444 
445             throw se;
446         }
447     }
448 
449     public static boolean hasUserGroup(HttpPrincipal httpPrincipal,
450         long userId, long groupId) throws com.liferay.portal.SystemException {
451         try {
452             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
453                     "hasUserGroup", _hasUserGroupParameterTypes11);
454 
455             MethodHandler methodHandler = new MethodHandler(methodKey, userId,
456                     groupId);
457 
458             Object returnObj = null;
459 
460             try {
461                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
462             }
463             catch (Exception e) {
464                 if (e instanceof com.liferay.portal.SystemException) {
465                     throw (com.liferay.portal.SystemException)e;
466                 }
467 
468                 throw new com.liferay.portal.SystemException(e);
469             }
470 
471             return ((Boolean)returnObj).booleanValue();
472         }
473         catch (com.liferay.portal.SystemException se) {
474             _log.error(se, se);
475 
476             throw se;
477         }
478     }
479 
480     public static java.util.List<com.liferay.portal.model.Group> search(
481         HttpPrincipal httpPrincipal, long companyId, java.lang.String name,
482         java.lang.String description, java.lang.String[] params, int start,
483         int end) throws com.liferay.portal.SystemException {
484         try {
485             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
486                     "search", _searchParameterTypes12);
487 
488             MethodHandler methodHandler = new MethodHandler(methodKey,
489                     companyId, name, description, params, start, end);
490 
491             Object returnObj = null;
492 
493             try {
494                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
495             }
496             catch (Exception e) {
497                 if (e instanceof com.liferay.portal.SystemException) {
498                     throw (com.liferay.portal.SystemException)e;
499                 }
500 
501                 throw new com.liferay.portal.SystemException(e);
502             }
503 
504             return (java.util.List<com.liferay.portal.model.Group>)returnObj;
505         }
506         catch (com.liferay.portal.SystemException se) {
507             _log.error(se, se);
508 
509             throw se;
510         }
511     }
512 
513     public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
514         java.lang.String name, java.lang.String description,
515         java.lang.String[] params) throws com.liferay.portal.SystemException {
516         try {
517             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
518                     "searchCount", _searchCountParameterTypes13);
519 
520             MethodHandler methodHandler = new MethodHandler(methodKey,
521                     companyId, name, description, params);
522 
523             Object returnObj = null;
524 
525             try {
526                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
527             }
528             catch (Exception e) {
529                 if (e instanceof com.liferay.portal.SystemException) {
530                     throw (com.liferay.portal.SystemException)e;
531                 }
532 
533                 throw new com.liferay.portal.SystemException(e);
534             }
535 
536             return ((Integer)returnObj).intValue();
537         }
538         catch (com.liferay.portal.SystemException se) {
539             _log.error(se, se);
540 
541             throw se;
542         }
543     }
544 
545     public static void setRoleGroups(HttpPrincipal httpPrincipal, long roleId,
546         long[] groupIds)
547         throws com.liferay.portal.PortalException,
548             com.liferay.portal.SystemException {
549         try {
550             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
551                     "setRoleGroups", _setRoleGroupsParameterTypes14);
552 
553             MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
554                     groupIds);
555 
556             try {
557                 TunnelUtil.invoke(httpPrincipal, methodHandler);
558             }
559             catch (Exception e) {
560                 if (e instanceof com.liferay.portal.PortalException) {
561                     throw (com.liferay.portal.PortalException)e;
562                 }
563 
564                 if (e instanceof com.liferay.portal.SystemException) {
565                     throw (com.liferay.portal.SystemException)e;
566                 }
567 
568                 throw new com.liferay.portal.SystemException(e);
569             }
570         }
571         catch (com.liferay.portal.SystemException se) {
572             _log.error(se, se);
573 
574             throw se;
575         }
576     }
577 
578     public static void unsetRoleGroups(HttpPrincipal httpPrincipal,
579         long roleId, long[] groupIds)
580         throws com.liferay.portal.PortalException,
581             com.liferay.portal.SystemException {
582         try {
583             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
584                     "unsetRoleGroups", _unsetRoleGroupsParameterTypes15);
585 
586             MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
587                     groupIds);
588 
589             try {
590                 TunnelUtil.invoke(httpPrincipal, methodHandler);
591             }
592             catch (Exception e) {
593                 if (e instanceof com.liferay.portal.PortalException) {
594                     throw (com.liferay.portal.PortalException)e;
595                 }
596 
597                 if (e instanceof com.liferay.portal.SystemException) {
598                     throw (com.liferay.portal.SystemException)e;
599                 }
600 
601                 throw new com.liferay.portal.SystemException(e);
602             }
603         }
604         catch (com.liferay.portal.SystemException se) {
605             _log.error(se, se);
606 
607             throw se;
608         }
609     }
610 
611     public static com.liferay.portal.model.Group updateFriendlyURL(
612         HttpPrincipal httpPrincipal, long groupId, java.lang.String friendlyURL)
613         throws com.liferay.portal.PortalException,
614             com.liferay.portal.SystemException {
615         try {
616             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
617                     "updateFriendlyURL", _updateFriendlyURLParameterTypes16);
618 
619             MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
620                     friendlyURL);
621 
622             Object returnObj = null;
623 
624             try {
625                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
626             }
627             catch (Exception e) {
628                 if (e instanceof com.liferay.portal.PortalException) {
629                     throw (com.liferay.portal.PortalException)e;
630                 }
631 
632                 if (e instanceof com.liferay.portal.SystemException) {
633                     throw (com.liferay.portal.SystemException)e;
634                 }
635 
636                 throw new com.liferay.portal.SystemException(e);
637             }
638 
639             return (com.liferay.portal.model.Group)returnObj;
640         }
641         catch (com.liferay.portal.SystemException se) {
642             _log.error(se, se);
643 
644             throw se;
645         }
646     }
647 
648     public static com.liferay.portal.model.Group updateGroup(
649         HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
650         java.lang.String description, int type, java.lang.String friendlyURL,
651         boolean active, com.liferay.portal.service.ServiceContext serviceContext)
652         throws com.liferay.portal.PortalException,
653             com.liferay.portal.SystemException {
654         try {
655             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
656                     "updateGroup", _updateGroupParameterTypes17);
657 
658             MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
659                     name, description, type, friendlyURL, active, serviceContext);
660 
661             Object returnObj = null;
662 
663             try {
664                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
665             }
666             catch (Exception e) {
667                 if (e instanceof com.liferay.portal.PortalException) {
668                     throw (com.liferay.portal.PortalException)e;
669                 }
670 
671                 if (e instanceof com.liferay.portal.SystemException) {
672                     throw (com.liferay.portal.SystemException)e;
673                 }
674 
675                 throw new com.liferay.portal.SystemException(e);
676             }
677 
678             return (com.liferay.portal.model.Group)returnObj;
679         }
680         catch (com.liferay.portal.SystemException se) {
681             _log.error(se, se);
682 
683             throw se;
684         }
685     }
686 
687     public static com.liferay.portal.model.Group updateGroup(
688         HttpPrincipal httpPrincipal, long groupId, java.lang.String typeSettings)
689         throws com.liferay.portal.PortalException,
690             com.liferay.portal.SystemException {
691         try {
692             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
693                     "updateGroup", _updateGroupParameterTypes18);
694 
695             MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
696                     typeSettings);
697 
698             Object returnObj = null;
699 
700             try {
701                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
702             }
703             catch (Exception e) {
704                 if (e instanceof com.liferay.portal.PortalException) {
705                     throw (com.liferay.portal.PortalException)e;
706                 }
707 
708                 if (e instanceof com.liferay.portal.SystemException) {
709                     throw (com.liferay.portal.SystemException)e;
710                 }
711 
712                 throw new com.liferay.portal.SystemException(e);
713             }
714 
715             return (com.liferay.portal.model.Group)returnObj;
716         }
717         catch (com.liferay.portal.SystemException se) {
718             _log.error(se, se);
719 
720             throw se;
721         }
722     }
723 
724     public static com.liferay.portal.model.Group updateWorkflow(
725         HttpPrincipal httpPrincipal, long groupId, boolean workflowEnabled,
726         int workflowStages, java.lang.String workflowRoleNames)
727         throws com.liferay.portal.PortalException,
728             com.liferay.portal.SystemException {
729         try {
730             MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
731                     "updateWorkflow", _updateWorkflowParameterTypes19);
732 
733             MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
734                     workflowEnabled, workflowStages, workflowRoleNames);
735 
736             Object returnObj = null;
737 
738             try {
739                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
740             }
741             catch (Exception e) {
742                 if (e instanceof com.liferay.portal.PortalException) {
743                     throw (com.liferay.portal.PortalException)e;
744                 }
745 
746                 if (e instanceof com.liferay.portal.SystemException) {
747                     throw (com.liferay.portal.SystemException)e;
748                 }
749 
750                 throw new com.liferay.portal.SystemException(e);
751             }
752 
753             return (com.liferay.portal.model.Group)returnObj;
754         }
755         catch (com.liferay.portal.SystemException se) {
756             _log.error(se, se);
757 
758             throw se;
759         }
760     }
761 
762     private static Log _log = LogFactoryUtil.getLog(GroupServiceHttp.class);
763     private static final Class<?>[] _addGroupParameterTypes0 = new Class[] {
764             java.lang.String.class, java.lang.String.class, int.class,
765             java.lang.String.class, boolean.class,
766             com.liferay.portal.service.ServiceContext.class
767         };
768     private static final Class<?>[] _addGroupParameterTypes1 = new Class[] {
769             long.class, java.lang.String.class, java.lang.String.class,
770             int.class, java.lang.String.class, boolean.class,
771             com.liferay.portal.service.ServiceContext.class
772         };
773     private static final Class<?>[] _addRoleGroupsParameterTypes2 = new Class[] {
774             long.class, long[].class
775         };
776     private static final Class<?>[] _deleteGroupParameterTypes3 = new Class[] {
777             long.class
778         };
779     private static final Class<?>[] _getGroupParameterTypes4 = new Class[] {
780             long.class
781         };
782     private static final Class<?>[] _getGroupParameterTypes5 = new Class[] {
783             long.class, java.lang.String.class
784         };
785     private static final Class<?>[] _getManageableGroupsParameterTypes6 = new Class[] {
786             java.lang.String.class, int.class
787         };
788     private static final Class<?>[] _getOrganizationsGroupsParameterTypes7 = new Class[] {
789             java.util.List.class
790         };
791     private static final Class<?>[] _getUserGroupParameterTypes8 = new Class[] {
792             long.class, long.class
793         };
794     private static final Class<?>[] _getUserGroupsGroupsParameterTypes9 = new Class[] {
795             java.util.List.class
796         };
797     private static final Class<?>[] _getUserOrganizationsGroupsParameterTypes10 = new Class[] {
798             long.class, int.class, int.class
799         };
800     private static final Class<?>[] _hasUserGroupParameterTypes11 = new Class[] {
801             long.class, long.class
802         };
803     private static final Class<?>[] _searchParameterTypes12 = new Class[] {
804             long.class, java.lang.String.class, java.lang.String.class,
805             java.lang.String[].class, int.class, int.class
806         };
807     private static final Class<?>[] _searchCountParameterTypes13 = new Class[] {
808             long.class, java.lang.String.class, java.lang.String.class,
809             java.lang.String[].class
810         };
811     private static final Class<?>[] _setRoleGroupsParameterTypes14 = new Class[] {
812             long.class, long[].class
813         };
814     private static final Class<?>[] _unsetRoleGroupsParameterTypes15 = new Class[] {
815             long.class, long[].class
816         };
817     private static final Class<?>[] _updateFriendlyURLParameterTypes16 = new Class[] {
818             long.class, java.lang.String.class
819         };
820     private static final Class<?>[] _updateGroupParameterTypes17 = new Class[] {
821             long.class, java.lang.String.class, java.lang.String.class,
822             int.class, java.lang.String.class, boolean.class,
823             com.liferay.portal.service.ServiceContext.class
824         };
825     private static final Class<?>[] _updateGroupParameterTypes18 = new Class[] {
826             long.class, java.lang.String.class
827         };
828     private static final Class<?>[] _updateWorkflowParameterTypes19 = new Class[] {
829             long.class, boolean.class, int.class, java.lang.String.class
830         };
831 }