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