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            public static java.lang.String getGroupDisplayURL(long groupId,
389                    boolean privateLayout, boolean secureConnection)
390                    throws RemoteException {
391                    try {
392                            java.lang.String returnValue = GroupServiceUtil.getGroupDisplayURL(groupId,
393                                            privateLayout, secureConnection);
394    
395                            return returnValue;
396                    }
397                    catch (Exception e) {
398                            _log.error(e, e);
399    
400                            throw new RemoteException(e.getMessage());
401                    }
402            }
403    
404            /**
405            * Returns all the groups that are direct children of the parent group.
406            *
407            * @param companyId the primary key of the company
408            * @param parentGroupId the primary key of the parent group
409            * @param site whether the group is to be associated with a main site
410            * @return the matching groups, or <code>null</code> if no matches were
411            found
412            */
413            public static com.liferay.portal.model.GroupSoap[] getGroups(
414                    long companyId, long parentGroupId, boolean site)
415                    throws RemoteException {
416                    try {
417                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getGroups(companyId,
418                                            parentGroupId, site);
419    
420                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
421                    }
422                    catch (Exception e) {
423                            _log.error(e, e);
424    
425                            throw new RemoteException(e.getMessage());
426                    }
427            }
428    
429            /**
430            * Returns a range of all the site groups for which the user has control
431            * panel access.
432            *
433            * @param portlets the portlets to manage
434            * @param max the upper bound of the range of groups to consider (not
435            inclusive)
436            * @return the range of site groups for which the user has Control Panel
437            access
438            */
439            public static com.liferay.portal.model.GroupSoap[] getManageableSiteGroups(
440                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
441                    throws RemoteException {
442                    try {
443                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableSiteGroups(portlets,
444                                            max);
445    
446                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
447                    }
448                    catch (Exception e) {
449                            _log.error(e, e);
450    
451                            throw new RemoteException(e.getMessage());
452                    }
453            }
454    
455            /**
456            * Returns a range of all the site groups for which the user has control
457            * panel access.
458            *
459            * @param portlets the portlets to manage
460            * @param max the upper bound of the range of groups to consider (not
461            inclusive)
462            * @return the range of site groups for which the user has Control Panel
463            access
464            * @deprecated As of 6.2.0, replaced by {@link
465            #getManageableSiteGroups(Collection, int)}
466            */
467            @Deprecated
468            public static com.liferay.portal.model.GroupSoap[] getManageableSites(
469                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
470                    throws RemoteException {
471                    try {
472                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableSites(portlets,
473                                            max);
474    
475                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
476                    }
477                    catch (Exception e) {
478                            _log.error(e, e);
479    
480                            throw new RemoteException(e.getMessage());
481                    }
482            }
483    
484            /**
485            * Returns the groups associated with the organizations.
486            *
487            * @param organizations the organizations
488            * @return the groups associated with the organizations
489            */
490            public static com.liferay.portal.model.GroupSoap[] getOrganizationsGroups(
491                    com.liferay.portal.model.OrganizationSoap[] organizations)
492                    throws RemoteException {
493                    try {
494                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getOrganizationsGroups(com.liferay.portal.model.impl.OrganizationModelImpl.toModels(
495                                                    organizations));
496    
497                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
498                    }
499                    catch (Exception e) {
500                            _log.error(e, e);
501    
502                            throw new RemoteException(e.getMessage());
503                    }
504            }
505    
506            /**
507            * Returns the group directly associated with the user.
508            *
509            * @param companyId the primary key of the company
510            * @param userId the primary key of the user
511            * @return the group directly associated with the user
512            */
513            public static com.liferay.portal.model.GroupSoap getUserGroup(
514                    long companyId, long userId) throws RemoteException {
515                    try {
516                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.getUserGroup(companyId,
517                                            userId);
518    
519                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
520                    }
521                    catch (Exception e) {
522                            _log.error(e, e);
523    
524                            throw new RemoteException(e.getMessage());
525                    }
526            }
527    
528            /**
529            * Returns the groups associated with the user groups.
530            *
531            * @param userGroups the user groups
532            * @return the groups associated with the user groups
533            */
534            public static com.liferay.portal.model.GroupSoap[] getUserGroupsGroups(
535                    com.liferay.portal.model.UserGroupSoap[] userGroups)
536                    throws RemoteException {
537                    try {
538                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserGroupsGroups(com.liferay.portal.model.impl.UserGroupModelImpl.toModels(
539                                                    userGroups));
540    
541                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
542                    }
543                    catch (Exception e) {
544                            _log.error(e, e);
545    
546                            throw new RemoteException(e.getMessage());
547                    }
548            }
549    
550            /**
551            * Returns the range of all groups associated with the user's organization
552            * groups, including the ancestors of the organization groups, unless portal
553            * property <code>organizations.membership.strict</code> is set to
554            * <code>true</code>.
555            *
556            * <p>
557            * Useful when paginating results. Returns a maximum of <code>end -
558            * start</code> instances. <code>start</code> and <code>end</code> are not
559            * primary keys, they are indexes in the result set. Thus, <code>0</code>
560            * refers to the first result in the set. Setting both <code>start</code>
561            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
562            * result set.
563            * </p>
564            *
565            * @param userId the primary key of the user
566            * @param start the lower bound of the range of groups to consider
567            * @param end the upper bound of the range of groups to consider (not
568            inclusive)
569            * @return the range of groups associated with the user's organizations
570            */
571            public static com.liferay.portal.model.GroupSoap[] getUserOrganizationsGroups(
572                    long userId, int start, int end) throws RemoteException {
573                    try {
574                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserOrganizationsGroups(userId,
575                                            start, end);
576    
577                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
578                    }
579                    catch (Exception e) {
580                            _log.error(e, e);
581    
582                            throw new RemoteException(e.getMessage());
583                    }
584            }
585    
586            /**
587            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long,
588            String[], int)}
589            */
590            @Deprecated
591            public static com.liferay.portal.model.GroupSoap[] getUserPlaces(
592                    long userId, java.lang.String[] classNames,
593                    boolean includeControlPanel, int max) throws RemoteException {
594                    try {
595                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId,
596                                            classNames, includeControlPanel, max);
597    
598                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
599                    }
600                    catch (Exception e) {
601                            _log.error(e, e);
602    
603                            throw new RemoteException(e.getMessage());
604                    }
605            }
606    
607            /**
608            * Returns the user's groups &quot;sites&quot; associated with the group
609            * entity class names, including the Control Panel group if the user is
610            * permitted to view the Control Panel.
611            *
612            * <ul>
613            * <li>
614            * Class name &quot;User&quot; includes the user's layout set
615            * group.
616            * </li>
617            * <li>
618            * Class name &quot;Organization&quot; includes the user's
619            * immediate organization groups and inherited organization groups.
620            * </li>
621            * <li>
622            * Class name &quot;Group&quot; includes the user's immediate
623            * organization groups and site groups.
624            * </li>
625            * <li>
626            * A <code>classNames</code>
627            * value of <code>null</code> includes the user's layout set group,
628            * organization groups, inherited organization groups, and site groups.
629            * </li>
630            * </ul>
631            *
632            * @param userId the primary key of the user
633            * @param classNames the group entity class names (optionally
634            <code>null</code>). For more information see {@link
635            #getUserSitesGroups(long, String[], int)}.
636            * @param max the maximum number of groups to return
637            * @return the user's groups &quot;sites&quot;
638            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long,
639            String[], int)}
640            */
641            @Deprecated
642            public static com.liferay.portal.model.GroupSoap[] getUserPlaces(
643                    long userId, java.lang.String[] classNames, int max)
644                    throws RemoteException {
645                    try {
646                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId,
647                                            classNames, max);
648    
649                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
650                    }
651                    catch (Exception e) {
652                            _log.error(e, e);
653    
654                            throw new RemoteException(e.getMessage());
655                    }
656            }
657    
658            /**
659            * Returns the guest or current user's groups &quot;sites&quot; associated
660            * with the group entity class names, including the Control Panel group if
661            * the user is permitted to view the Control Panel.
662            *
663            * <ul>
664            * <li>
665            * Class name &quot;User&quot; includes the user's layout set
666            * group.
667            * </li>
668            * <li>
669            * Class name &quot;Organization&quot; includes the user's
670            * immediate organization groups and inherited organization groups.
671            * </li>
672            * <li>
673            * Class name &quot;Group&quot; includes the user's immediate
674            * organization groups and site groups.
675            * </li>
676            * <li>
677            * A <code>classNames</code>
678            * value of <code>null</code> includes the user's layout set group,
679            * organization groups, inherited organization groups, and site groups.
680            * </li>
681            * </ul>
682            *
683            * @param classNames the group entity class names (optionally
684            <code>null</code>). For more information see {@link
685            #getUserSitesGroups(String[], int)}.
686            * @param max the maximum number of groups to return
687            * @return the user's groups &quot;sites&quot;
688            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(String[],
689            int)}
690            */
691            @Deprecated
692            public static com.liferay.portal.model.GroupSoap[] getUserPlaces(
693                    java.lang.String[] classNames, int max) throws RemoteException {
694                    try {
695                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(classNames,
696                                            max);
697    
698                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
699                    }
700                    catch (Exception e) {
701                            _log.error(e, e);
702    
703                            throw new RemoteException(e.getMessage());
704                    }
705            }
706    
707            /**
708            * Returns the number of the guest or current user's groups
709            * &quot;sites&quot; associated with the group entity class names, including
710            * the Control Panel group if the user is permitted to view the Control
711            * Panel.
712            *
713            * @return the number of user's groups &quot;sites&quot;
714            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroupsCount()}
715            */
716            @Deprecated
717            public static int getUserPlacesCount() throws RemoteException {
718                    try {
719                            int returnValue = GroupServiceUtil.getUserPlacesCount();
720    
721                            return returnValue;
722                    }
723                    catch (Exception e) {
724                            _log.error(e, e);
725    
726                            throw new RemoteException(e.getMessage());
727                    }
728            }
729    
730            /**
731            * Returns the guest or current user's layout set group, organization
732            * groups, inherited organization groups, and site groups.
733            *
734            * @return the user's layout set group, organization groups, and
735            inherited organization groups, and site groups
736            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups}
737            */
738            @Deprecated
739            public static com.liferay.portal.model.GroupSoap[] getUserSites()
740                    throws RemoteException {
741                    try {
742                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSites();
743    
744                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
745                    }
746                    catch (Exception e) {
747                            _log.error(e, e);
748    
749                            throw new RemoteException(e.getMessage());
750                    }
751            }
752    
753            public static com.liferay.portal.model.GroupSoap[] getUserSitesGroups()
754                    throws RemoteException {
755                    try {
756                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSitesGroups();
757    
758                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
759                    }
760                    catch (Exception e) {
761                            _log.error(e, e);
762    
763                            throw new RemoteException(e.getMessage());
764                    }
765            }
766    
767            /**
768            * Returns the user's groups &quot;sites&quot; associated with the group
769            * entity class names, including the Control Panel group if the user is
770            * permitted to view the Control Panel.
771            *
772            * <ul>
773            * <li>
774            * Class name &quot;User&quot; includes the user's layout set
775            * group.
776            * </li>
777            * <li>
778            * Class name &quot;Organization&quot; includes the user's
779            * immediate organization groups and inherited organization groups.
780            * </li>
781            * <li>
782            * Class name &quot;Group&quot; includes the user's immediate
783            * organization groups and site groups.
784            * </li>
785            * <li>
786            * A <code>classNames</code>
787            * value of <code>null</code> includes the user's layout set group,
788            * organization groups, inherited organization groups, and site groups.
789            * </li>
790            * </ul>
791            *
792            * @param userId the primary key of the user
793            * @param classNames the group entity class names (optionally
794            <code>null</code>). For more information see {@link
795            #getUserSitesGroups(long, String[], int)}.
796            * @param max the maximum number of groups to return
797            * @return the user's groups &quot;sites&quot;
798            */
799            public static com.liferay.portal.model.GroupSoap[] getUserSitesGroups(
800                    long userId, java.lang.String[] classNames, int max)
801                    throws RemoteException {
802                    try {
803                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSitesGroups(userId,
804                                            classNames, max);
805    
806                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
807                    }
808                    catch (Exception e) {
809                            _log.error(e, e);
810    
811                            throw new RemoteException(e.getMessage());
812                    }
813            }
814    
815            /**
816            * Returns the guest or current user's groups &quot;sites&quot; associated
817            * with the group entity class names, including the Control Panel group if
818            * the user is permitted to view the Control Panel.
819            *
820            * <ul>
821            * <li>
822            * Class name &quot;User&quot; includes the user's layout set
823            * group.
824            * </li>
825            * <li>
826            * Class name &quot;Organization&quot; includes the user's
827            * immediate organization groups and inherited organization groups.
828            * </li>
829            * <li>
830            * Class name &quot;Group&quot; includes the user's immediate
831            * organization groups and site groups.
832            * </li>
833            * <li>
834            * A <code>classNames</code>
835            * value of <code>null</code> includes the user's layout set group,
836            * organization groups, inherited organization groups, and site groups.
837            * </li>
838            * </ul>
839            *
840            * @param classNames the group entity class names (optionally
841            <code>null</code>). For more information see {@link
842            #getUserSitesGroups(long, String[], int)}.
843            * @param max the maximum number of groups to return
844            * @return the user's groups &quot;sites&quot;
845            */
846            public static com.liferay.portal.model.GroupSoap[] getUserSitesGroups(
847                    java.lang.String[] classNames, int max) throws RemoteException {
848                    try {
849                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSitesGroups(classNames,
850                                            max);
851    
852                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
853                    }
854                    catch (Exception e) {
855                            _log.error(e, e);
856    
857                            throw new RemoteException(e.getMessage());
858                    }
859            }
860    
861            /**
862            * Returns the number of the guest or current user's groups
863            * &quot;sites&quot; associated with the group entity class names, including
864            * the Control Panel group if the user is permitted to view the Control
865            * Panel.
866            *
867            * @return the number of user's groups &quot;sites&quot;
868            */
869            public static int getUserSitesGroupsCount() throws RemoteException {
870                    try {
871                            int returnValue = GroupServiceUtil.getUserSitesGroupsCount();
872    
873                            return returnValue;
874                    }
875                    catch (Exception e) {
876                            _log.error(e, e);
877    
878                            throw new RemoteException(e.getMessage());
879                    }
880            }
881    
882            /**
883            * Returns <code>true</code> if the user is associated with the group,
884            * including the user's inherited organizations and user groups. System and
885            * staged groups are not included.
886            *
887            * @param userId the primary key of the user
888            * @param groupId the primary key of the group
889            * @return <code>true</code> if the user is associated with the group;
890            <code>false</code> otherwise
891            */
892            public static boolean hasUserGroup(long userId, long groupId)
893                    throws RemoteException {
894                    try {
895                            boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId);
896    
897                            return returnValue;
898                    }
899                    catch (Exception e) {
900                            _log.error(e, e);
901    
902                            throw new RemoteException(e.getMessage());
903                    }
904            }
905    
906            /**
907            * Returns an ordered range of all the site groups and organization groups
908            * that match the name and description, optionally including the user's
909            * inherited organization groups and user groups. System and staged groups
910            * are not included.
911            *
912            * <p>
913            * Useful when paginating results. Returns a maximum of <code>end -
914            * start</code> instances. <code>start</code> and <code>end</code> are not
915            * primary keys, they are indexes in the result set. Thus, <code>0</code>
916            * refers to the first result in the set. Setting both <code>start</code>
917            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
918            * result set.
919            * </p>
920            *
921            * @param companyId the primary key of the company
922            * @param name the group's name (optionally <code>null</code>)
923            * @param description the group's description (optionally
924            <code>null</code>)
925            * @param params the finder params (optionally <code>null</code>). To
926            include the user's inherited organizations and user groups in the
927            search, add entries having &quot;usersGroups&quot; and
928            &quot;inherit&quot; as keys mapped to the the user's ID. For more
929            information see {@link
930            com.liferay.portal.service.persistence.GroupFinder}.
931            * @param start the lower bound of the range of groups to return
932            * @param end the upper bound of the range of groups to return (not
933            inclusive)
934            * @return the matching groups ordered by name
935            */
936            public static com.liferay.portal.model.GroupSoap[] search(long companyId,
937                    java.lang.String name, java.lang.String description,
938                    java.lang.String[] params, int start, int end)
939                    throws RemoteException {
940                    try {
941                            java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.search(companyId,
942                                            name, description, params, start, end);
943    
944                            return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
945                    }
946                    catch (Exception e) {
947                            _log.error(e, e);
948    
949                            throw new RemoteException(e.getMessage());
950                    }
951            }
952    
953            /**
954            * Returns the number of groups and organization groups that match the name
955            * and description, optionally including the user's inherited organizations
956            * and user groups. System and staged groups are not included.
957            *
958            * @param companyId the primary key of the company
959            * @param name the group's name (optionally <code>null</code>)
960            * @param description the group's description (optionally
961            <code>null</code>)
962            * @param params the finder params (optionally <code>null</code>). To
963            include the user's inherited organizations and user groups in the
964            search, add entries having &quot;usersGroups&quot; and
965            &quot;inherit&quot; as keys mapped to the the user's ID. For more
966            information see {@link
967            com.liferay.portal.service.persistence.GroupFinder}.
968            * @return the number of matching groups
969            */
970            public static int searchCount(long companyId, java.lang.String name,
971                    java.lang.String description, java.lang.String[] params)
972                    throws RemoteException {
973                    try {
974                            int returnValue = GroupServiceUtil.searchCount(companyId, name,
975                                            description, params);
976    
977                            return returnValue;
978                    }
979                    catch (Exception e) {
980                            _log.error(e, e);
981    
982                            throw new RemoteException(e.getMessage());
983                    }
984            }
985    
986            /**
987            * Sets the groups associated with the role, removing and adding
988            * associations as necessary.
989            *
990            * @param roleId the primary key of the role
991            * @param groupIds the primary keys of the groups
992            */
993            public static void setRoleGroups(long roleId, long[] groupIds)
994                    throws RemoteException {
995                    try {
996                            GroupServiceUtil.setRoleGroups(roleId, groupIds);
997                    }
998                    catch (Exception e) {
999                            _log.error(e, e);
1000    
1001                            throw new RemoteException(e.getMessage());
1002                    }
1003            }
1004    
1005            /**
1006            * Removes the groups from the role.
1007            *
1008            * @param roleId the primary key of the role
1009            * @param groupIds the primary keys of the groups
1010            */
1011            public static void unsetRoleGroups(long roleId, long[] groupIds)
1012                    throws RemoteException {
1013                    try {
1014                            GroupServiceUtil.unsetRoleGroups(roleId, groupIds);
1015                    }
1016                    catch (Exception e) {
1017                            _log.error(e, e);
1018    
1019                            throw new RemoteException(e.getMessage());
1020                    }
1021            }
1022    
1023            /**
1024            * Updates the group's friendly URL.
1025            *
1026            * @param groupId the primary key of the group
1027            * @param friendlyURL the group's new friendlyURL (optionally
1028            <code>null</code>)
1029            * @return the group
1030            */
1031            public static com.liferay.portal.model.GroupSoap updateFriendlyURL(
1032                    long groupId, java.lang.String friendlyURL) throws RemoteException {
1033                    try {
1034                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId,
1035                                            friendlyURL);
1036    
1037                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
1038                    }
1039                    catch (Exception e) {
1040                            _log.error(e, e);
1041    
1042                            throw new RemoteException(e.getMessage());
1043                    }
1044            }
1045    
1046            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
1047                    long parentGroupId, java.lang.String[] nameMapLanguageIds,
1048                    java.lang.String[] nameMapValues,
1049                    java.lang.String[] descriptionMapLanguageIds,
1050                    java.lang.String[] descriptionMapValues, int type,
1051                    boolean manualMembership, int membershipRestriction,
1052                    java.lang.String friendlyURL, boolean inheritContent, boolean active,
1053                    com.liferay.portal.service.ServiceContext serviceContext)
1054                    throws RemoteException {
1055                    try {
1056                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
1057                                            nameMapValues);
1058                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
1059                                            descriptionMapValues);
1060    
1061                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
1062                                            parentGroupId, nameMap, descriptionMap, type,
1063                                            manualMembership, membershipRestriction, friendlyURL,
1064                                            inheritContent, active, serviceContext);
1065    
1066                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
1067                    }
1068                    catch (Exception e) {
1069                            _log.error(e, e);
1070    
1071                            throw new RemoteException(e.getMessage());
1072                    }
1073            }
1074    
1075            /**
1076            * Updates the group.
1077            *
1078            * @param groupId the primary key of the group
1079            * @param parentGroupId the primary key of the parent group
1080            * @param name the group's name
1081            * @param description the group's new description (optionally
1082            <code>null</code>)
1083            * @param type the group's new type. For more information see {@link
1084            GroupConstants}.
1085            * @param manualMembership whether manual membership is allowed for the
1086            group
1087            * @param membershipRestriction the group's membership restriction. For
1088            more information see {@link GroupConstants}.
1089            * @param friendlyURL the group's new friendlyURL (optionally
1090            <code>null</code>)
1091            * @param active whether the group is active
1092            * @param serviceContext the service context to be applied (optionally
1093            <code>null</code>). Can set the asset category IDs and asset
1094            tag names for the group.
1095            * @return the group
1096            * @deprecated As of 7.0.0, replaced by {@link #updateGroup(long, long, Map,
1097            Map, int, boolean, int, String, boolean, boolean,
1098            ServiceContext)}
1099            */
1100            @Deprecated
1101            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
1102                    long parentGroupId, java.lang.String name,
1103                    java.lang.String description, int type, boolean manualMembership,
1104                    int membershipRestriction, java.lang.String friendlyURL,
1105                    boolean inheritContent, boolean active,
1106                    com.liferay.portal.service.ServiceContext serviceContext)
1107                    throws RemoteException {
1108                    try {
1109                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
1110                                            parentGroupId, name, description, type, manualMembership,
1111                                            membershipRestriction, friendlyURL, inheritContent, active,
1112                                            serviceContext);
1113    
1114                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
1115                    }
1116                    catch (Exception e) {
1117                            _log.error(e, e);
1118    
1119                            throw new RemoteException(e.getMessage());
1120                    }
1121            }
1122    
1123            /**
1124            * Updates the group's type settings.
1125            *
1126            * @param groupId the primary key of the group
1127            * @param typeSettings the group's new type settings (optionally
1128            <code>null</code>)
1129            * @return the group
1130            */
1131            public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
1132                    java.lang.String typeSettings) throws RemoteException {
1133                    try {
1134                            com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
1135                                            typeSettings);
1136    
1137                            return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
1138                    }
1139                    catch (Exception e) {
1140                            _log.error(e, e);
1141    
1142                            throw new RemoteException(e.getMessage());
1143                    }
1144            }
1145    
1146            private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class);
1147    }