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