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            * @deprecated As of 7.0.0, replaced by {@link #addGroup(long, long, Map,
155            Map, int, boolean, int, String, boolean, boolean,
156            ServiceContext)}
157            */
158            @Deprecated
159            public static com.liferay.portal.model.GroupSoap addGroup(
160                    long parentGroupId, long liveGroupId, java.lang.String name,
161                    java.lang.String description, int type, boolean manualMembership,
162                    int membershipRestriction, java.lang.String friendlyURL, boolean site,
163                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
164                    throws RemoteException {
165                    try {
166                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId,
167                                            liveGroupId, name, description, type, manualMembership,
168                                            membershipRestriction, friendlyURL, site, active,
169                                            serviceContext);
170    
171                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
172                    }
173                    catch (Exception e) {
174                            _log.error(e, e);
175    
176                            throw new RemoteException(e.getMessage());
177                    }
178            }
179    
180            /**
181            * Adds the group using the group default live group ID.
182            *
183            * @param parentGroupId the primary key of the parent group
184            * @param name the entity's name
185            * @param description the group's description (optionally
186            <code>null</code>)
187            * @param type the group's type. For more information see {@link
188            GroupConstants}.
189            * @param friendlyURL the group's friendlyURL
190            * @param site whether the group is to be associated with a main site
191            * @param active whether the group is active
192            * @param serviceContext the service context to be applied (optionally
193            <code>null</code>). Can set asset category IDs and asset tag
194            names for the group, and can set whether the group is for
195            staging
196            * @return the group
197            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, Map,
198            Map, int, boolean, int, String, boolean, boolean,
199            ServiceContext)}
200            */
201            @Deprecated
202            public static com.liferay.portal.model.GroupSoap addGroup(
203                    long parentGroupId, java.lang.String name,
204                    java.lang.String description, int type, java.lang.String friendlyURL,
205                    boolean site, boolean active,
206                    com.liferay.portal.service.ServiceContext serviceContext)
207                    throws RemoteException {
208                    try {
209                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId,
210                                            name, description, type, friendlyURL, site, active,
211                                            serviceContext);
212    
213                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
214                    }
215                    catch (Exception e) {
216                            _log.error(e, e);
217    
218                            throw new RemoteException(e.getMessage());
219                    }
220            }
221    
222            /**
223            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, String,
224            String, int, String, boolean, boolean, ServiceContext)}
225            */
226            @Deprecated
227            public static com.liferay.portal.model.GroupSoap addGroup(
228                    java.lang.String name, java.lang.String description, int type,
229                    java.lang.String friendlyURL, boolean site, boolean active,
230                    com.liferay.portal.service.ServiceContext serviceContext)
231                    throws RemoteException {
232                    try {
233                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(name,
234                                            description, type, friendlyURL, site, active, serviceContext);
235    
236                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
237                    }
238                    catch (Exception e) {
239                            _log.error(e, e);
240    
241                            throw new RemoteException(e.getMessage());
242                    }
243            }
244    
245            /**
246            * Adds the groups to the role.
247            *
248            * @param roleId the primary key of the role
249            * @param groupIds the primary keys of the groups
250            */
251            public static void addRoleGroups(long roleId, long[] groupIds)
252                    throws RemoteException {
253                    try {
254                            GroupServiceUtil.addRoleGroups(roleId, groupIds);
255                    }
256                    catch (Exception e) {
257                            _log.error(e, e);
258    
259                            throw new RemoteException(e.getMessage());
260                    }
261            }
262    
263            /**
264            * Checks that the current user is permitted to use the group for Remote
265            * Staging.
266            *
267            * @param groupId the primary key of the group
268            */
269            public static void checkRemoteStagingGroup(long groupId)
270                    throws RemoteException {
271                    try {
272                            GroupServiceUtil.checkRemoteStagingGroup(groupId);
273                    }
274                    catch (Exception e) {
275                            _log.error(e, e);
276    
277                            throw new RemoteException(e.getMessage());
278                    }
279            }
280    
281            /**
282            * Deletes the group.
283            *
284            * <p>
285            * The group is unstaged and its assets and resources including layouts,
286            * membership requests, subscriptions, teams, blogs, bookmarks, calendar
287            * events, image gallery, journals, message boards, polls, shopping related
288            * entities, and wikis are also deleted.
289            * </p>
290            *
291            * @param groupId the primary key of the group
292            */
293            public static void deleteGroup(long groupId) throws RemoteException {
294                    try {
295                            GroupServiceUtil.deleteGroup(groupId);
296                    }
297                    catch (Exception e) {
298                            _log.error(e, e);
299    
300                            throw new RemoteException(e.getMessage());
301                    }
302            }
303    
304            public static void disableStaging(long groupId) throws RemoteException {
305                    try {
306                            GroupServiceUtil.disableStaging(groupId);
307                    }
308                    catch (Exception e) {
309                            _log.error(e, e);
310    
311                            throw new RemoteException(e.getMessage());
312                    }
313            }
314    
315            public static void enableStaging(long groupId) throws RemoteException {
316                    try {
317                            GroupServiceUtil.enableStaging(groupId);
318                    }
319                    catch (Exception e) {
320                            _log.error(e, e);
321    
322                            throw new RemoteException(e.getMessage());
323                    }
324            }
325    
326            /**
327            * Returns the company group.
328            *
329            * @param companyId the primary key of the company
330            * @return the group associated with the company
331            */
332            public static com.liferay.portal.model.GroupSoap getCompanyGroup(
333                    long companyId) throws RemoteException {
334                    try {
335                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.getCompanyGroup(companyId);
336    
337                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
338                    }
339                    catch (Exception e) {
340                            _log.error(e, e);
341    
342                            throw new RemoteException(e.getMessage());
343                    }
344            }
345    
346            /**
347            * Returns the group with the primary key.
348            *
349            * @param groupId the primary key of the group
350            * @return the group with the primary key
351            */
352            public static com.liferay.portal.model.GroupSoap getGroup(long groupId)
353                    throws RemoteException {
354                    try {
355                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(groupId);
356    
357                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
358                    }
359                    catch (Exception e) {
360                            _log.error(e, e);
361    
362                            throw new RemoteException(e.getMessage());
363                    }
364            }
365    
366            /**
367            * Returns the group with the name.
368            *
369            * @param companyId the primary key of the company
370            * @param groupKey the group key
371            * @return the group with the group key
372            */
373            public static com.liferay.portal.model.GroupSoap getGroup(long companyId,
374                    java.lang.String groupKey) throws RemoteException {
375                    try {
376                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId,
377                                            groupKey);
378    
379                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
380                    }
381                    catch (Exception e) {
382                            _log.error(e, e);
383    
384                            throw new RemoteException(e.getMessage());
385                    }
386            }
387    
388            /**
389            * Returns all the groups that are direct children of the parent group.
390            *
391            * @param companyId the primary key of the company
392            * @param parentGroupId the primary key of the parent group
393            * @param site whether the group is to be associated with a main site
394            * @return the matching groups, or <code>null</code> if no matches were
395            found
396            */
397            public static com.liferay.portal.model.GroupSoap[] getGroups(
398                    long companyId, long parentGroupId, boolean site)
399                    throws RemoteException {
400                    try {
401                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getGroups(companyId,
402                                            parentGroupId, site);
403    
404                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
405                    }
406                    catch (Exception e) {
407                            _log.error(e, e);
408    
409                            throw new RemoteException(e.getMessage());
410                    }
411            }
412    
413            /**
414            * Returns a range of all the site groups for which the user has control
415            * panel access.
416            *
417            * @param portlets the portlets to manage
418            * @param max the upper bound of the range of groups to consider (not
419            inclusive)
420            * @return the range of site groups for which the user has Control Panel
421            access
422            */
423            public static com.liferay.portal.model.GroupSoap[] getManageableSiteGroups(
424                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
425                    throws RemoteException {
426                    try {
427                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableSiteGroups(portlets,
428                                            max);
429    
430                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
431                    }
432                    catch (Exception e) {
433                            _log.error(e, e);
434    
435                            throw new RemoteException(e.getMessage());
436                    }
437            }
438    
439            /**
440            * Returns a range of all the site groups for which the user has control
441            * panel access.
442            *
443            * @param portlets the portlets to manage
444            * @param max the upper bound of the range of groups to consider (not
445            inclusive)
446            * @return the range of site groups for which the user has Control Panel
447            access
448            * @deprecated As of 6.2.0, replaced by {@link
449            #getManageableSiteGroups(Collection, int)}
450            */
451            @Deprecated
452            public static com.liferay.portal.model.GroupSoap[] getManageableSites(
453                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
454                    throws RemoteException {
455                    try {
456                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableSites(portlets,
457                                            max);
458    
459                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
460                    }
461                    catch (Exception e) {
462                            _log.error(e, e);
463    
464                            throw new RemoteException(e.getMessage());
465                    }
466            }
467    
468            /**
469            * Returns the groups associated with the organizations.
470            *
471            * @param organizations the organizations
472            * @return the groups associated with the organizations
473            */
474            public static com.liferay.portal.model.GroupSoap[] getOrganizationsGroups(
475                    com.liferay.portal.model.OrganizationSoap[] organizations)
476                    throws RemoteException {
477                    try {
478                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getOrganizationsGroups(com.liferay.portal.model.impl.OrganizationModelImpl.toModels(
479                                                    organizations));
480    
481                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
482                    }
483                    catch (Exception e) {
484                            _log.error(e, e);
485    
486                            throw new RemoteException(e.getMessage());
487                    }
488            }
489    
490            /**
491            * Returns the group directly associated with the user.
492            *
493            * @param companyId the primary key of the company
494            * @param userId the primary key of the user
495            * @return the group directly associated with the user
496            */
497            public static com.liferay.portal.model.GroupSoap getUserGroup(
498                    long companyId, long userId) throws RemoteException {
499                    try {
500                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.getUserGroup(companyId,
501                                            userId);
502    
503                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
504                    }
505                    catch (Exception e) {
506                            _log.error(e, e);
507    
508                            throw new RemoteException(e.getMessage());
509                    }
510            }
511    
512            /**
513            * Returns the groups associated with the user groups.
514            *
515            * @param userGroups the user groups
516            * @return the groups associated with the user groups
517            */
518            public static com.liferay.portal.model.GroupSoap[] getUserGroupsGroups(
519                    com.liferay.portal.model.UserGroupSoap[] userGroups)
520                    throws RemoteException {
521                    try {
522                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserGroupsGroups(com.liferay.portal.model.impl.UserGroupModelImpl.toModels(
523                                                    userGroups));
524    
525                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
526                    }
527                    catch (Exception e) {
528                            _log.error(e, e);
529    
530                            throw new RemoteException(e.getMessage());
531                    }
532            }
533    
534            /**
535            * Returns the range of all groups associated with the user's organization
536            * groups, including the ancestors of the organization groups, unless portal
537            * property <code>organizations.membership.strict</code> is set to
538            * <code>true</code>.
539            *
540            * <p>
541            * Useful when paginating results. Returns a maximum of <code>end -
542            * start</code> instances. <code>start</code> and <code>end</code> are not
543            * primary keys, they are indexes in the result set. Thus, <code>0</code>
544            * refers to the first result in the set. Setting both <code>start</code>
545            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
546            * result set.
547            * </p>
548            *
549            * @param userId the primary key of the user
550            * @param start the lower bound of the range of groups to consider
551            * @param end the upper bound of the range of groups to consider (not
552            inclusive)
553            * @return the range of groups associated with the user's organizations
554            */
555            public static com.liferay.portal.model.GroupSoap[] getUserOrganizationsGroups(
556                    long userId, int start, int end) throws RemoteException {
557                    try {
558                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserOrganizationsGroups(userId,
559                                            start, end);
560    
561                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
562                    }
563                    catch (Exception e) {
564                            _log.error(e, e);
565    
566                            throw new RemoteException(e.getMessage());
567                    }
568            }
569    
570            /**
571            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long,
572            String[], int)}
573            */
574            @Deprecated
575            public static com.liferay.portal.model.GroupSoap[] getUserPlaces(
576                    long userId, java.lang.String[] classNames,
577                    boolean includeControlPanel, int max) throws RemoteException {
578                    try {
579                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId,
580                                            classNames, includeControlPanel, max);
581    
582                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
583                    }
584                    catch (Exception e) {
585                            _log.error(e, e);
586    
587                            throw new RemoteException(e.getMessage());
588                    }
589            }
590    
591            /**
592            * Returns the user's groups &quot;sites&quot; associated with the group
593            * entity class names, including the Control Panel group if the user is
594            * permitted to view the Control Panel.
595            *
596            * <ul>
597            * <li>
598            * Class name &quot;User&quot; includes the user's layout set
599            * group.
600            * </li>
601            * <li>
602            * Class name &quot;Organization&quot; includes the user's
603            * immediate organization groups and inherited organization groups.
604            * </li>
605            * <li>
606            * Class name &quot;Group&quot; includes the user's immediate
607            * organization groups and site groups.
608            * </li>
609            * <li>
610            * A <code>classNames</code>
611            * value of <code>null</code> includes the user's layout set group,
612            * organization groups, inherited organization groups, and site groups.
613            * </li>
614            * </ul>
615            *
616            * @param userId the primary key of the user
617            * @param classNames the group entity class names (optionally
618            <code>null</code>). For more information see {@link
619            #getUserSitesGroups(long, String[], int)}.
620            * @param max the maximum number of groups to return
621            * @return the user's groups &quot;sites&quot;
622            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long,
623            String[], int)}
624            */
625            @Deprecated
626            public static com.liferay.portal.model.GroupSoap[] getUserPlaces(
627                    long userId, java.lang.String[] classNames, int max)
628                    throws RemoteException {
629                    try {
630                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId,
631                                            classNames, max);
632    
633                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
634                    }
635                    catch (Exception e) {
636                            _log.error(e, e);
637    
638                            throw new RemoteException(e.getMessage());
639                    }
640            }
641    
642            /**
643            * Returns the guest or current user's groups &quot;sites&quot; associated
644            * with the group entity class names, including the Control Panel group if
645            * the user is permitted to view the Control Panel.
646            *
647            * <ul>
648            * <li>
649            * Class name &quot;User&quot; includes the user's layout set
650            * group.
651            * </li>
652            * <li>
653            * Class name &quot;Organization&quot; includes the user's
654            * immediate organization groups and inherited organization groups.
655            * </li>
656            * <li>
657            * Class name &quot;Group&quot; includes the user's immediate
658            * organization groups and site groups.
659            * </li>
660            * <li>
661            * A <code>classNames</code>
662            * value of <code>null</code> includes the user's layout set group,
663            * organization groups, inherited organization groups, and site groups.
664            * </li>
665            * </ul>
666            *
667            * @param classNames the group entity class names (optionally
668            <code>null</code>). For more information see {@link
669            #getUserSitesGroups(String[], int)}.
670            * @param max the maximum number of groups to return
671            * @return the user's groups &quot;sites&quot;
672            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(String[],
673            int)}
674            */
675            @Deprecated
676            public static com.liferay.portal.model.GroupSoap[] getUserPlaces(
677                    java.lang.String[] classNames, int max) throws RemoteException {
678                    try {
679                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(classNames,
680                                            max);
681    
682                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
683                    }
684                    catch (Exception e) {
685                            _log.error(e, e);
686    
687                            throw new RemoteException(e.getMessage());
688                    }
689            }
690    
691            /**
692            * Returns the number of the guest or current user's groups
693            * &quot;sites&quot; associated with the group entity class names, including
694            * the Control Panel group if the user is permitted to view the Control
695            * Panel.
696            *
697            * @return the number of user's groups &quot;sites&quot;
698            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroupsCount()}
699            */
700            @Deprecated
701            public static int getUserPlacesCount() throws RemoteException {
702                    try {
703                            int returnValue = GroupServiceUtil.getUserPlacesCount();
704    
705                            return returnValue;
706                    }
707                    catch (Exception e) {
708                            _log.error(e, e);
709    
710                            throw new RemoteException(e.getMessage());
711                    }
712            }
713    
714            /**
715            * Returns the guest or current user's layout set group, organization
716            * groups, inherited organization groups, and site groups.
717            *
718            * @return the user's layout set group, organization groups, and
719            inherited organization groups, and site groups
720            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups}
721            */
722            @Deprecated
723            public static com.liferay.portal.model.GroupSoap[] getUserSites()
724                    throws RemoteException {
725                    try {
726                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSites();
727    
728                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
729                    }
730                    catch (Exception e) {
731                            _log.error(e, e);
732    
733                            throw new RemoteException(e.getMessage());
734                    }
735            }
736    
737            public static com.liferay.portal.model.GroupSoap[] getUserSitesGroups()
738                    throws RemoteException {
739                    try {
740                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSitesGroups();
741    
742                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
743                    }
744                    catch (Exception e) {
745                            _log.error(e, e);
746    
747                            throw new RemoteException(e.getMessage());
748                    }
749            }
750    
751            /**
752            * Returns the user's groups &quot;sites&quot; associated with the group
753            * entity class names, including the Control Panel group if the user is
754            * permitted to view the Control Panel.
755            *
756            * <ul>
757            * <li>
758            * Class name &quot;User&quot; includes the user's layout set
759            * group.
760            * </li>
761            * <li>
762            * Class name &quot;Organization&quot; includes the user's
763            * immediate organization groups and inherited organization groups.
764            * </li>
765            * <li>
766            * Class name &quot;Group&quot; includes the user's immediate
767            * organization groups and site groups.
768            * </li>
769            * <li>
770            * A <code>classNames</code>
771            * value of <code>null</code> includes the user's layout set group,
772            * organization groups, inherited organization groups, and site groups.
773            * </li>
774            * </ul>
775            *
776            * @param userId the primary key of the user
777            * @param classNames the group entity class names (optionally
778            <code>null</code>). For more information see {@link
779            #getUserSitesGroups(long, String[], int)}.
780            * @param max the maximum number of groups to return
781            * @return the user's groups &quot;sites&quot;
782            */
783            public static com.liferay.portal.model.GroupSoap[] getUserSitesGroups(
784                    long userId, java.lang.String[] classNames, int max)
785                    throws RemoteException {
786                    try {
787                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSitesGroups(userId,
788                                            classNames, max);
789    
790                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
791                    }
792                    catch (Exception e) {
793                            _log.error(e, e);
794    
795                            throw new RemoteException(e.getMessage());
796                    }
797            }
798    
799            /**
800            * Returns the guest or current user's groups &quot;sites&quot; associated
801            * with the group entity class names, including the Control Panel group if
802            * the user is permitted to view the Control Panel.
803            *
804            * <ul>
805            * <li>
806            * Class name &quot;User&quot; includes the user's layout set
807            * group.
808            * </li>
809            * <li>
810            * Class name &quot;Organization&quot; includes the user's
811            * immediate organization groups and inherited organization groups.
812            * </li>
813            * <li>
814            * Class name &quot;Group&quot; includes the user's immediate
815            * organization groups and site groups.
816            * </li>
817            * <li>
818            * A <code>classNames</code>
819            * value of <code>null</code> includes the user's layout set group,
820            * organization groups, inherited organization groups, and site groups.
821            * </li>
822            * </ul>
823            *
824            * @param classNames the group entity class names (optionally
825            <code>null</code>). For more information see {@link
826            #getUserSitesGroups(long, String[], int)}.
827            * @param max the maximum number of groups to return
828            * @return the user's groups &quot;sites&quot;
829            */
830            public static com.liferay.portal.model.GroupSoap[] getUserSitesGroups(
831                    java.lang.String[] classNames, int max) throws RemoteException {
832                    try {
833                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSitesGroups(classNames,
834                                            max);
835    
836                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
837                    }
838                    catch (Exception e) {
839                            _log.error(e, e);
840    
841                            throw new RemoteException(e.getMessage());
842                    }
843            }
844    
845            /**
846            * Returns the number of the guest or current user's groups
847            * &quot;sites&quot; associated with the group entity class names, including
848            * the Control Panel group if the user is permitted to view the Control
849            * Panel.
850            *
851            * @return the number of user's groups &quot;sites&quot;
852            */
853            public static int getUserSitesGroupsCount() throws RemoteException {
854                    try {
855                            int returnValue = GroupServiceUtil.getUserSitesGroupsCount();
856    
857                            return returnValue;
858                    }
859                    catch (Exception e) {
860                            _log.error(e, e);
861    
862                            throw new RemoteException(e.getMessage());
863                    }
864            }
865    
866            /**
867            * Returns <code>true</code> if the user is associated with the group,
868            * including the user's inherited organizations and user groups. System and
869            * staged groups are not included.
870            *
871            * @param userId the primary key of the user
872            * @param groupId the primary key of the group
873            * @return <code>true</code> if the user is associated with the group;
874            <code>false</code> otherwise
875            */
876            public static boolean hasUserGroup(long userId, long groupId)
877                    throws RemoteException {
878                    try {
879                            boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId);
880    
881                            return returnValue;
882                    }
883                    catch (Exception e) {
884                            _log.error(e, e);
885    
886                            throw new RemoteException(e.getMessage());
887                    }
888            }
889    
890            /**
891            * Returns an ordered range of all the site groups and organization groups
892            * that match the name and description, optionally including the user's
893            * inherited organization groups and user groups. System and staged groups
894            * are not included.
895            *
896            * <p>
897            * Useful when paginating results. Returns a maximum of <code>end -
898            * start</code> instances. <code>start</code> and <code>end</code> are not
899            * primary keys, they are indexes in the result set. Thus, <code>0</code>
900            * refers to the first result in the set. Setting both <code>start</code>
901            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
902            * result set.
903            * </p>
904            *
905            * @param companyId the primary key of the company
906            * @param name the group's name (optionally <code>null</code>)
907            * @param description the group's description (optionally
908            <code>null</code>)
909            * @param params the finder params (optionally <code>null</code>). To
910            include the user's inherited organizations and user groups in the
911            search, add entries having &quot;usersGroups&quot; and
912            &quot;inherit&quot; as keys mapped to the the user's ID. For more
913            information see {@link
914            com.liferay.portal.service.persistence.GroupFinder}.
915            * @param start the lower bound of the range of groups to return
916            * @param end the upper bound of the range of groups to return (not
917            inclusive)
918            * @return the matching groups ordered by name
919            */
920            public static com.liferay.portal.model.GroupSoap[] search(long companyId,
921                    java.lang.String name, java.lang.String description,
922                    java.lang.String[] params, int start, int end)
923                    throws RemoteException {
924                    try {
925                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.search(companyId,
926                                            name, description, params, start, end);
927    
928                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
929                    }
930                    catch (Exception e) {
931                            _log.error(e, e);
932    
933                            throw new RemoteException(e.getMessage());
934                    }
935            }
936    
937            /**
938            * Returns the number of groups and organization groups that match the name
939            * and description, optionally including the user's inherited organizations
940            * and user groups. System and staged groups are not included.
941            *
942            * @param companyId the primary key of the company
943            * @param name the group's name (optionally <code>null</code>)
944            * @param description the group's description (optionally
945            <code>null</code>)
946            * @param params the finder params (optionally <code>null</code>). To
947            include the user's inherited organizations and user groups in the
948            search, add entries having &quot;usersGroups&quot; and
949            &quot;inherit&quot; as keys mapped to the the user's ID. For more
950            information see {@link
951            com.liferay.portal.service.persistence.GroupFinder}.
952            * @return the number of matching groups
953            */
954            public static int searchCount(long companyId, java.lang.String name,
955                    java.lang.String description, java.lang.String[] params)
956                    throws RemoteException {
957                    try {
958                            int returnValue = GroupServiceUtil.searchCount(companyId, name,
959                                            description, params);
960    
961                            return returnValue;
962                    }
963                    catch (Exception e) {
964                            _log.error(e, e);
965    
966                            throw new RemoteException(e.getMessage());
967                    }
968            }
969    
970            /**
971            * Sets the groups associated with the role, removing and adding
972            * associations as necessary.
973            *
974            * @param roleId the primary key of the role
975            * @param groupIds the primary keys of the groups
976            */
977            public static void setRoleGroups(long roleId, long[] groupIds)
978                    throws RemoteException {
979                    try {
980                            GroupServiceUtil.setRoleGroups(roleId, groupIds);
981                    }
982                    catch (Exception e) {
983                            _log.error(e, e);
984    
985                            throw new RemoteException(e.getMessage());
986                    }
987            }
988    
989            /**
990            * Removes the groups from the role.
991            *
992            * @param roleId the primary key of the role
993            * @param groupIds the primary keys of the groups
994            */
995            public static void unsetRoleGroups(long roleId, long[] groupIds)
996                    throws RemoteException {
997                    try {
998                            GroupServiceUtil.unsetRoleGroups(roleId, groupIds);
999                    }
1000                    catch (Exception e) {
1001                            _log.error(e, e);
1002    
1003                            throw new RemoteException(e.getMessage());
1004                    }
1005            }
1006    
1007            /**
1008            * Updates the group's friendly URL.
1009            *
1010            * @param groupId the primary key of the group
1011            * @param friendlyURL the group's new friendlyURL (optionally
1012            <code>null</code>)
1013            * @return the group
1014            */
1015            public static com.liferay.portal.model.GroupSoap updateFriendlyURL(
1016                    long groupId, java.lang.String friendlyURL) throws RemoteException {
1017                    try {
1018                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId,
1019                                            friendlyURL);
1020    
1021                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
1022                    }
1023                    catch (Exception e) {
1024                            _log.error(e, e);
1025    
1026                            throw new RemoteException(e.getMessage());
1027                    }
1028            }
1029    
1030            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
1031                    long parentGroupId, java.lang.String[] nameMapLanguageIds,
1032                    java.lang.String[] nameMapValues,
1033                    java.lang.String[] descriptionMapLanguageIds,
1034                    java.lang.String[] descriptionMapValues, int type,
1035                    boolean manualMembership, int membershipRestriction,
1036                    java.lang.String friendlyURL, boolean inheritContent, boolean active,
1037                    com.liferay.portal.service.ServiceContext serviceContext)
1038                    throws RemoteException {
1039                    try {
1040                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
1041                                            nameMapValues);
1042                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
1043                                            descriptionMapValues);
1044    
1045                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
1046                                            parentGroupId, nameMap, descriptionMap, type,
1047                                            manualMembership, membershipRestriction, friendlyURL,
1048                                            inheritContent, active, serviceContext);
1049    
1050                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
1051                    }
1052                    catch (Exception e) {
1053                            _log.error(e, e);
1054    
1055                            throw new RemoteException(e.getMessage());
1056                    }
1057            }
1058    
1059            /**
1060            * Updates the group.
1061            *
1062            * @param groupId the primary key of the group
1063            * @param parentGroupId the primary key of the parent group
1064            * @param name the group's name
1065            * @param description the group's new description (optionally
1066            <code>null</code>)
1067            * @param type the group's new type. For more information see {@link
1068            GroupConstants}.
1069            * @param manualMembership whether manual membership is allowed for the
1070            group
1071            * @param membershipRestriction the group's membership restriction. For
1072            more information see {@link GroupConstants}.
1073            * @param friendlyURL the group's new friendlyURL (optionally
1074            <code>null</code>)
1075            * @param active whether the group is active
1076            * @param serviceContext the service context to be applied (optionally
1077            <code>null</code>). Can set the asset category IDs and asset
1078            tag names for the group.
1079            * @return the group
1080            * @deprecated As of 7.0.0, replaced by {@link #updateGroup(long, long, Map,
1081            Map, int, boolean, int, String, boolean, boolean,
1082            ServiceContext)}
1083            */
1084            @Deprecated
1085            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
1086                    long parentGroupId, java.lang.String name,
1087                    java.lang.String description, int type, boolean manualMembership,
1088                    int membershipRestriction, java.lang.String friendlyURL,
1089                    boolean inheritContent, boolean active,
1090                    com.liferay.portal.service.ServiceContext serviceContext)
1091                    throws RemoteException {
1092                    try {
1093                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
1094                                            parentGroupId, name, description, type, manualMembership,
1095                                            membershipRestriction, friendlyURL, inheritContent, active,
1096                                            serviceContext);
1097    
1098                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
1099                    }
1100                    catch (Exception e) {
1101                            _log.error(e, e);
1102    
1103                            throw new RemoteException(e.getMessage());
1104                    }
1105            }
1106    
1107            /**
1108            * Updates the group's type settings.
1109            *
1110            * @param groupId the primary key of the group
1111            * @param typeSettings the group's new type settings (optionally
1112            <code>null</code>)
1113            * @return the group
1114            */
1115            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
1116                    java.lang.String typeSettings) throws RemoteException {
1117                    try {
1118                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
1119                                            typeSettings);
1120    
1121                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
1122                    }
1123                    catch (Exception e) {
1124                            _log.error(e, e);
1125    
1126                            throw new RemoteException(e.getMessage());
1127                    }
1128            }
1129    
1130            private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class);
1131    }