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