001    /**
002     * Copyright (c) 2000-2012 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.service.GroupServiceUtil;
020    
021    import java.rmi.RemoteException;
022    
023    /**
024     * <p>
025     * This class provides a SOAP utility for the
026     * {@link com.liferay.portal.service.GroupServiceUtil} service utility. The
027     * static methods of this class calls the same methods of the service utility.
028     * However, the signatures are different because it is difficult for SOAP to
029     * support certain types.
030     * </p>
031     *
032     * <p>
033     * ServiceBuilder follows certain rules in translating the methods. For example,
034     * if the method in the service utility returns a {@link java.util.List}, that
035     * is translated to an array of {@link com.liferay.portal.model.GroupSoap}.
036     * If the method in the service utility returns a
037     * {@link com.liferay.portal.model.Group}, that is translated to a
038     * {@link com.liferay.portal.model.GroupSoap}. Methods that SOAP cannot
039     * safely wire are skipped.
040     * </p>
041     *
042     * <p>
043     * The benefits of using the SOAP utility is that it is cross platform
044     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
045     * even Perl, to call the generated services. One drawback of SOAP is that it is
046     * slow because it needs to serialize all calls into a text format (XML).
047     * </p>
048     *
049     * <p>
050     * You can see a list of services at http://localhost:8080/api/axis. Set the
051     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
052     * security.
053     * </p>
054     *
055     * <p>
056     * The SOAP utility is only generated for remote services.
057     * </p>
058     *
059     * @author    Brian Wing Shun Chan
060     * @see       GroupServiceHttp
061     * @see       com.liferay.portal.model.GroupSoap
062     * @see       com.liferay.portal.service.GroupServiceUtil
063     * @generated
064     */
065    public class GroupServiceSoap {
066            /**
067            * Adds a group.
068            *
069            * @param parentGroupId the primary key of the parent group
070            * @param liveGroupId the primary key of the live group
071            * @param name the entity's name
072            * @param description the group's description (optionally
073            <code>null</code>)
074            * @param type the group's type. For more information see {@link
075            com.liferay.portal.model.GroupConstants}
076            * @param friendlyURL the group's friendlyURL (optionally
077            <code>null</code>)
078            * @param site whether the group is to be associated with a main site
079            * @param active whether the group is active
080            * @param serviceContext the service context to be applied (optionally
081            <code>null</code>). Can set the asset category IDs and asset tag
082            names for the group, and can set whether the group is for staging
083            * @return the group
084            * @throws PortalException if the user did not have permission to add the
085            group, if a creator could not be found, if the group's
086            information was invalid, if a layout could not be found, or if a
087            valid friendly URL could not be created for the group
088            * @throws SystemException if a system exception occurred
089            */
090            public static com.liferay.portal.model.GroupSoap addGroup(
091                    long parentGroupId, long liveGroupId, java.lang.String name,
092                    java.lang.String description, int type, java.lang.String friendlyURL,
093                    boolean site, boolean active,
094                    com.liferay.portal.service.ServiceContext serviceContext)
095                    throws RemoteException {
096                    try {
097                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId,
098                                            liveGroupId, name, description, type, friendlyURL, site,
099                                            active, serviceContext);
100    
101                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
102                    }
103                    catch (Exception e) {
104                            _log.error(e, e);
105    
106                            throw new RemoteException(e.getMessage());
107                    }
108            }
109    
110            /**
111            * Adds the group using the group default live group ID.
112            *
113            * @param parentGroupId the primary key of the parent group
114            * @param name the entity's name
115            * @param description the group's description (optionally
116            <code>null</code>)
117            * @param type the group's type. For more information see {@link
118            com.liferay.portal.model.GroupConstants}
119            * @param friendlyURL the group's friendlyURL
120            * @param site whether the group is to be associated with a main site
121            * @param active whether the group is active
122            * @param serviceContext the service context to be applied (optionally
123            <code>null</code>). Can set asset category IDs and asset tag
124            names for the group, and can set whether the group is for
125            staging
126            * @return the group
127            * @throws PortalException if the user did not have permission to add
128            the group, if a creator could not be found, if the group's
129            information was invalid, if a layout could not be found, or
130            if a valid friendly URL could not be created for the group
131            * @throws SystemException if a system exception occurred
132            * @deprecated {@link #addGroup(long, long, String, String, int, String,
133            boolean, boolean, ServiceContext)}
134            */
135            public static com.liferay.portal.model.GroupSoap addGroup(
136                    long parentGroupId, java.lang.String name,
137                    java.lang.String description, int type, java.lang.String friendlyURL,
138                    boolean site, boolean active,
139                    com.liferay.portal.service.ServiceContext serviceContext)
140                    throws RemoteException {
141                    try {
142                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId,
143                                            name, description, type, friendlyURL, site, active,
144                                            serviceContext);
145    
146                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
147                    }
148                    catch (Exception e) {
149                            _log.error(e, e);
150    
151                            throw new RemoteException(e.getMessage());
152                    }
153            }
154    
155            /**
156            * @deprecated {@link #addGroup(long, String, String, int, String, boolean,
157            boolean, ServiceContext)}
158            */
159            public static com.liferay.portal.model.GroupSoap addGroup(
160                    java.lang.String name, java.lang.String description, int type,
161                    java.lang.String friendlyURL, boolean site, boolean active,
162                    com.liferay.portal.service.ServiceContext serviceContext)
163                    throws RemoteException {
164                    try {
165                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(name,
166                                            description, type, friendlyURL, site, active, serviceContext);
167    
168                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
169                    }
170                    catch (Exception e) {
171                            _log.error(e, e);
172    
173                            throw new RemoteException(e.getMessage());
174                    }
175            }
176    
177            /**
178            * Adds the groups to the role.
179            *
180            * @param roleId the primary key of the role
181            * @param groupIds the primary keys of the groups
182            * @throws PortalException if the user did not have permission to update the
183            role
184            * @throws SystemException if a system exception occurred
185            */
186            public static void addRoleGroups(long roleId, long[] groupIds)
187                    throws RemoteException {
188                    try {
189                            GroupServiceUtil.addRoleGroups(roleId, groupIds);
190                    }
191                    catch (Exception e) {
192                            _log.error(e, e);
193    
194                            throw new RemoteException(e.getMessage());
195                    }
196            }
197    
198            /**
199            * Deletes the group.
200            *
201            * <p>
202            * The group is unstaged and its assets and resources including layouts,
203            * membership requests, subscriptions, teams, blogs, bookmarks, calendar
204            * events, image gallery, journals, message boards, polls, shopping related
205            * entities, software catalog, and wikis are also deleted.
206            * </p>
207            *
208            * @param groupId the primary key of the group
209            * @throws PortalException if the user did not have permission to delete the
210            group or its assets or resources, if a group with the primary key
211            could not be found, or if the group was a system group
212            * @throws SystemException if a system exception occurred
213            */
214            public static void deleteGroup(long groupId) throws RemoteException {
215                    try {
216                            GroupServiceUtil.deleteGroup(groupId);
217                    }
218                    catch (Exception e) {
219                            _log.error(e, e);
220    
221                            throw new RemoteException(e.getMessage());
222                    }
223            }
224    
225            /**
226            * Returns the group with the primary key.
227            *
228            * @param groupId the primary key of the group
229            * @return the group with the primary key
230            * @throws PortalException if a group with the primary key could not be
231            found or if the current user did not have permission to view the
232            group
233            * @throws SystemException if a system exception occurred
234            */
235            public static com.liferay.portal.model.GroupSoap getGroup(long groupId)
236                    throws RemoteException {
237                    try {
238                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(groupId);
239    
240                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
241                    }
242                    catch (Exception e) {
243                            _log.error(e, e);
244    
245                            throw new RemoteException(e.getMessage());
246                    }
247            }
248    
249            /**
250            * Returns the group with the name.
251            *
252            * @param companyId the primary key of the company
253            * @param name the group's name
254            * @return the group with the name
255            * @throws PortalException if a matching group could not be found or if the
256            current user did not have permission to view the group
257            * @throws SystemException if a system exception occurred
258            */
259            public static com.liferay.portal.model.GroupSoap getGroup(long companyId,
260                    java.lang.String name) throws RemoteException {
261                    try {
262                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId,
263                                            name);
264    
265                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
266                    }
267                    catch (Exception e) {
268                            _log.error(e, e);
269    
270                            throw new RemoteException(e.getMessage());
271                    }
272            }
273    
274            /**
275            * Returns a range of all the site groups for which the user has control
276            * panel access.
277            *
278            * @param portlets the portlets to manage
279            * @param max the upper bound of the range of groups to consider (not
280            inclusive)
281            * @return the range of site groups for which the user has control panel
282            access
283            * @throws PortalException if a portal exception occurred
284            * @throws SystemException if a system exception occurred
285            */
286            public static com.liferay.portal.model.GroupSoap[] getManageableSites(
287                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
288                    throws RemoteException {
289                    try {
290                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableSites(portlets,
291                                            max);
292    
293                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
294                    }
295                    catch (Exception e) {
296                            _log.error(e, e);
297    
298                            throw new RemoteException(e.getMessage());
299                    }
300            }
301    
302            /**
303            * Returns the groups associated with the organizations.
304            *
305            * @param organizations the organizations
306            * @return the groups associated with the organizations
307            * @throws PortalException if a portal exception occurred
308            * @throws SystemException if a system exception occurred
309            */
310            public static com.liferay.portal.model.GroupSoap[] getOrganizationsGroups(
311                    com.liferay.portal.model.OrganizationSoap[] organizations)
312                    throws RemoteException {
313                    try {
314                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getOrganizationsGroups(com.liferay.portal.model.impl.OrganizationModelImpl.toModels(
315                                                    organizations));
316    
317                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
318                    }
319                    catch (Exception e) {
320                            _log.error(e, e);
321    
322                            throw new RemoteException(e.getMessage());
323                    }
324            }
325    
326            /**
327            * Returns the group associated with the user.
328            *
329            * @param companyId the primary key of the company
330            * @param userId the primary key of the user
331            * @return the group associated with the user
332            * @throws PortalException if a matching group could not be found or if the
333            current user did not have permission to view the group
334            * @throws SystemException if a system exception occurred
335            */
336            public static com.liferay.portal.model.GroupSoap getUserGroup(
337                    long companyId, long userId) throws RemoteException {
338                    try {
339                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.getUserGroup(companyId,
340                                            userId);
341    
342                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
343                    }
344                    catch (Exception e) {
345                            _log.error(e, e);
346    
347                            throw new RemoteException(e.getMessage());
348                    }
349            }
350    
351            /**
352            * Returns the groups associated with the user groups.
353            *
354            * @param userGroups the user groups
355            * @return the groups associated with the user groups
356            * @throws PortalException if any one of the user group's group could not be
357            found
358            * @throws SystemException if a system exception occurred
359            */
360            public static com.liferay.portal.model.GroupSoap[] getUserGroupsGroups(
361                    com.liferay.portal.model.UserGroupSoap[] userGroups)
362                    throws RemoteException {
363                    try {
364                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserGroupsGroups(com.liferay.portal.model.impl.UserGroupModelImpl.toModels(
365                                                    userGroups));
366    
367                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
368                    }
369                    catch (Exception e) {
370                            _log.error(e, e);
371    
372                            throw new RemoteException(e.getMessage());
373                    }
374            }
375    
376            /**
377            * Returns the range of all groups associated with the user's organization
378            * groups, including the ancestors of the organization groups, unless portal
379            * property <code>organizations.membership.strict</code> is set to
380            * <code>true</code>.
381            *
382            * <p>
383            * Useful when paginating results. Returns a maximum of <code>end -
384            * start</code> instances. <code>start</code> and <code>end</code> are not
385            * primary keys, they are indexes in the result set. Thus, <code>0</code>
386            * refers to the first result in the set. Setting both <code>start</code>
387            * and <code>end</code> to {@link
388            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
389            * result set.
390            * </p>
391            *
392            * @param userId the primary key of the user
393            * @param start the lower bound of the range of groups to consider
394            * @param end the upper bound of the range of groups to consider (not
395            inclusive)
396            * @return the range of groups associated with the user's organizations
397            * @throws PortalException if a user with the primary key could not be found
398            or if another portal exception occurred
399            * @throws SystemException if a system exception occurred
400            */
401            public static com.liferay.portal.model.GroupSoap[] getUserOrganizationsGroups(
402                    long userId, int start, int end) throws RemoteException {
403                    try {
404                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserOrganizationsGroups(userId,
405                                            start, end);
406    
407                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
408                    }
409                    catch (Exception e) {
410                            _log.error(e, e);
411    
412                            throw new RemoteException(e.getMessage());
413                    }
414            }
415    
416            public static com.liferay.portal.model.GroupSoap[] getUserPlaces(
417                    long userId, java.lang.String[] classNames,
418                    boolean includeControlPanel, int max) throws RemoteException {
419                    try {
420                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId,
421                                            classNames, includeControlPanel, max);
422    
423                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
424                    }
425                    catch (Exception e) {
426                            _log.error(e, e);
427    
428                            throw new RemoteException(e.getMessage());
429                    }
430            }
431    
432            /**
433            * Returns the user's group &quot;places&quot; associated with the group
434            * entity class names, including the control panel group if the user is
435            * permitted to view the control panel.
436            *
437            * <p>
438            * <ul> <li> Class name &quot;User&quot; includes the user's layout set
439            * group. </li> <li> Class name &quot;Organization&quot; includes the user's
440            * immediate organization groups and inherited organization groups. </li>
441            * <li> Class name &quot;Group&quot; includes the user's immediate
442            * organization groups and site groups. </li> <li> A <code>classNames</code>
443            * value of <code>null</code> includes the user's layout set group,
444            * organization groups, inherited organization groups, and site groups.
445            * </li> </ul>
446            * </p>
447            *
448            * @param userId the primary key of the user
449            * @param classNames the group entity class names (optionally
450            <code>null</code>). For more information see {@link
451            #getUserPlaces(long, String[], int)}
452            * @param max the maximum number of groups to return
453            * @return the user's group &quot;places&quot;
454            * @throws PortalException if a portal exception occurred
455            * @throws SystemException if a system exception occurred
456            */
457            public static com.liferay.portal.model.GroupSoap[] getUserPlaces(
458                    long userId, java.lang.String[] classNames, int max)
459                    throws RemoteException {
460                    try {
461                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId,
462                                            classNames, max);
463    
464                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
465                    }
466                    catch (Exception e) {
467                            _log.error(e, e);
468    
469                            throw new RemoteException(e.getMessage());
470                    }
471            }
472    
473            /**
474            * Returns the guest or current user's group &quot;places&quot; associated
475            * with the group entity class names, including the control panel group if
476            * the user is permitted to view the control panel.
477            *
478            * <p>
479            * <ul> <li> Class name &quot;User&quot; includes the user's layout set
480            * group. </li> <li> Class name &quot;Organization&quot; includes the user's
481            * immediate organization groups and inherited organization groups. </li>
482            * <li> Class name &quot;Group&quot; includes the user's immediate
483            * organization groups and site groups. </li> <li> A <code>classNames</code>
484            * value of <code>null</code> includes the user's layout set group,
485            * organization groups, inherited organization groups, and site groups.
486            * </li> </ul>
487            * </p>
488            *
489            * @param classNames the group entity class names (optionally
490            <code>null</code>). For more information see {@link
491            #getUserPlaces(String[], int)}
492            * @param max the maximum number of groups to return
493            * @return the user's group &quot;places&quot;
494            * @throws PortalException if a portal exception occurred
495            * @throws SystemException if a system exception occurred
496            */
497            public static com.liferay.portal.model.GroupSoap[] getUserPlaces(
498                    java.lang.String[] classNames, int max) throws RemoteException {
499                    try {
500                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(classNames,
501                                            max);
502    
503                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
504                    }
505                    catch (Exception e) {
506                            _log.error(e, e);
507    
508                            throw new RemoteException(e.getMessage());
509                    }
510            }
511    
512            /**
513            * Returns the guest or current user's layout set group, organization
514            * groups, inherited organization groups, and site groups.
515            *
516            * @return the user's layout set group, organization groups, and inherited
517            organization groups, and site groups
518            * @throws PortalException if a portal exception occurred
519            * @throws SystemException if a system exception occurred
520            */
521            public static com.liferay.portal.model.GroupSoap[] getUserSites()
522                    throws RemoteException {
523                    try {
524                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSites();
525    
526                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
527                    }
528                    catch (Exception e) {
529                            _log.error(e, e);
530    
531                            throw new RemoteException(e.getMessage());
532                    }
533            }
534    
535            /**
536            * Returns <code>true</code> if the user is associated with the group,
537            * including the user's inherited organizations and user groups. System and
538            * staged groups are not included.
539            *
540            * @param userId the primary key of the user
541            * @param groupId the primary key of the group
542            * @return <code>true</code> if the user is associated with the group;
543            <code>false</code> otherwise
544            * @throws PortalException if the current user did not have permission to
545            view the user or group members
546            * @throws SystemException if a system exception occurred
547            */
548            public static boolean hasUserGroup(long userId, long groupId)
549                    throws RemoteException {
550                    try {
551                            boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId);
552    
553                            return returnValue;
554                    }
555                    catch (Exception e) {
556                            _log.error(e, e);
557    
558                            throw new RemoteException(e.getMessage());
559                    }
560            }
561    
562            /**
563            * Returns an ordered range of all the site groups and organization groups
564            * that match the name and description, optionally including the user's
565            * inherited organization groups and user groups. System and staged groups
566            * are not included.
567            *
568            * <p>
569            * Useful when paginating results. Returns a maximum of <code>end -
570            * start</code> instances. <code>start</code> and <code>end</code> are not
571            * primary keys, they are indexes in the result set. Thus, <code>0</code>
572            * refers to the first result in the set. Setting both <code>start</code>
573            * and <code>end</code> to {@link
574            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
575            * result set.
576            * </p>
577            *
578            * @param companyId the primary key of the company
579            * @param name the group's name (optionally <code>null</code>)
580            * @param description the group's description (optionally
581            <code>null</code>)
582            * @param params the finder params (optionally <code>null</code>). To
583            include the user's inherited organizations and user groups in the
584            search, add entries having &quot;usersGroups&quot; and
585            &quot;inherit&quot; as keys mapped to the the user's ID. For more
586            information see {@link
587            com.liferay.portal.service.persistence.GroupFinder}
588            * @param start the lower bound of the range of groups to return
589            * @param end the upper bound of the range of groups to return (not
590            inclusive)
591            * @return the matching groups ordered by name
592            * @throws PortalException if a portal exception occurred
593            * @throws SystemException if a system exception occurred
594            */
595            public static com.liferay.portal.model.GroupSoap[] search(long companyId,
596                    java.lang.String name, java.lang.String description,
597                    java.lang.String[] params, int start, int end)
598                    throws RemoteException {
599                    try {
600                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.search(companyId,
601                                            name, description, params, start, end);
602    
603                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
604                    }
605                    catch (Exception e) {
606                            _log.error(e, e);
607    
608                            throw new RemoteException(e.getMessage());
609                    }
610            }
611    
612            /**
613            * Returns the number of groups and organization groups that match the name
614            * and description, optionally including the user's inherited organizations
615            * and user groups. System and staged groups are not included.
616            *
617            * @param companyId the primary key of the company
618            * @param name the group's name (optionally <code>null</code>)
619            * @param description the group's description (optionally
620            <code>null</code>)
621            * @param params the finder params (optionally <code>null</code>). To
622            include the user's inherited organizations and user groups in the
623            search, add entries having &quot;usersGroups&quot; and
624            &quot;inherit&quot; as keys mapped to the the user's ID. For more
625            information see {@link
626            com.liferay.portal.service.persistence.GroupFinder}
627            * @return the number of matching groups
628            * @throws SystemException if a system exception occurred
629            */
630            public static int searchCount(long companyId, java.lang.String name,
631                    java.lang.String description, java.lang.String[] params)
632                    throws RemoteException {
633                    try {
634                            int returnValue = GroupServiceUtil.searchCount(companyId, name,
635                                            description, params);
636    
637                            return returnValue;
638                    }
639                    catch (Exception e) {
640                            _log.error(e, e);
641    
642                            throw new RemoteException(e.getMessage());
643                    }
644            }
645    
646            /**
647            * Sets the groups associated with the role, removing and adding
648            * associations as necessary.
649            *
650            * @param roleId the primary key of the role
651            * @param groupIds the primary keys of the groups
652            * @throws PortalException if the user did not have permission to update
653            update the role
654            * @throws SystemException if a system exception occurred
655            */
656            public static void setRoleGroups(long roleId, long[] groupIds)
657                    throws RemoteException {
658                    try {
659                            GroupServiceUtil.setRoleGroups(roleId, groupIds);
660                    }
661                    catch (Exception e) {
662                            _log.error(e, e);
663    
664                            throw new RemoteException(e.getMessage());
665                    }
666            }
667    
668            /**
669            * Removes the groups from the role.
670            *
671            * @param roleId the primary key of the role
672            * @param groupIds the primary keys of the groups
673            * @throws PortalException if the user did not have permission to update the
674            role
675            * @throws SystemException if a system exception occurred
676            */
677            public static void unsetRoleGroups(long roleId, long[] groupIds)
678                    throws RemoteException {
679                    try {
680                            GroupServiceUtil.unsetRoleGroups(roleId, groupIds);
681                    }
682                    catch (Exception e) {
683                            _log.error(e, e);
684    
685                            throw new RemoteException(e.getMessage());
686                    }
687            }
688    
689            /**
690            * Updates the group's friendly URL.
691            *
692            * @param groupId the primary key of the group
693            * @param friendlyURL the group's new friendlyURL (optionally
694            <code>null</code>)
695            * @return the group
696            * @throws PortalException if the user did not have permission to update the
697            group, if a group with the primary key could not be found, or if
698            a valid friendly URL could not be created for the group
699            * @throws SystemException if a system exception occurred
700            */
701            public static com.liferay.portal.model.GroupSoap updateFriendlyURL(
702                    long groupId, java.lang.String friendlyURL) throws RemoteException {
703                    try {
704                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId,
705                                            friendlyURL);
706    
707                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
708                    }
709                    catch (Exception e) {
710                            _log.error(e, e);
711    
712                            throw new RemoteException(e.getMessage());
713                    }
714            }
715    
716            /**
717            * Updates the group.
718            *
719            * @param groupId the primary key of the group
720            * @param parentGroupId the primary key of the parent group
721            * @param name the group's new name
722            * @param description the group's new description (optionally
723            <code>null</code>)
724            * @param type the group's new type. For more information see {@link
725            com.liferay.portal.model.GroupConstants}
726            * @param friendlyURL the group's new friendlyURL (optionally
727            <code>null</code>)
728            * @param active whether the group is active
729            * @param serviceContext the service context to be applied (optionally
730            <code>null</code>). Can set the asset category IDs and asset tag
731            names for the group.
732            * @return the group
733            * @throws PortalException if the user did not have permission to update the
734            group, if a group with the primary key could not be found, if the
735            friendly URL was invalid or could one not be created
736            * @throws SystemException if a system exception occurred
737            */
738            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
739                    long parentGroupId, java.lang.String name,
740                    java.lang.String description, int type, java.lang.String friendlyURL,
741                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
742                    throws RemoteException {
743                    try {
744                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
745                                            parentGroupId, name, description, type, friendlyURL,
746                                            active, serviceContext);
747    
748                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
749                    }
750                    catch (Exception e) {
751                            _log.error(e, e);
752    
753                            throw new RemoteException(e.getMessage());
754                    }
755            }
756    
757            /**
758            * Updates the group's type settings.
759            *
760            * @param groupId the primary key of the group
761            * @param typeSettings the group's new type settings (optionally
762            <code>null</code>)
763            * @return the group
764            * @throws PortalException if the user did not have permission to update the
765            group or if a group with the primary key could not be found
766            * @throws SystemException if a system exception occurred
767            */
768            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
769                    java.lang.String typeSettings) throws RemoteException {
770                    try {
771                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
772                                            typeSettings);
773    
774                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
775                    }
776                    catch (Exception e) {
777                            _log.error(e, e);
778    
779                            throw new RemoteException(e.getMessage());
780                    }
781            }
782    
783            private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class);
784    }