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