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