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