001    /**
002     * Copyright (c) 2000-2011 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, long liveGroupId, java.lang.String name,
057                    java.lang.String description, int type, java.lang.String friendlyURL,
058                    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.getName(),
064                                            "addGroup", _addGroupParameterTypes0);
065    
066                            MethodHandler methodHandler = new MethodHandler(methodKey,
067                                            liveGroupId, name, description, type, friendlyURL, site,
068                                            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, 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.getName(),
105                                            "addGroup", _addGroupParameterTypes1);
106    
107                            MethodHandler methodHandler = new MethodHandler(methodKey, name,
108                                            description, type, friendlyURL, site, active, serviceContext);
109    
110                            Object returnObj = null;
111    
112                            try {
113                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
114                            }
115                            catch (Exception e) {
116                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
117                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
118                                    }
119    
120                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
121                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
122                                    }
123    
124                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
125                            }
126    
127                            return (com.liferay.portal.model.Group)returnObj;
128                    }
129                    catch (com.liferay.portal.kernel.exception.SystemException se) {
130                            _log.error(se, se);
131    
132                            throw se;
133                    }
134            }
135    
136            public static void addRoleGroups(HttpPrincipal httpPrincipal, long roleId,
137                    long[] groupIds)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    try {
141                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
142                                            "addRoleGroups", _addRoleGroupsParameterTypes2);
143    
144                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
145                                            groupIds);
146    
147                            try {
148                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
149                            }
150                            catch (Exception e) {
151                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
152                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
153                                    }
154    
155                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
156                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
157                                    }
158    
159                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
160                            }
161                    }
162                    catch (com.liferay.portal.kernel.exception.SystemException se) {
163                            _log.error(se, se);
164    
165                            throw se;
166                    }
167            }
168    
169            public static void deleteGroup(HttpPrincipal httpPrincipal, long groupId)
170                    throws com.liferay.portal.kernel.exception.PortalException,
171                            com.liferay.portal.kernel.exception.SystemException {
172                    try {
173                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
174                                            "deleteGroup", _deleteGroupParameterTypes3);
175    
176                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
177    
178                            try {
179                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
180                            }
181                            catch (Exception e) {
182                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
183                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
184                                    }
185    
186                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
187                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
188                                    }
189    
190                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
191                            }
192                    }
193                    catch (com.liferay.portal.kernel.exception.SystemException se) {
194                            _log.error(se, se);
195    
196                            throw se;
197                    }
198            }
199    
200            public static com.liferay.portal.model.Group getGroup(
201                    HttpPrincipal httpPrincipal, long groupId)
202                    throws com.liferay.portal.kernel.exception.PortalException,
203                            com.liferay.portal.kernel.exception.SystemException {
204                    try {
205                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
206                                            "getGroup", _getGroupParameterTypes4);
207    
208                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
209    
210                            Object returnObj = null;
211    
212                            try {
213                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
214                            }
215                            catch (Exception e) {
216                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
217                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
218                                    }
219    
220                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
221                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
222                                    }
223    
224                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
225                            }
226    
227                            return (com.liferay.portal.model.Group)returnObj;
228                    }
229                    catch (com.liferay.portal.kernel.exception.SystemException se) {
230                            _log.error(se, se);
231    
232                            throw se;
233                    }
234            }
235    
236            public static com.liferay.portal.model.Group getGroup(
237                    HttpPrincipal httpPrincipal, long companyId, java.lang.String name)
238                    throws com.liferay.portal.kernel.exception.PortalException,
239                            com.liferay.portal.kernel.exception.SystemException {
240                    try {
241                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
242                                            "getGroup", _getGroupParameterTypes5);
243    
244                            MethodHandler methodHandler = new MethodHandler(methodKey,
245                                            companyId, name);
246    
247                            Object returnObj = null;
248    
249                            try {
250                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
251                            }
252                            catch (Exception e) {
253                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
254                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
255                                    }
256    
257                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
258                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
259                                    }
260    
261                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
262                            }
263    
264                            return (com.liferay.portal.model.Group)returnObj;
265                    }
266                    catch (com.liferay.portal.kernel.exception.SystemException se) {
267                            _log.error(se, se);
268    
269                            throw se;
270                    }
271            }
272    
273            public static java.util.List<com.liferay.portal.model.Group> getManageableSites(
274                    HttpPrincipal httpPrincipal,
275                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
276                    throws com.liferay.portal.kernel.exception.PortalException,
277                            com.liferay.portal.kernel.exception.SystemException {
278                    try {
279                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
280                                            "getManageableSites", _getManageableSitesParameterTypes6);
281    
282                            MethodHandler methodHandler = new MethodHandler(methodKey,
283                                            portlets, max);
284    
285                            Object returnObj = null;
286    
287                            try {
288                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
289                            }
290                            catch (Exception e) {
291                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
292                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
293                                    }
294    
295                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
296                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
297                                    }
298    
299                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
300                            }
301    
302                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
303                    }
304                    catch (com.liferay.portal.kernel.exception.SystemException se) {
305                            _log.error(se, se);
306    
307                            throw se;
308                    }
309            }
310    
311            public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
312                    HttpPrincipal httpPrincipal,
313                    java.util.List<com.liferay.portal.model.Organization> organizations)
314                    throws com.liferay.portal.kernel.exception.PortalException,
315                            com.liferay.portal.kernel.exception.SystemException {
316                    try {
317                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
318                                            "getOrganizationsGroups",
319                                            _getOrganizationsGroupsParameterTypes7);
320    
321                            MethodHandler methodHandler = new MethodHandler(methodKey,
322                                            organizations);
323    
324                            Object returnObj = null;
325    
326                            try {
327                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
328                            }
329                            catch (Exception e) {
330                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
331                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
332                                    }
333    
334                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
335                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
336                                    }
337    
338                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
339                            }
340    
341                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
342                    }
343                    catch (com.liferay.portal.kernel.exception.SystemException se) {
344                            _log.error(se, se);
345    
346                            throw se;
347                    }
348            }
349    
350            public static com.liferay.portal.model.Group getUserGroup(
351                    HttpPrincipal httpPrincipal, long companyId, long userId)
352                    throws com.liferay.portal.kernel.exception.PortalException,
353                            com.liferay.portal.kernel.exception.SystemException {
354                    try {
355                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
356                                            "getUserGroup", _getUserGroupParameterTypes8);
357    
358                            MethodHandler methodHandler = new MethodHandler(methodKey,
359                                            companyId, userId);
360    
361                            Object returnObj = null;
362    
363                            try {
364                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
365                            }
366                            catch (Exception e) {
367                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
368                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
369                                    }
370    
371                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
372                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
373                                    }
374    
375                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
376                            }
377    
378                            return (com.liferay.portal.model.Group)returnObj;
379                    }
380                    catch (com.liferay.portal.kernel.exception.SystemException se) {
381                            _log.error(se, se);
382    
383                            throw se;
384                    }
385            }
386    
387            public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
388                    HttpPrincipal httpPrincipal,
389                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
390                    throws com.liferay.portal.kernel.exception.PortalException,
391                            com.liferay.portal.kernel.exception.SystemException {
392                    try {
393                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
394                                            "getUserGroupsGroups", _getUserGroupsGroupsParameterTypes9);
395    
396                            MethodHandler methodHandler = new MethodHandler(methodKey,
397                                            userGroups);
398    
399                            Object returnObj = null;
400    
401                            try {
402                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
403                            }
404                            catch (Exception e) {
405                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
406                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
407                                    }
408    
409                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
410                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
411                                    }
412    
413                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
414                            }
415    
416                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
417                    }
418                    catch (com.liferay.portal.kernel.exception.SystemException se) {
419                            _log.error(se, se);
420    
421                            throw se;
422                    }
423            }
424    
425            public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
426                    HttpPrincipal httpPrincipal, long userId, int start, int end)
427                    throws com.liferay.portal.kernel.exception.PortalException,
428                            com.liferay.portal.kernel.exception.SystemException {
429                    try {
430                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
431                                            "getUserOrganizationsGroups",
432                                            _getUserOrganizationsGroupsParameterTypes10);
433    
434                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
435                                            start, end);
436    
437                            Object returnObj = null;
438    
439                            try {
440                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
441                            }
442                            catch (Exception e) {
443                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
444                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
445                                    }
446    
447                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
448                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
449                                    }
450    
451                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
452                            }
453    
454                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
455                    }
456                    catch (com.liferay.portal.kernel.exception.SystemException se) {
457                            _log.error(se, se);
458    
459                            throw se;
460                    }
461            }
462    
463            public static java.util.List<com.liferay.portal.model.Group> getUserSites(
464                    HttpPrincipal httpPrincipal)
465                    throws com.liferay.portal.kernel.exception.PortalException,
466                            com.liferay.portal.kernel.exception.SystemException {
467                    try {
468                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
469                                            "getUserSites", _getUserSitesParameterTypes11);
470    
471                            MethodHandler methodHandler = new MethodHandler(methodKey);
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> getUserPlaces(
500                    HttpPrincipal httpPrincipal, java.lang.String[] classNames, int max)
501                    throws com.liferay.portal.kernel.exception.PortalException,
502                            com.liferay.portal.kernel.exception.SystemException {
503                    try {
504                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
505                                            "getUserPlaces", _getUserPlacesParameterTypes12);
506    
507                            MethodHandler methodHandler = new MethodHandler(methodKey,
508                                            classNames, max);
509    
510                            Object returnObj = null;
511    
512                            try {
513                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
514                            }
515                            catch (Exception e) {
516                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
517                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
518                                    }
519    
520                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
521                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
522                                    }
523    
524                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
525                            }
526    
527                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
528                    }
529                    catch (com.liferay.portal.kernel.exception.SystemException se) {
530                            _log.error(se, se);
531    
532                            throw se;
533                    }
534            }
535    
536            public static java.util.List<com.liferay.portal.model.Group> getUserPlaces(
537                    HttpPrincipal httpPrincipal, long userId,
538                    java.lang.String[] classNames, int max)
539                    throws com.liferay.portal.kernel.exception.PortalException,
540                            com.liferay.portal.kernel.exception.SystemException {
541                    try {
542                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
543                                            "getUserPlaces", _getUserPlacesParameterTypes13);
544    
545                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
546                                            classNames, max);
547    
548                            Object returnObj = null;
549    
550                            try {
551                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
552                            }
553                            catch (Exception e) {
554                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
555                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
556                                    }
557    
558                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
559                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
560                                    }
561    
562                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
563                            }
564    
565                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
566                    }
567                    catch (com.liferay.portal.kernel.exception.SystemException se) {
568                            _log.error(se, se);
569    
570                            throw se;
571                    }
572            }
573    
574            public static boolean hasUserGroup(HttpPrincipal httpPrincipal,
575                    long userId, long groupId)
576                    throws com.liferay.portal.kernel.exception.SystemException {
577                    try {
578                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
579                                            "hasUserGroup", _hasUserGroupParameterTypes14);
580    
581                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
582                                            groupId);
583    
584                            Object returnObj = null;
585    
586                            try {
587                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
588                            }
589                            catch (Exception e) {
590                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
591                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
592                                    }
593    
594                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
595                            }
596    
597                            return ((Boolean)returnObj).booleanValue();
598                    }
599                    catch (com.liferay.portal.kernel.exception.SystemException se) {
600                            _log.error(se, se);
601    
602                            throw se;
603                    }
604            }
605    
606            public static java.util.List<com.liferay.portal.model.Group> search(
607                    HttpPrincipal httpPrincipal, long companyId, java.lang.String name,
608                    java.lang.String description, java.lang.String[] params, int start,
609                    int end)
610                    throws com.liferay.portal.kernel.exception.PortalException,
611                            com.liferay.portal.kernel.exception.SystemException {
612                    try {
613                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
614                                            "search", _searchParameterTypes15);
615    
616                            MethodHandler methodHandler = new MethodHandler(methodKey,
617                                            companyId, name, description, params, start, end);
618    
619                            Object returnObj = null;
620    
621                            try {
622                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
623                            }
624                            catch (Exception e) {
625                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
626                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
627                                    }
628    
629                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
630                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
631                                    }
632    
633                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
634                            }
635    
636                            return (java.util.List<com.liferay.portal.model.Group>)returnObj;
637                    }
638                    catch (com.liferay.portal.kernel.exception.SystemException se) {
639                            _log.error(se, se);
640    
641                            throw se;
642                    }
643            }
644    
645            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
646                    java.lang.String name, java.lang.String description,
647                    java.lang.String[] params)
648                    throws com.liferay.portal.kernel.exception.SystemException {
649                    try {
650                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
651                                            "searchCount", _searchCountParameterTypes16);
652    
653                            MethodHandler methodHandler = new MethodHandler(methodKey,
654                                            companyId, name, description, params);
655    
656                            Object returnObj = null;
657    
658                            try {
659                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
660                            }
661                            catch (Exception e) {
662                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
663                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
664                                    }
665    
666                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
667                            }
668    
669                            return ((Integer)returnObj).intValue();
670                    }
671                    catch (com.liferay.portal.kernel.exception.SystemException se) {
672                            _log.error(se, se);
673    
674                            throw se;
675                    }
676            }
677    
678            public static void setRoleGroups(HttpPrincipal httpPrincipal, long roleId,
679                    long[] groupIds)
680                    throws com.liferay.portal.kernel.exception.PortalException,
681                            com.liferay.portal.kernel.exception.SystemException {
682                    try {
683                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
684                                            "setRoleGroups", _setRoleGroupsParameterTypes17);
685    
686                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
687                                            groupIds);
688    
689                            try {
690                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
691                            }
692                            catch (Exception e) {
693                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
694                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
695                                    }
696    
697                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
698                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
699                                    }
700    
701                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
702                            }
703                    }
704                    catch (com.liferay.portal.kernel.exception.SystemException se) {
705                            _log.error(se, se);
706    
707                            throw se;
708                    }
709            }
710    
711            public static void unsetRoleGroups(HttpPrincipal httpPrincipal,
712                    long roleId, long[] groupIds)
713                    throws com.liferay.portal.kernel.exception.PortalException,
714                            com.liferay.portal.kernel.exception.SystemException {
715                    try {
716                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
717                                            "unsetRoleGroups", _unsetRoleGroupsParameterTypes18);
718    
719                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
720                                            groupIds);
721    
722                            try {
723                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
724                            }
725                            catch (Exception e) {
726                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
727                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
728                                    }
729    
730                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
731                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
732                                    }
733    
734                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
735                            }
736                    }
737                    catch (com.liferay.portal.kernel.exception.SystemException se) {
738                            _log.error(se, se);
739    
740                            throw se;
741                    }
742            }
743    
744            public static com.liferay.portal.model.Group updateFriendlyURL(
745                    HttpPrincipal httpPrincipal, long groupId, java.lang.String friendlyURL)
746                    throws com.liferay.portal.kernel.exception.PortalException,
747                            com.liferay.portal.kernel.exception.SystemException {
748                    try {
749                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
750                                            "updateFriendlyURL", _updateFriendlyURLParameterTypes19);
751    
752                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
753                                            friendlyURL);
754    
755                            Object returnObj = null;
756    
757                            try {
758                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
759                            }
760                            catch (Exception e) {
761                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
762                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
763                                    }
764    
765                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
766                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
767                                    }
768    
769                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
770                            }
771    
772                            return (com.liferay.portal.model.Group)returnObj;
773                    }
774                    catch (com.liferay.portal.kernel.exception.SystemException se) {
775                            _log.error(se, se);
776    
777                            throw se;
778                    }
779            }
780    
781            public static com.liferay.portal.model.Group updateGroup(
782                    HttpPrincipal httpPrincipal, long groupId, java.lang.String typeSettings)
783                    throws com.liferay.portal.kernel.exception.PortalException,
784                            com.liferay.portal.kernel.exception.SystemException {
785                    try {
786                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
787                                            "updateGroup", _updateGroupParameterTypes20);
788    
789                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
790                                            typeSettings);
791    
792                            Object returnObj = null;
793    
794                            try {
795                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
796                            }
797                            catch (Exception e) {
798                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
799                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
800                                    }
801    
802                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
803                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
804                                    }
805    
806                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
807                            }
808    
809                            return (com.liferay.portal.model.Group)returnObj;
810                    }
811                    catch (com.liferay.portal.kernel.exception.SystemException se) {
812                            _log.error(se, se);
813    
814                            throw se;
815                    }
816            }
817    
818            public static com.liferay.portal.model.Group updateGroup(
819                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
820                    java.lang.String description, int type, java.lang.String friendlyURL,
821                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
822                    throws com.liferay.portal.kernel.exception.PortalException,
823                            com.liferay.portal.kernel.exception.SystemException {
824                    try {
825                            MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
826                                            "updateGroup", _updateGroupParameterTypes21);
827    
828                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
829                                            name, description, type, friendlyURL, active, serviceContext);
830    
831                            Object returnObj = null;
832    
833                            try {
834                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
835                            }
836                            catch (Exception e) {
837                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
838                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
839                                    }
840    
841                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
842                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
843                                    }
844    
845                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
846                            }
847    
848                            return (com.liferay.portal.model.Group)returnObj;
849                    }
850                    catch (com.liferay.portal.kernel.exception.SystemException se) {
851                            _log.error(se, se);
852    
853                            throw se;
854                    }
855            }
856    
857            private static Log _log = LogFactoryUtil.getLog(GroupServiceHttp.class);
858            private static final Class<?>[] _addGroupParameterTypes0 = new Class[] {
859                            long.class, java.lang.String.class, java.lang.String.class,
860                            int.class, java.lang.String.class, boolean.class, boolean.class,
861                            com.liferay.portal.service.ServiceContext.class
862                    };
863            private static final Class<?>[] _addGroupParameterTypes1 = new Class[] {
864                            java.lang.String.class, java.lang.String.class, int.class,
865                            java.lang.String.class, boolean.class, boolean.class,
866                            com.liferay.portal.service.ServiceContext.class
867                    };
868            private static final Class<?>[] _addRoleGroupsParameterTypes2 = new Class[] {
869                            long.class, long[].class
870                    };
871            private static final Class<?>[] _deleteGroupParameterTypes3 = new Class[] {
872                            long.class
873                    };
874            private static final Class<?>[] _getGroupParameterTypes4 = new Class[] {
875                            long.class
876                    };
877            private static final Class<?>[] _getGroupParameterTypes5 = new Class[] {
878                            long.class, java.lang.String.class
879                    };
880            private static final Class<?>[] _getManageableSitesParameterTypes6 = new Class[] {
881                            java.util.Collection.class, int.class
882                    };
883            private static final Class<?>[] _getOrganizationsGroupsParameterTypes7 = new Class[] {
884                            java.util.List.class
885                    };
886            private static final Class<?>[] _getUserGroupParameterTypes8 = new Class[] {
887                            long.class, long.class
888                    };
889            private static final Class<?>[] _getUserGroupsGroupsParameterTypes9 = new Class[] {
890                            java.util.List.class
891                    };
892            private static final Class<?>[] _getUserOrganizationsGroupsParameterTypes10 = new Class[] {
893                            long.class, int.class, int.class
894                    };
895            private static final Class<?>[] _getUserSitesParameterTypes11 = new Class[] {  };
896            private static final Class<?>[] _getUserPlacesParameterTypes12 = new Class[] {
897                            java.lang.String[].class, int.class
898                    };
899            private static final Class<?>[] _getUserPlacesParameterTypes13 = new Class[] {
900                            long.class, java.lang.String[].class, int.class
901                    };
902            private static final Class<?>[] _hasUserGroupParameterTypes14 = new Class[] {
903                            long.class, long.class
904                    };
905            private static final Class<?>[] _searchParameterTypes15 = new Class[] {
906                            long.class, java.lang.String.class, java.lang.String.class,
907                            java.lang.String[].class, int.class, int.class
908                    };
909            private static final Class<?>[] _searchCountParameterTypes16 = new Class[] {
910                            long.class, java.lang.String.class, java.lang.String.class,
911                            java.lang.String[].class
912                    };
913            private static final Class<?>[] _setRoleGroupsParameterTypes17 = new Class[] {
914                            long.class, long[].class
915                    };
916            private static final Class<?>[] _unsetRoleGroupsParameterTypes18 = new Class[] {
917                            long.class, long[].class
918                    };
919            private static final Class<?>[] _updateFriendlyURLParameterTypes19 = new Class[] {
920                            long.class, java.lang.String.class
921                    };
922            private static final Class<?>[] _updateGroupParameterTypes20 = new Class[] {
923                            long.class, java.lang.String.class
924                    };
925            private static final Class<?>[] _updateGroupParameterTypes21 = new Class[] {
926                            long.class, java.lang.String.class, java.lang.String.class,
927                            int.class, java.lang.String.class, boolean.class,
928                            com.liferay.portal.service.ServiceContext.class
929                    };
930    }