001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.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 PortalException if the current user did not have permission to
516            view the user or group members
517            * @throws SystemException if a system exception occurred
518            */
519            public static boolean hasUserGroup(long userId, long groupId)
520                    throws RemoteException {
521                    try {
522                            boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId);
523    
524                            return returnValue;
525                    }
526                    catch (Exception e) {
527                            _log.error(e, e);
528    
529                            throw new RemoteException(e.getMessage());
530                    }
531            }
532    
533            /**
534            * Returns a name ordered range of all the site groups and organization
535            * groups that match the name and description, optionally including the
536            * user's inherited organization groups and user groups. System and staged
537            * groups are not included.
538            *
539            * <p>
540            * Useful when paginating results. Returns a maximum of <code>end -
541            * start</code> instances. <code>start</code> and <code>end</code> are not
542            * primary keys, they are indexes in the result set. Thus, <code>0</code>
543            * refers to the first result in the set. Setting both <code>start</code>
544            * and <code>end</code> to {@link
545            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
546            * result set.
547            * </p>
548            *
549            * @param companyId the primary key of the company
550            * @param name the group's name (optionally <code>null</code>)
551            * @param description the group's description (optionally
552            <code>null</code>)
553            * @param params the finder params (optionally <code>null</code>). To
554            include the user's inherited organizations and user groups in the
555            search, add entries having &quot;usersGroups&quot; and
556            &quot;inherit&quot; as keys mapped to the the user's ID. For more
557            information see {@link
558            com.liferay.portal.service.persistence.GroupFinder}
559            * @param start the lower bound of the range of groups to return
560            * @param end the upper bound of the range of groups to return (not
561            inclusive)
562            * @return the matching groups ordered by name
563            * @throws PortalException if a portal exception occurred
564            * @throws SystemException if a system exception occurred
565            */
566            public static com.liferay.portal.model.GroupSoap[] search(long companyId,
567                    java.lang.String name, java.lang.String description,
568                    java.lang.String[] params, int start, int end)
569                    throws RemoteException {
570                    try {
571                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.search(companyId,
572                                            name, description, params, start, end);
573    
574                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
575                    }
576                    catch (Exception e) {
577                            _log.error(e, e);
578    
579                            throw new RemoteException(e.getMessage());
580                    }
581            }
582    
583            /**
584            * Returns the number of groups and organization groups that match the name
585            * and description, optionally including the user's inherited organizations
586            * and user groups. System and staged groups are not included.
587            *
588            * @param companyId the primary key of the company
589            * @param name the group's name (optionally <code>null</code>)
590            * @param description the group's description (optionally
591            <code>null</code>)
592            * @param params the finder params (optionally <code>null</code>). To
593            include the user's inherited organizations and user groups in the
594            search, add entries having &quot;usersGroups&quot; and
595            &quot;inherit&quot; as keys mapped to the the user's ID. For more
596            information see {@link
597            com.liferay.portal.service.persistence.GroupFinder}
598            * @return the number of matching groups
599            * @throws SystemException if a system exception occurred
600            */
601            public static int searchCount(long companyId, java.lang.String name,
602                    java.lang.String description, java.lang.String[] params)
603                    throws RemoteException {
604                    try {
605                            int returnValue = GroupServiceUtil.searchCount(companyId, name,
606                                            description, params);
607    
608                            return returnValue;
609                    }
610                    catch (Exception e) {
611                            _log.error(e, e);
612    
613                            throw new RemoteException(e.getMessage());
614                    }
615            }
616    
617            /**
618            * Sets the groups associated with the role, removing and adding
619            * associations as necessary.
620            *
621            * @param roleId the primary key of the role
622            * @param groupIds the primary keys of the groups
623            * @throws PortalException if the user did not have permission to update
624            update the role
625            * @throws SystemException if a system exception occurred
626            */
627            public static void setRoleGroups(long roleId, long[] groupIds)
628                    throws RemoteException {
629                    try {
630                            GroupServiceUtil.setRoleGroups(roleId, groupIds);
631                    }
632                    catch (Exception e) {
633                            _log.error(e, e);
634    
635                            throw new RemoteException(e.getMessage());
636                    }
637            }
638    
639            /**
640            * Removes the groups from the role.
641            *
642            * @param roleId the primary key of the role
643            * @param groupIds the primary keys of the groups
644            * @throws PortalException if the user did not have permission to update the
645            role
646            * @throws SystemException if a system exception occurred
647            */
648            public static void unsetRoleGroups(long roleId, long[] groupIds)
649                    throws RemoteException {
650                    try {
651                            GroupServiceUtil.unsetRoleGroups(roleId, groupIds);
652                    }
653                    catch (Exception e) {
654                            _log.error(e, e);
655    
656                            throw new RemoteException(e.getMessage());
657                    }
658            }
659    
660            /**
661            * Updates the group's friendly URL.
662            *
663            * @param groupId the primary key of the group
664            * @param friendlyURL the group's new friendlyURL (optionally
665            <code>null</code>)
666            * @return the group
667            * @throws PortalException if the user did not have permission to update the
668            group, if a group with the primary key could not be found, or if
669            a valid friendly URL could not be created for the group
670            * @throws SystemException if a system exception occurred
671            */
672            public static com.liferay.portal.model.GroupSoap updateFriendlyURL(
673                    long groupId, java.lang.String friendlyURL) throws RemoteException {
674                    try {
675                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId,
676                                            friendlyURL);
677    
678                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
679                    }
680                    catch (Exception e) {
681                            _log.error(e, e);
682    
683                            throw new RemoteException(e.getMessage());
684                    }
685            }
686    
687            /**
688            * Updates the group's type settings.
689            *
690            * @param groupId the primary key of the group
691            * @param typeSettings the group's new type settings (optionally
692            <code>null</code>)
693            * @return the group
694            * @throws PortalException if the user did not have permission to update the
695            group or if a group with the primary key could not be found
696            * @throws SystemException if a system exception occurred
697            */
698            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
699                    java.lang.String typeSettings) throws RemoteException {
700                    try {
701                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
702                                            typeSettings);
703    
704                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
705                    }
706                    catch (Exception e) {
707                            _log.error(e, e);
708    
709                            throw new RemoteException(e.getMessage());
710                    }
711            }
712    
713            /**
714            * Updates the group.
715            *
716            * @param groupId the primary key of the group
717            * @param name the group's new name
718            * @param description the group's new description (optionally
719            <code>null</code>)
720            * @param type the group's new type. For more information see {@link
721            com.liferay.portal.model.GroupConstants}
722            * @param friendlyURL the group's new friendlyURL (optionally
723            <code>null</code>)
724            * @param active whether the group is active
725            * @param serviceContext the service context to be applied (optionally
726            <code>null</code>). Can set the asset category IDs and asset tag
727            names for the group.
728            * @return the group
729            * @throws PortalException if the user did not have permission to update the
730            group, if a group with the primary key could not be found, if the
731            friendly URL was invalid or could one not be created
732            * @throws SystemException if a system exception occurred
733            */
734            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
735                    java.lang.String name, java.lang.String description, int type,
736                    java.lang.String friendlyURL, boolean active,
737                    com.liferay.portal.service.ServiceContext serviceContext)
738                    throws RemoteException {
739                    try {
740                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
741                                            name, description, type, friendlyURL, active, serviceContext);
742    
743                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
744                    }
745                    catch (Exception e) {
746                            _log.error(e, e);
747    
748                            throw new RemoteException(e.getMessage());
749                    }
750            }
751    
752            private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class);
753    }