001    /**
002     * Copyright (c) 2000-2013 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, long parentGroupId, long liveGroupId,
057                    java.lang.String name, java.lang.String description, int type,
058                    java.lang.String friendlyURL, boolean site, boolean active,
059                    com.liferay.portal.service.ServiceContext serviceContext)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    try {
063                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
064                                            "addGroup", _addGroupParameterTypes0);
065    
066                            MethodHandler methodHandler = new MethodHandler(methodKey,
067                                            parentGroupId, liveGroupId, name, description, type,
068                                            friendlyURL, site, 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 parentGroupId, java.lang.String name,
098                    java.lang.String description, int type, java.lang.String friendlyURL,
099                    boolean site, boolean active,
100                    com.liferay.portal.service.ServiceContext serviceContext)
101                    throws com.liferay.portal.kernel.exception.PortalException,
102                            com.liferay.portal.kernel.exception.SystemException {
103                    try {
104                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
105                                            "addGroup", _addGroupParameterTypes1);
106    
107                            MethodHandler methodHandler = new MethodHandler(methodKey,
108                                            parentGroupId, name, description, type, friendlyURL, site,
109                                            active, serviceContext);
110    
111                            Object returnObj = null;
112    
113                            try {
114                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
115                            }
116                            catch (Exception e) {
117                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
118                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
119                                    }
120    
121                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
122                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
123                                    }
124    
125                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
126                            }
127    
128                            return (com.liferay.portal.model.Group)returnObj;
129                    }
130                    catch (com.liferay.portal.kernel.exception.SystemException se) {
131                            _log.error(se, se);
132    
133                            throw se;
134                    }
135            }
136    
137            public static com.liferay.portal.model.Group addGroup(
138                    HttpPrincipal httpPrincipal, java.lang.String name,
139                    java.lang.String description, int type, java.lang.String friendlyURL,
140                    boolean site, boolean active,
141                    com.liferay.portal.service.ServiceContext serviceContext)
142                    throws com.liferay.portal.kernel.exception.PortalException,
143                            com.liferay.portal.kernel.exception.SystemException {
144                    try {
145                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
146                                            "addGroup", _addGroupParameterTypes2);
147    
148                            MethodHandler methodHandler = new MethodHandler(methodKey, name,
149                                            description, type, friendlyURL, site, active, serviceContext);
150    
151                            Object returnObj = null;
152    
153                            try {
154                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
155                            }
156                            catch (Exception e) {
157                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
158                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
159                                    }
160    
161                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
162                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
163                                    }
164    
165                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
166                            }
167    
168                            return (com.liferay.portal.model.Group)returnObj;
169                    }
170                    catch (com.liferay.portal.kernel.exception.SystemException se) {
171                            _log.error(se, se);
172    
173                            throw se;
174                    }
175            }
176    
177            public static void addRoleGroups(HttpPrincipal httpPrincipal, long roleId,
178                    long[] groupIds)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    try {
182                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
183                                            "addRoleGroups", _addRoleGroupsParameterTypes3);
184    
185                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
186                                            groupIds);
187    
188                            try {
189                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
190                            }
191                            catch (Exception e) {
192                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
193                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
194                                    }
195    
196                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
197                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
198                                    }
199    
200                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
201                            }
202                    }
203                    catch (com.liferay.portal.kernel.exception.SystemException se) {
204                            _log.error(se, se);
205    
206                            throw se;
207                    }
208            }
209    
210            public static void checkRemoteStagingGroup(HttpPrincipal httpPrincipal,
211                    long groupId)
212                    throws com.liferay.portal.kernel.exception.PortalException,
213                            com.liferay.portal.kernel.exception.SystemException {
214                    try {
215                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
216                                            "checkRemoteStagingGroup",
217                                            _checkRemoteStagingGroupParameterTypes4);
218    
219                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
220    
221                            try {
222                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
223                            }
224                            catch (Exception e) {
225                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
226                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
227                                    }
228    
229                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
230                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
231                                    }
232    
233                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
234                            }
235                    }
236                    catch (com.liferay.portal.kernel.exception.SystemException se) {
237                            _log.error(se, se);
238    
239                            throw se;
240                    }
241            }
242    
243            public static void deleteGroup(HttpPrincipal httpPrincipal, long groupId)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    try {
247                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
248                                            "deleteGroup", _deleteGroupParameterTypes5);
249    
250                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
251    
252                            try {
253                                    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                    catch (com.liferay.portal.kernel.exception.SystemException se) {
268                            _log.error(se, se);
269    
270                            throw se;
271                    }
272            }
273    
274            public static com.liferay.portal.model.Group getGroup(
275                    HttpPrincipal httpPrincipal, long groupId)
276                    throws com.liferay.portal.kernel.exception.PortalException,
277                            com.liferay.portal.kernel.exception.SystemException {
278                    try {
279                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
280                                            "getGroup", _getGroupParameterTypes6);
281    
282                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
283    
284                            Object returnObj = null;
285    
286                            try {
287                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
288                            }
289                            catch (Exception e) {
290                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
291                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
292                                    }
293    
294                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
295                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
296                                    }
297    
298                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
299                            }
300    
301                            return (com.liferay.portal.model.Group)returnObj;
302                    }
303                    catch (com.liferay.portal.kernel.exception.SystemException se) {
304                            _log.error(se, se);
305    
306                            throw se;
307                    }
308            }
309    
310            public static com.liferay.portal.model.Group getGroup(
311                    HttpPrincipal httpPrincipal, long companyId, java.lang.String name)
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    try {
315                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
316                                            "getGroup", _getGroupParameterTypes7);
317    
318                            MethodHandler methodHandler = new MethodHandler(methodKey,
319                                            companyId, name);
320    
321                            Object returnObj = null;
322    
323                            try {
324                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
325                            }
326                            catch (Exception e) {
327                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
328                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
329                                    }
330    
331                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
332                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
333                                    }
334    
335                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
336                            }
337    
338                            return (com.liferay.portal.model.Group)returnObj;
339                    }
340                    catch (com.liferay.portal.kernel.exception.SystemException se) {
341                            _log.error(se, se);
342    
343                            throw se;
344                    }
345            }
346    
347            public static java.util.List<com.liferay.portal.model.Group> getManageableSites(
348                    HttpPrincipal httpPrincipal,
349                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
350                    throws com.liferay.portal.kernel.exception.PortalException,
351                            com.liferay.portal.kernel.exception.SystemException {
352                    try {
353                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
354                                            "getManageableSites", _getManageableSitesParameterTypes8);
355    
356                            MethodHandler methodHandler = new MethodHandler(methodKey,
357                                            portlets, max);
358    
359                            Object returnObj = null;
360    
361                            try {
362                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
363                            }
364                            catch (Exception e) {
365                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
366                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
367                                    }
368    
369                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
370                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
371                                    }
372    
373                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
374                            }
375    
376                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
377                    }
378                    catch (com.liferay.portal.kernel.exception.SystemException se) {
379                            _log.error(se, se);
380    
381                            throw se;
382                    }
383            }
384    
385            public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
386                    HttpPrincipal httpPrincipal,
387                    java.util.List<com.liferay.portal.model.Organization> organizations)
388                    throws com.liferay.portal.kernel.exception.PortalException,
389                            com.liferay.portal.kernel.exception.SystemException {
390                    try {
391                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
392                                            "getOrganizationsGroups",
393                                            _getOrganizationsGroupsParameterTypes9);
394    
395                            MethodHandler methodHandler = new MethodHandler(methodKey,
396                                            organizations);
397    
398                            Object returnObj = null;
399    
400                            try {
401                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
402                            }
403                            catch (Exception e) {
404                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
405                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
406                                    }
407    
408                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
409                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
410                                    }
411    
412                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
413                            }
414    
415                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
416                    }
417                    catch (com.liferay.portal.kernel.exception.SystemException se) {
418                            _log.error(se, se);
419    
420                            throw se;
421                    }
422            }
423    
424            public static com.liferay.portal.model.Group getUserGroup(
425                    HttpPrincipal httpPrincipal, long companyId, long userId)
426                    throws com.liferay.portal.kernel.exception.PortalException,
427                            com.liferay.portal.kernel.exception.SystemException {
428                    try {
429                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
430                                            "getUserGroup", _getUserGroupParameterTypes10);
431    
432                            MethodHandler methodHandler = new MethodHandler(methodKey,
433                                            companyId, userId);
434    
435                            Object returnObj = null;
436    
437                            try {
438                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
439                            }
440                            catch (Exception e) {
441                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
442                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
443                                    }
444    
445                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
446                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
447                                    }
448    
449                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
450                            }
451    
452                            return (com.liferay.portal.model.Group)returnObj;
453                    }
454                    catch (com.liferay.portal.kernel.exception.SystemException se) {
455                            _log.error(se, se);
456    
457                            throw se;
458                    }
459            }
460    
461            public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
462                    HttpPrincipal httpPrincipal,
463                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
464                    throws com.liferay.portal.kernel.exception.PortalException,
465                            com.liferay.portal.kernel.exception.SystemException {
466                    try {
467                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
468                                            "getUserGroupsGroups", _getUserGroupsGroupsParameterTypes11);
469    
470                            MethodHandler methodHandler = new MethodHandler(methodKey,
471                                            userGroups);
472    
473                            Object returnObj = null;
474    
475                            try {
476                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
477                            }
478                            catch (Exception e) {
479                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
480                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
481                                    }
482    
483                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
484                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
485                                    }
486    
487                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
488                            }
489    
490                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
491                    }
492                    catch (com.liferay.portal.kernel.exception.SystemException se) {
493                            _log.error(se, se);
494    
495                            throw se;
496                    }
497            }
498    
499            public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
500                    HttpPrincipal httpPrincipal, long userId, int start, int end)
501                    throws com.liferay.portal.kernel.exception.PortalException,
502                            com.liferay.portal.kernel.exception.SystemException {
503                    try {
504                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
505                                            "getUserOrganizationsGroups",
506                                            _getUserOrganizationsGroupsParameterTypes12);
507    
508                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
509                                            start, end);
510    
511                            Object returnObj = null;
512    
513                            try {
514                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
515                            }
516                            catch (Exception e) {
517                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
518                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
519                                    }
520    
521                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
522                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
523                                    }
524    
525                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
526                            }
527    
528                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
529                    }
530                    catch (com.liferay.portal.kernel.exception.SystemException se) {
531                            _log.error(se, se);
532    
533                            throw se;
534                    }
535            }
536    
537            public static java.util.List<com.liferay.portal.model.Group> getUserPlaces(
538                    HttpPrincipal httpPrincipal, long userId,
539                    java.lang.String[] classNames, boolean includeControlPanel, int max)
540                    throws com.liferay.portal.kernel.exception.PortalException,
541                            com.liferay.portal.kernel.exception.SystemException {
542                    try {
543                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
544                                            "getUserPlaces", _getUserPlacesParameterTypes13);
545    
546                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
547                                            classNames, includeControlPanel, max);
548    
549                            Object returnObj = null;
550    
551                            try {
552                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
553                            }
554                            catch (Exception e) {
555                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
556                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
557                                    }
558    
559                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
560                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
561                                    }
562    
563                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
564                            }
565    
566                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
567                    }
568                    catch (com.liferay.portal.kernel.exception.SystemException se) {
569                            _log.error(se, se);
570    
571                            throw se;
572                    }
573            }
574    
575            public static java.util.List<com.liferay.portal.model.Group> getUserPlaces(
576                    HttpPrincipal httpPrincipal, long userId,
577                    java.lang.String[] classNames, int max)
578                    throws com.liferay.portal.kernel.exception.PortalException,
579                            com.liferay.portal.kernel.exception.SystemException {
580                    try {
581                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
582                                            "getUserPlaces", _getUserPlacesParameterTypes14);
583    
584                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
585                                            classNames, max);
586    
587                            Object returnObj = null;
588    
589                            try {
590                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
591                            }
592                            catch (Exception e) {
593                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
594                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
595                                    }
596    
597                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
598                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
599                                    }
600    
601                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
602                            }
603    
604                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
605                    }
606                    catch (com.liferay.portal.kernel.exception.SystemException se) {
607                            _log.error(se, se);
608    
609                            throw se;
610                    }
611            }
612    
613            public static java.util.List<com.liferay.portal.model.Group> getUserPlaces(
614                    HttpPrincipal httpPrincipal, long userId,
615                    java.lang.String[] classNames, java.lang.String name, boolean active,
616                    boolean includeControlPanel, int start, int end)
617                    throws com.liferay.portal.kernel.exception.PortalException,
618                            com.liferay.portal.kernel.exception.SystemException {
619                    try {
620                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
621                                            "getUserPlaces", _getUserPlacesParameterTypes15);
622    
623                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
624                                            classNames, name, active, includeControlPanel, start, end);
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 (java.util.List<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 java.util.List<com.liferay.portal.model.Group> getUserPlaces(
653                    HttpPrincipal httpPrincipal, java.lang.String[] classNames, int max)
654                    throws com.liferay.portal.kernel.exception.PortalException,
655                            com.liferay.portal.kernel.exception.SystemException {
656                    try {
657                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
658                                            "getUserPlaces", _getUserPlacesParameterTypes16);
659    
660                            MethodHandler methodHandler = new MethodHandler(methodKey,
661                                            classNames, max);
662    
663                            Object returnObj = null;
664    
665                            try {
666                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
667                            }
668                            catch (Exception e) {
669                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
670                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
671                                    }
672    
673                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
674                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
675                                    }
676    
677                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
678                            }
679    
680                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
681                    }
682                    catch (com.liferay.portal.kernel.exception.SystemException se) {
683                            _log.error(se, se);
684    
685                            throw se;
686                    }
687            }
688    
689            public static int getUserPlacesCount(HttpPrincipal httpPrincipal)
690                    throws com.liferay.portal.kernel.exception.PortalException,
691                            com.liferay.portal.kernel.exception.SystemException {
692                    try {
693                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
694                                            "getUserPlacesCount", _getUserPlacesCountParameterTypes17);
695    
696                            MethodHandler methodHandler = new MethodHandler(methodKey);
697    
698                            Object returnObj = null;
699    
700                            try {
701                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
702                            }
703                            catch (Exception e) {
704                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
705                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
706                                    }
707    
708                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
709                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
710                                    }
711    
712                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
713                            }
714    
715                            return ((Integer)returnObj).intValue();
716                    }
717                    catch (com.liferay.portal.kernel.exception.SystemException se) {
718                            _log.error(se, se);
719    
720                            throw se;
721                    }
722            }
723    
724            public static java.util.List<com.liferay.portal.model.Group> getUserSites(
725                    HttpPrincipal httpPrincipal)
726                    throws com.liferay.portal.kernel.exception.PortalException,
727                            com.liferay.portal.kernel.exception.SystemException {
728                    try {
729                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
730                                            "getUserSites", _getUserSitesParameterTypes18);
731    
732                            MethodHandler methodHandler = new MethodHandler(methodKey);
733    
734                            Object returnObj = null;
735    
736                            try {
737                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
738                            }
739                            catch (Exception e) {
740                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
741                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
742                                    }
743    
744                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
745                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
746                                    }
747    
748                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
749                            }
750    
751                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
752                    }
753                    catch (com.liferay.portal.kernel.exception.SystemException se) {
754                            _log.error(se, se);
755    
756                            throw se;
757                    }
758            }
759    
760            public static boolean hasUserGroup(HttpPrincipal httpPrincipal,
761                    long userId, long groupId)
762                    throws com.liferay.portal.kernel.exception.PortalException,
763                            com.liferay.portal.kernel.exception.SystemException {
764                    try {
765                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
766                                            "hasUserGroup", _hasUserGroupParameterTypes19);
767    
768                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
769                                            groupId);
770    
771                            Object returnObj = null;
772    
773                            try {
774                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
775                            }
776                            catch (Exception e) {
777                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
778                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
779                                    }
780    
781                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
782                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
783                                    }
784    
785                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
786                            }
787    
788                            return ((Boolean)returnObj).booleanValue();
789                    }
790                    catch (com.liferay.portal.kernel.exception.SystemException se) {
791                            _log.error(se, se);
792    
793                            throw se;
794                    }
795            }
796    
797            public static java.util.List<com.liferay.portal.model.Group> search(
798                    HttpPrincipal httpPrincipal, long companyId, java.lang.String name,
799                    java.lang.String description, java.lang.String[] params, int start,
800                    int end)
801                    throws com.liferay.portal.kernel.exception.PortalException,
802                            com.liferay.portal.kernel.exception.SystemException {
803                    try {
804                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
805                                            "search", _searchParameterTypes20);
806    
807                            MethodHandler methodHandler = new MethodHandler(methodKey,
808                                            companyId, name, description, params, start, end);
809    
810                            Object returnObj = null;
811    
812                            try {
813                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
814                            }
815                            catch (Exception e) {
816                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
817                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
818                                    }
819    
820                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
821                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
822                                    }
823    
824                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
825                            }
826    
827                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
828                    }
829                    catch (com.liferay.portal.kernel.exception.SystemException se) {
830                            _log.error(se, se);
831    
832                            throw se;
833                    }
834            }
835    
836            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
837                    java.lang.String name, java.lang.String description,
838                    java.lang.String[] params)
839                    throws com.liferay.portal.kernel.exception.SystemException {
840                    try {
841                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
842                                            "searchCount", _searchCountParameterTypes21);
843    
844                            MethodHandler methodHandler = new MethodHandler(methodKey,
845                                            companyId, name, description, params);
846    
847                            Object returnObj = null;
848    
849                            try {
850                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
851                            }
852                            catch (Exception e) {
853                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
854                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
855                                    }
856    
857                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
858                            }
859    
860                            return ((Integer)returnObj).intValue();
861                    }
862                    catch (com.liferay.portal.kernel.exception.SystemException se) {
863                            _log.error(se, se);
864    
865                            throw se;
866                    }
867            }
868    
869            public static void setRoleGroups(HttpPrincipal httpPrincipal, long roleId,
870                    long[] groupIds)
871                    throws com.liferay.portal.kernel.exception.PortalException,
872                            com.liferay.portal.kernel.exception.SystemException {
873                    try {
874                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
875                                            "setRoleGroups", _setRoleGroupsParameterTypes22);
876    
877                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
878                                            groupIds);
879    
880                            try {
881                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
882                            }
883                            catch (Exception e) {
884                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
885                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
886                                    }
887    
888                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
889                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
890                                    }
891    
892                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
893                            }
894                    }
895                    catch (com.liferay.portal.kernel.exception.SystemException se) {
896                            _log.error(se, se);
897    
898                            throw se;
899                    }
900            }
901    
902            public static void unsetRoleGroups(HttpPrincipal httpPrincipal,
903                    long roleId, long[] groupIds)
904                    throws com.liferay.portal.kernel.exception.PortalException,
905                            com.liferay.portal.kernel.exception.SystemException {
906                    try {
907                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
908                                            "unsetRoleGroups", _unsetRoleGroupsParameterTypes23);
909    
910                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
911                                            groupIds);
912    
913                            try {
914                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
915                            }
916                            catch (Exception e) {
917                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
918                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
919                                    }
920    
921                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
922                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
923                                    }
924    
925                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
926                            }
927                    }
928                    catch (com.liferay.portal.kernel.exception.SystemException se) {
929                            _log.error(se, se);
930    
931                            throw se;
932                    }
933            }
934    
935            public static com.liferay.portal.model.Group updateFriendlyURL(
936                    HttpPrincipal httpPrincipal, long groupId, java.lang.String friendlyURL)
937                    throws com.liferay.portal.kernel.exception.PortalException,
938                            com.liferay.portal.kernel.exception.SystemException {
939                    try {
940                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
941                                            "updateFriendlyURL", _updateFriendlyURLParameterTypes24);
942    
943                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
944                                            friendlyURL);
945    
946                            Object returnObj = null;
947    
948                            try {
949                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
950                            }
951                            catch (Exception e) {
952                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
953                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
954                                    }
955    
956                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
957                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
958                                    }
959    
960                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
961                            }
962    
963                            return (com.liferay.portal.model.Group)returnObj;
964                    }
965                    catch (com.liferay.portal.kernel.exception.SystemException se) {
966                            _log.error(se, se);
967    
968                            throw se;
969                    }
970            }
971    
972            public static com.liferay.portal.model.Group updateGroup(
973                    HttpPrincipal httpPrincipal, long groupId, long parentGroupId,
974                    java.lang.String name, java.lang.String description, int type,
975                    java.lang.String friendlyURL, boolean active,
976                    com.liferay.portal.service.ServiceContext serviceContext)
977                    throws com.liferay.portal.kernel.exception.PortalException,
978                            com.liferay.portal.kernel.exception.SystemException {
979                    try {
980                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
981                                            "updateGroup", _updateGroupParameterTypes25);
982    
983                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
984                                            parentGroupId, name, description, type, friendlyURL,
985                                            active, serviceContext);
986    
987                            Object returnObj = null;
988    
989                            try {
990                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
991                            }
992                            catch (Exception e) {
993                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
994                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
995                                    }
996    
997                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
998                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
999                                    }
1000    
1001                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1002                            }
1003    
1004                            return (com.liferay.portal.model.Group)returnObj;
1005                    }
1006                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1007                            _log.error(se, se);
1008    
1009                            throw se;
1010                    }
1011            }
1012    
1013            public static com.liferay.portal.model.Group updateGroup(
1014                    HttpPrincipal httpPrincipal, long groupId, java.lang.String typeSettings)
1015                    throws com.liferay.portal.kernel.exception.PortalException,
1016                            com.liferay.portal.kernel.exception.SystemException {
1017                    try {
1018                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class,
1019                                            "updateGroup", _updateGroupParameterTypes26);
1020    
1021                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1022                                            typeSettings);
1023    
1024                            Object returnObj = null;
1025    
1026                            try {
1027                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1028                            }
1029                            catch (Exception e) {
1030                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1031                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1032                                    }
1033    
1034                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1035                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1036                                    }
1037    
1038                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1039                            }
1040    
1041                            return (com.liferay.portal.model.Group)returnObj;
1042                    }
1043                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1044                            _log.error(se, se);
1045    
1046                            throw se;
1047                    }
1048            }
1049    
1050            private static Log _log = LogFactoryUtil.getLog(GroupServiceHttp.class);
1051            private static final Class<?>[] _addGroupParameterTypes0 = new Class[] {
1052                            long.class, long.class, java.lang.String.class,
1053                            java.lang.String.class, int.class, java.lang.String.class,
1054                            boolean.class, boolean.class,
1055                            com.liferay.portal.service.ServiceContext.class
1056                    };
1057            private static final Class<?>[] _addGroupParameterTypes1 = new Class[] {
1058                            long.class, java.lang.String.class, java.lang.String.class,
1059                            int.class, java.lang.String.class, boolean.class, boolean.class,
1060                            com.liferay.portal.service.ServiceContext.class
1061                    };
1062            private static final Class<?>[] _addGroupParameterTypes2 = new Class[] {
1063                            java.lang.String.class, java.lang.String.class, int.class,
1064                            java.lang.String.class, boolean.class, boolean.class,
1065                            com.liferay.portal.service.ServiceContext.class
1066                    };
1067            private static final Class<?>[] _addRoleGroupsParameterTypes3 = new Class[] {
1068                            long.class, long[].class
1069                    };
1070            private static final Class<?>[] _checkRemoteStagingGroupParameterTypes4 = new Class[] {
1071                            long.class
1072                    };
1073            private static final Class<?>[] _deleteGroupParameterTypes5 = new Class[] {
1074                            long.class
1075                    };
1076            private static final Class<?>[] _getGroupParameterTypes6 = new Class[] {
1077                            long.class
1078                    };
1079            private static final Class<?>[] _getGroupParameterTypes7 = new Class[] {
1080                            long.class, java.lang.String.class
1081                    };
1082            private static final Class<?>[] _getManageableSitesParameterTypes8 = new Class[] {
1083                            java.util.Collection.class, int.class
1084                    };
1085            private static final Class<?>[] _getOrganizationsGroupsParameterTypes9 = new Class[] {
1086                            java.util.List.class
1087                    };
1088            private static final Class<?>[] _getUserGroupParameterTypes10 = new Class[] {
1089                            long.class, long.class
1090                    };
1091            private static final Class<?>[] _getUserGroupsGroupsParameterTypes11 = new Class[] {
1092                            java.util.List.class
1093                    };
1094            private static final Class<?>[] _getUserOrganizationsGroupsParameterTypes12 = new Class[] {
1095                            long.class, int.class, int.class
1096                    };
1097            private static final Class<?>[] _getUserPlacesParameterTypes13 = new Class[] {
1098                            long.class, java.lang.String[].class, boolean.class, int.class
1099                    };
1100            private static final Class<?>[] _getUserPlacesParameterTypes14 = new Class[] {
1101                            long.class, java.lang.String[].class, int.class
1102                    };
1103            private static final Class<?>[] _getUserPlacesParameterTypes15 = new Class[] {
1104                            long.class, java.lang.String[].class, java.lang.String.class,
1105                            boolean.class, boolean.class, int.class, int.class
1106                    };
1107            private static final Class<?>[] _getUserPlacesParameterTypes16 = new Class[] {
1108                            java.lang.String[].class, int.class
1109                    };
1110            private static final Class<?>[] _getUserPlacesCountParameterTypes17 = new Class[] {
1111                            
1112                    };
1113            private static final Class<?>[] _getUserSitesParameterTypes18 = new Class[] {  };
1114            private static final Class<?>[] _hasUserGroupParameterTypes19 = new Class[] {
1115                            long.class, long.class
1116                    };
1117            private static final Class<?>[] _searchParameterTypes20 = new Class[] {
1118                            long.class, java.lang.String.class, java.lang.String.class,
1119                            java.lang.String[].class, int.class, int.class
1120                    };
1121            private static final Class<?>[] _searchCountParameterTypes21 = new Class[] {
1122                            long.class, java.lang.String.class, java.lang.String.class,
1123                            java.lang.String[].class
1124                    };
1125            private static final Class<?>[] _setRoleGroupsParameterTypes22 = new Class[] {
1126                            long.class, long[].class
1127                    };
1128            private static final Class<?>[] _unsetRoleGroupsParameterTypes23 = new Class[] {
1129                            long.class, long[].class
1130                    };
1131            private static final Class<?>[] _updateFriendlyURLParameterTypes24 = new Class[] {
1132                            long.class, java.lang.String.class
1133                    };
1134            private static final Class<?>[] _updateGroupParameterTypes25 = new Class[] {
1135                            long.class, long.class, java.lang.String.class,
1136                            java.lang.String.class, int.class, java.lang.String.class,
1137                            boolean.class, com.liferay.portal.service.ServiceContext.class
1138                    };
1139            private static final Class<?>[] _updateGroupParameterTypes26 = new Class[] {
1140                            long.class, java.lang.String.class
1141                    };
1142    }