001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.GroupServiceUtil;
023    
024    /**
025     * <p>
026     * This class provides a HTTP utility for the
027     * {@link com.liferay.portal.service.GroupServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it requires an additional
030     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
031     * </p>
032     *
033     * <p>
034     * The benefits of using the HTTP utility is that it is fast and allows for
035     * tunneling without the cost of serializing to text. The drawback is that it
036     * only works with Java.
037     * </p>
038     *
039     * <p>
040     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
041     * configure security.
042     * </p>
043     *
044     * <p>
045     * The HTTP utility is only generated for remote services.
046     * </p>
047     *
048     * @author    Brian Wing Shun Chan
049     * @see       GroupServiceSoap
050     * @see       com.liferay.portal.security.auth.HttpPrincipal
051     * @see       com.liferay.portal.service.GroupServiceUtil
052     * @generated
053     */
054    public class GroupServiceHttp {
055            public static com.liferay.portal.model.Group addGroup(
056                    HttpPrincipal httpPrincipal, java.lang.String name,
057                    java.lang.String description, int type, java.lang.String friendlyURL,
058                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
059                    throws com.liferay.portal.kernel.exception.PortalException,
060                            com.liferay.portal.kernel.exception.SystemException {
061                    try {
062                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
063                                            "addGroup", java.lang.String.class, java.lang.String.class,
064                                            int.class, java.lang.String.class, boolean.class,
065                                            com.liferay.portal.service.ServiceContext.class);
066    
067                            MethodHandler methodHandler = new MethodHandler(methodKey, name,
068                                            description, type, friendlyURL, active, serviceContext);
069    
070                            Object returnObj = null;
071    
072                            try {
073                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
074                            }
075                            catch (Exception e) {
076                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
077                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
078                                    }
079    
080                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
081                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
082                                    }
083    
084                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
085                            }
086    
087                            return (com.liferay.portal.model.Group)returnObj;
088                    }
089                    catch (com.liferay.portal.kernel.exception.SystemException se) {
090                            _log.error(se, se);
091    
092                            throw se;
093                    }
094            }
095    
096            public static com.liferay.portal.model.Group addGroup(
097                    HttpPrincipal httpPrincipal, long liveGroupId, java.lang.String name,
098                    java.lang.String description, int type, java.lang.String friendlyURL,
099                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
100                    throws com.liferay.portal.kernel.exception.PortalException,
101                            com.liferay.portal.kernel.exception.SystemException {
102                    try {
103                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
104                                            "addGroup", long.class, java.lang.String.class,
105                                            java.lang.String.class, int.class, java.lang.String.class,
106                                            boolean.class,
107                                            com.liferay.portal.service.ServiceContext.class);
108    
109                            MethodHandler methodHandler = new MethodHandler(methodKey,
110                                            liveGroupId, name, description, type, friendlyURL, active,
111                                            serviceContext);
112    
113                            Object returnObj = null;
114    
115                            try {
116                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
117                            }
118                            catch (Exception e) {
119                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
120                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
121                                    }
122    
123                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
124                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
125                                    }
126    
127                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
128                            }
129    
130                            return (com.liferay.portal.model.Group)returnObj;
131                    }
132                    catch (com.liferay.portal.kernel.exception.SystemException se) {
133                            _log.error(se, se);
134    
135                            throw se;
136                    }
137            }
138    
139            public static void addRoleGroups(HttpPrincipal httpPrincipal, long roleId,
140                    long[] groupIds)
141                    throws com.liferay.portal.kernel.exception.PortalException,
142                            com.liferay.portal.kernel.exception.SystemException {
143                    try {
144                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
145                                            "addRoleGroups", long.class, long[].class);
146    
147                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
148                                            groupIds);
149    
150                            try {
151                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
152                            }
153                            catch (Exception e) {
154                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
155                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
156                                    }
157    
158                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
159                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
160                                    }
161    
162                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
163                            }
164                    }
165                    catch (com.liferay.portal.kernel.exception.SystemException se) {
166                            _log.error(se, se);
167    
168                            throw se;
169                    }
170            }
171    
172            public static void deleteGroup(HttpPrincipal httpPrincipal, long groupId)
173                    throws com.liferay.portal.kernel.exception.PortalException,
174                            com.liferay.portal.kernel.exception.SystemException {
175                    try {
176                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
177                                            "deleteGroup", long.class);
178    
179                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
180    
181                            try {
182                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
183                            }
184                            catch (Exception e) {
185                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
186                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
187                                    }
188    
189                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
190                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
191                                    }
192    
193                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
194                            }
195                    }
196                    catch (com.liferay.portal.kernel.exception.SystemException se) {
197                            _log.error(se, se);
198    
199                            throw se;
200                    }
201            }
202    
203            public static com.liferay.portal.model.Group getGroup(
204                    HttpPrincipal httpPrincipal, long groupId)
205                    throws com.liferay.portal.kernel.exception.PortalException,
206                            com.liferay.portal.kernel.exception.SystemException {
207                    try {
208                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
209                                            "getGroup", long.class);
210    
211                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
212    
213                            Object returnObj = null;
214    
215                            try {
216                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
217                            }
218                            catch (Exception e) {
219                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
220                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
221                                    }
222    
223                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
224                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
225                                    }
226    
227                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
228                            }
229    
230                            return (com.liferay.portal.model.Group)returnObj;
231                    }
232                    catch (com.liferay.portal.kernel.exception.SystemException se) {
233                            _log.error(se, se);
234    
235                            throw se;
236                    }
237            }
238    
239            public static com.liferay.portal.model.Group getGroup(
240                    HttpPrincipal httpPrincipal, long companyId, java.lang.String name)
241                    throws com.liferay.portal.kernel.exception.PortalException,
242                            com.liferay.portal.kernel.exception.SystemException {
243                    try {
244                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
245                                            "getGroup", long.class, java.lang.String.class);
246    
247                            MethodHandler methodHandler = new MethodHandler(methodKey,
248                                            companyId, name);
249    
250                            Object returnObj = null;
251    
252                            try {
253                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
254                            }
255                            catch (Exception e) {
256                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
257                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
258                                    }
259    
260                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
261                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
262                                    }
263    
264                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
265                            }
266    
267                            return (com.liferay.portal.model.Group)returnObj;
268                    }
269                    catch (com.liferay.portal.kernel.exception.SystemException se) {
270                            _log.error(se, se);
271    
272                            throw se;
273                    }
274            }
275    
276            public static java.util.List<com.liferay.portal.model.Group> getManageableGroups(
277                    HttpPrincipal httpPrincipal, java.lang.String actionId, int max)
278                    throws com.liferay.portal.kernel.exception.PortalException,
279                            com.liferay.portal.kernel.exception.SystemException {
280                    try {
281                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
282                                            "getManageableGroups", java.lang.String.class, int.class);
283    
284                            MethodHandler methodHandler = new MethodHandler(methodKey,
285                                            actionId, max);
286    
287                            Object returnObj = null;
288    
289                            try {
290                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
291                            }
292                            catch (Exception e) {
293                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
294                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
295                                    }
296    
297                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
298                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
299                                    }
300    
301                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
302                            }
303    
304                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
305                    }
306                    catch (com.liferay.portal.kernel.exception.SystemException se) {
307                            _log.error(se, se);
308    
309                            throw se;
310                    }
311            }
312    
313            public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
314                    HttpPrincipal httpPrincipal,
315                    java.util.List<com.liferay.portal.model.Organization> organizations)
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    try {
318                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
319                                            "getOrganizationsGroups", java.util.List.class);
320    
321                            MethodHandler methodHandler = new MethodHandler(methodKey,
322                                            organizations);
323    
324                            Object returnObj = null;
325    
326                            try {
327                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
328                            }
329                            catch (Exception e) {
330                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
331                            }
332    
333                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
334                    }
335                    catch (com.liferay.portal.kernel.exception.SystemException se) {
336                            _log.error(se, se);
337    
338                            throw se;
339                    }
340            }
341    
342            public static com.liferay.portal.model.Group getUserGroup(
343                    HttpPrincipal httpPrincipal, long companyId, long userId)
344                    throws com.liferay.portal.kernel.exception.PortalException,
345                            com.liferay.portal.kernel.exception.SystemException {
346                    try {
347                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
348                                            "getUserGroup", long.class, long.class);
349    
350                            MethodHandler methodHandler = new MethodHandler(methodKey,
351                                            companyId, userId);
352    
353                            Object returnObj = null;
354    
355                            try {
356                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
357                            }
358                            catch (Exception e) {
359                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
360                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
361                                    }
362    
363                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
364                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
365                                    }
366    
367                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
368                            }
369    
370                            return (com.liferay.portal.model.Group)returnObj;
371                    }
372                    catch (com.liferay.portal.kernel.exception.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.kernel.exception.PortalException,
383                            com.liferay.portal.kernel.exception.SystemException {
384                    try {
385                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
386                                            "getUserGroupsGroups", java.util.List.class);
387    
388                            MethodHandler methodHandler = new MethodHandler(methodKey,
389                                            userGroups);
390    
391                            Object returnObj = null;
392    
393                            try {
394                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
395                            }
396                            catch (Exception e) {
397                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
398                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
399                                    }
400    
401                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
402                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
403                                    }
404    
405                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
406                            }
407    
408                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
409                    }
410                    catch (com.liferay.portal.kernel.exception.SystemException se) {
411                            _log.error(se, se);
412    
413                            throw se;
414                    }
415            }
416    
417            public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
418                    HttpPrincipal httpPrincipal, long userId, int start, int end)
419                    throws com.liferay.portal.kernel.exception.PortalException,
420                            com.liferay.portal.kernel.exception.SystemException {
421                    try {
422                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
423                                            "getUserOrganizationsGroups", long.class, int.class,
424                                            int.class);
425    
426                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
427                                            start, end);
428    
429                            Object returnObj = null;
430    
431                            try {
432                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
433                            }
434                            catch (Exception e) {
435                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
436                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
437                                    }
438    
439                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
440                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
441                                    }
442    
443                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
444                            }
445    
446                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
447                    }
448                    catch (com.liferay.portal.kernel.exception.SystemException se) {
449                            _log.error(se, se);
450    
451                            throw se;
452                    }
453            }
454    
455            public static boolean hasUserGroup(HttpPrincipal httpPrincipal,
456                    long userId, long groupId)
457                    throws com.liferay.portal.kernel.exception.SystemException {
458                    try {
459                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
460                                            "hasUserGroup", long.class, long.class);
461    
462                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
463                                            groupId);
464    
465                            Object returnObj = null;
466    
467                            try {
468                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
469                            }
470                            catch (Exception e) {
471                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
472                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
473                                    }
474    
475                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
476                            }
477    
478                            return ((Boolean)returnObj).booleanValue();
479                    }
480                    catch (com.liferay.portal.kernel.exception.SystemException se) {
481                            _log.error(se, se);
482    
483                            throw se;
484                    }
485            }
486    
487            public static java.util.List<com.liferay.portal.model.Group> search(
488                    HttpPrincipal httpPrincipal, long companyId, java.lang.String name,
489                    java.lang.String description, java.lang.String[] params, int start,
490                    int end) throws com.liferay.portal.kernel.exception.SystemException {
491                    try {
492                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
493                                            "search", long.class, java.lang.String.class,
494                                            java.lang.String.class, java.lang.String[].class,
495                                            int.class, int.class);
496    
497                            MethodHandler methodHandler = new MethodHandler(methodKey,
498                                            companyId, name, description, params, start, end);
499    
500                            Object returnObj = null;
501    
502                            try {
503                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
504                            }
505                            catch (Exception e) {
506                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
507                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
508                                    }
509    
510                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
511                            }
512    
513                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
514                    }
515                    catch (com.liferay.portal.kernel.exception.SystemException se) {
516                            _log.error(se, se);
517    
518                            throw se;
519                    }
520            }
521    
522            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
523                    java.lang.String name, java.lang.String description,
524                    java.lang.String[] params)
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    try {
527                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
528                                            "searchCount", long.class, java.lang.String.class,
529                                            java.lang.String.class, java.lang.String[].class);
530    
531                            MethodHandler methodHandler = new MethodHandler(methodKey,
532                                            companyId, name, description, params);
533    
534                            Object returnObj = null;
535    
536                            try {
537                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
538                            }
539                            catch (Exception e) {
540                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
541                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
542                                    }
543    
544                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
545                            }
546    
547                            return ((Integer)returnObj).intValue();
548                    }
549                    catch (com.liferay.portal.kernel.exception.SystemException se) {
550                            _log.error(se, se);
551    
552                            throw se;
553                    }
554            }
555    
556            public static void setRoleGroups(HttpPrincipal httpPrincipal, long roleId,
557                    long[] groupIds)
558                    throws com.liferay.portal.kernel.exception.PortalException,
559                            com.liferay.portal.kernel.exception.SystemException {
560                    try {
561                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
562                                            "setRoleGroups", long.class, long[].class);
563    
564                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
565                                            groupIds);
566    
567                            try {
568                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
569                            }
570                            catch (Exception e) {
571                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
572                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
573                                    }
574    
575                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
576                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
577                                    }
578    
579                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
580                            }
581                    }
582                    catch (com.liferay.portal.kernel.exception.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.kernel.exception.PortalException,
592                            com.liferay.portal.kernel.exception.SystemException {
593                    try {
594                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
595                                            "unsetRoleGroups", long.class, long[].class);
596    
597                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
598                                            groupIds);
599    
600                            try {
601                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
602                            }
603                            catch (Exception e) {
604                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
605                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
606                                    }
607    
608                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
609                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
610                                    }
611    
612                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
613                            }
614                    }
615                    catch (com.liferay.portal.kernel.exception.SystemException se) {
616                            _log.error(se, se);
617    
618                            throw se;
619                    }
620            }
621    
622            public static com.liferay.portal.model.Group updateFriendlyURL(
623                    HttpPrincipal httpPrincipal, long groupId, java.lang.String friendlyURL)
624                    throws com.liferay.portal.kernel.exception.PortalException,
625                            com.liferay.portal.kernel.exception.SystemException {
626                    try {
627                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
628                                            "updateFriendlyURL", long.class, java.lang.String.class);
629    
630                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
631                                            friendlyURL);
632    
633                            Object returnObj = null;
634    
635                            try {
636                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
637                            }
638                            catch (Exception e) {
639                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
640                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
641                                    }
642    
643                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
644                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
645                                    }
646    
647                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
648                            }
649    
650                            return (com.liferay.portal.model.Group)returnObj;
651                    }
652                    catch (com.liferay.portal.kernel.exception.SystemException se) {
653                            _log.error(se, se);
654    
655                            throw se;
656                    }
657            }
658    
659            public static com.liferay.portal.model.Group updateGroup(
660                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
661                    java.lang.String description, int type, java.lang.String friendlyURL,
662                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
663                    throws com.liferay.portal.kernel.exception.PortalException,
664                            com.liferay.portal.kernel.exception.SystemException {
665                    try {
666                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
667                                            "updateGroup", long.class, java.lang.String.class,
668                                            java.lang.String.class, int.class, java.lang.String.class,
669                                            boolean.class,
670                                            com.liferay.portal.service.ServiceContext.class);
671    
672                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
673                                            name, description, type, friendlyURL, active, serviceContext);
674    
675                            Object returnObj = null;
676    
677                            try {
678                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
679                            }
680                            catch (Exception e) {
681                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
682                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
683                                    }
684    
685                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
686                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
687                                    }
688    
689                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
690                            }
691    
692                            return (com.liferay.portal.model.Group)returnObj;
693                    }
694                    catch (com.liferay.portal.kernel.exception.SystemException se) {
695                            _log.error(se, se);
696    
697                            throw se;
698                    }
699            }
700    
701            public static com.liferay.portal.model.Group updateGroup(
702                    HttpPrincipal httpPrincipal, long groupId, java.lang.String typeSettings)
703                    throws com.liferay.portal.kernel.exception.PortalException,
704                            com.liferay.portal.kernel.exception.SystemException {
705                    try {
706                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
707                                            "updateGroup", long.class, java.lang.String.class);
708    
709                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
710                                            typeSettings);
711    
712                            Object returnObj = null;
713    
714                            try {
715                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
716                            }
717                            catch (Exception e) {
718                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
719                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
720                                    }
721    
722                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
723                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
724                                    }
725    
726                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
727                            }
728    
729                            return (com.liferay.portal.model.Group)returnObj;
730                    }
731                    catch (com.liferay.portal.kernel.exception.SystemException se) {
732                            _log.error(se, se);
733    
734                            throw se;
735                    }
736            }
737    
738            public static com.liferay.portal.model.Group updateWorkflow(
739                    HttpPrincipal httpPrincipal, long groupId, boolean workflowEnabled,
740                    int workflowStages, java.lang.String workflowRoleNames)
741                    throws com.liferay.portal.kernel.exception.PortalException,
742                            com.liferay.portal.kernel.exception.SystemException {
743                    try {
744                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
745                                            "updateWorkflow", long.class, boolean.class, int.class,
746                                            java.lang.String.class);
747    
748                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
749                                            workflowEnabled, workflowStages, workflowRoleNames);
750    
751                            Object returnObj = null;
752    
753                            try {
754                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
755                            }
756                            catch (Exception e) {
757                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
758                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
759                                    }
760    
761                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
762                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
763                                    }
764    
765                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
766                            }
767    
768                            return (com.liferay.portal.model.Group)returnObj;
769                    }
770                    catch (com.liferay.portal.kernel.exception.SystemException se) {
771                            _log.error(se, se);
772    
773                            throw se;
774                    }
775            }
776    
777            private static Log _log = LogFactoryUtil.getLog(GroupServiceHttp.class);
778    }