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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
022    import com.liferay.portal.kernel.security.access.control.AccessControlled;
023    import com.liferay.portal.kernel.transaction.Isolation;
024    import com.liferay.portal.kernel.transaction.Propagation;
025    import com.liferay.portal.kernel.transaction.Transactional;
026    
027    /**
028     * Provides the remote service interface for Group. Methods of this
029     * service are expected to have security checks based on the propagated JAAS
030     * credentials because this service can be accessed remotely.
031     *
032     * @author Brian Wing Shun Chan
033     * @see GroupServiceUtil
034     * @see com.liferay.portal.service.base.GroupServiceBaseImpl
035     * @see com.liferay.portal.service.impl.GroupServiceImpl
036     * @generated
037     */
038    @AccessControlled
039    @JSONWebService
040    @ProviderType
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface GroupService extends BaseService {
044            /*
045             * NOTE FOR DEVELOPERS:
046             *
047             * Never modify or reference this interface directly. Always use {@link GroupServiceUtil} to access the group remote service. Add custom service methods to {@link com.liferay.portal.service.impl.GroupServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
048             */
049    
050            /**
051            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, String,
052            String, int, String, boolean, boolean, ServiceContext)}
053            */
054            @java.lang.Deprecated
055            public com.liferay.portal.model.Group addGroup(java.lang.String name,
056                    java.lang.String description, int type, java.lang.String friendlyURL,
057                    boolean site, boolean active,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws PortalException;
060    
061            /**
062            * Adds a group.
063            *
064            * @param parentGroupId the primary key of the parent group
065            * @param liveGroupId the primary key of the live group
066            * @param name the entity's name
067            * @param description the group's description (optionally
068            <code>null</code>)
069            * @param type the group's type. For more information see {@link
070            GroupConstants}.
071            * @param manualMembership whether manual membership is allowed for the
072            group
073            * @param membershipRestriction the group's membership restriction. For
074            more information see {@link GroupConstants}.
075            * @param friendlyURL the group's friendlyURL (optionally
076            <code>null</code>)
077            * @param site whether the group is to be associated with a main site
078            * @param active whether the group is active
079            * @param serviceContext the service context to be applied (optionally
080            <code>null</code>). Can set the asset category IDs and asset
081            tag names for the group, and can set whether the group is for
082            staging
083            * @return the group
084            * @throws PortalException if the user did not have permission to add
085            the group, if a creator could not be found, if the group's
086            information was invalid, if a layout could not be found, or
087            if a valid friendly URL could not be created for the group
088            * @deprecated As of 7.0.0, replaced by {@link #addGroup(long, long, Map,
089            Map, int, boolean, int, String, boolean, boolean,
090            ServiceContext)}
091            */
092            @java.lang.Deprecated
093            public com.liferay.portal.model.Group addGroup(long parentGroupId,
094                    long liveGroupId, java.lang.String name, java.lang.String description,
095                    int type, boolean manualMembership, int membershipRestriction,
096                    java.lang.String friendlyURL, boolean site, boolean active,
097                    com.liferay.portal.service.ServiceContext serviceContext)
098                    throws PortalException;
099    
100            public com.liferay.portal.model.Group addGroup(long parentGroupId,
101                    long liveGroupId,
102                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
103                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
104                    int type, boolean manualMembership, int membershipRestriction,
105                    java.lang.String friendlyURL, boolean site, boolean active,
106                    com.liferay.portal.service.ServiceContext serviceContext)
107                    throws PortalException;
108    
109            public com.liferay.portal.model.Group addGroup(long parentGroupId,
110                    long liveGroupId,
111                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
112                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
113                    int type, boolean manualMembership, int membershipRestriction,
114                    java.lang.String friendlyURL, boolean site, boolean inheritContent,
115                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
116                    throws PortalException;
117    
118            /**
119            * Adds the group using the group default live group ID.
120            *
121            * @param parentGroupId the primary key of the parent group
122            * @param name the entity's name
123            * @param description the group's description (optionally
124            <code>null</code>)
125            * @param type the group's type. For more information see {@link
126            GroupConstants}.
127            * @param friendlyURL the group's friendlyURL
128            * @param site whether the group is to be associated with a main site
129            * @param active whether the group is active
130            * @param serviceContext the service context to be applied (optionally
131            <code>null</code>). Can set asset category IDs and asset tag
132            names for the group, and can set whether the group is for
133            staging
134            * @return the group
135            * @throws PortalException if the user did not have permission to add
136            the group, if a creator could not be found, if the group's
137            information was invalid, if a layout could not be found, or
138            if a valid friendly URL could not be created for the group
139            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, Map,
140            Map, int, boolean, int, String, boolean, boolean,
141            ServiceContext)}
142            */
143            @java.lang.Deprecated
144            public com.liferay.portal.model.Group addGroup(long parentGroupId,
145                    java.lang.String name, java.lang.String description, int type,
146                    java.lang.String friendlyURL, boolean site, boolean active,
147                    com.liferay.portal.service.ServiceContext serviceContext)
148                    throws PortalException;
149    
150            /**
151            * Adds the groups to the role.
152            *
153            * @param roleId the primary key of the role
154            * @param groupIds the primary keys of the groups
155            * @throws PortalException if the user did not have permission to update the
156            role
157            */
158            public void addRoleGroups(long roleId, long[] groupIds)
159                    throws PortalException;
160    
161            /**
162            * Checks that the current user is permitted to use the group for Remote
163            * Staging.
164            *
165            * @param groupId the primary key of the group
166            * @throws PortalException if a group with the primary key could not be
167            found, if the current user did not have permission to view the
168            group, or if the group's company was different from the current
169            user's company
170            */
171            public void checkRemoteStagingGroup(long groupId) throws PortalException;
172    
173            /**
174            * Deletes the group.
175            *
176            * <p>
177            * The group is unstaged and its assets and resources including layouts,
178            * membership requests, subscriptions, teams, blogs, bookmarks, calendar
179            * events, image gallery, journals, message boards, polls, shopping related
180            * entities, software catalog, and wikis are also deleted.
181            * </p>
182            *
183            * @param groupId the primary key of the group
184            * @throws PortalException if the user did not have permission to delete the
185            group or its assets or resources, if a group with the primary key
186            could not be found, or if the group was a system group
187            */
188            public void deleteGroup(long groupId) throws PortalException;
189    
190            public void disableStaging(long groupId) throws PortalException;
191    
192            public void enableStaging(long groupId) throws PortalException;
193    
194            /**
195            * Returns the Spring bean ID for this bean.
196            *
197            * @return the Spring bean ID for this bean
198            */
199            public java.lang.String getBeanIdentifier();
200    
201            /**
202            * Returns the company group.
203            *
204            * @param companyId the primary key of the company
205            * @return the group associated with the company
206            * @throws PortalException if a matching group could not be found
207            */
208            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209            public com.liferay.portal.model.Group getCompanyGroup(long companyId)
210                    throws PortalException;
211    
212            /**
213            * Returns the group with the name.
214            *
215            * @param companyId the primary key of the company
216            * @param groupKey the group key
217            * @return the group with the group key
218            * @throws PortalException if a matching group could not be found or if the
219            current user did not have permission to view the group
220            */
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public com.liferay.portal.model.Group getGroup(long companyId,
223                    java.lang.String groupKey) throws PortalException;
224    
225            /**
226            * Returns the group with the primary key.
227            *
228            * @param groupId the primary key of the group
229            * @return the group with the primary key
230            * @throws PortalException if a group with the primary key could not be
231            found or if the current user did not have permission to view the
232            group
233            */
234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235            public com.liferay.portal.model.Group getGroup(long groupId)
236                    throws PortalException;
237    
238            /**
239            * Returns all the groups that are direct children of the parent group.
240            *
241            * @param companyId the primary key of the company
242            * @param parentGroupId the primary key of the parent group
243            * @param site whether the group is to be associated with a main site
244            * @return the matching groups, or <code>null</code> if no matches were
245            found
246            * @throws PortalException if the user did not have permission to view the
247            group or if a portal exception occurred
248            */
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public java.util.List<com.liferay.portal.model.Group> getGroups(
251                    long companyId, long parentGroupId, boolean site)
252                    throws PortalException;
253    
254            /**
255            * Returns a range of all the site groups for which the user has control
256            * panel access.
257            *
258            * @param portlets the portlets to manage
259            * @param max the upper bound of the range of groups to consider (not
260            inclusive)
261            * @return the range of site groups for which the user has Control Panel
262            access
263            * @throws PortalException if a portal exception occurred
264            */
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public java.util.List<com.liferay.portal.model.Group> getManageableSiteGroups(
267                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
268                    throws PortalException;
269    
270            /**
271            * Returns a range of all the site groups for which the user has control
272            * panel access.
273            *
274            * @param portlets the portlets to manage
275            * @param max the upper bound of the range of groups to consider (not
276            inclusive)
277            * @return the range of site groups for which the user has Control Panel
278            access
279            * @throws PortalException if a portal exception occurred
280            * @deprecated As of 6.2.0, replaced by {@link
281            #getManageableSiteGroups(Collection, int)}
282            */
283            @java.lang.Deprecated
284            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285            public java.util.List<com.liferay.portal.model.Group> getManageableSites(
286                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
287                    throws PortalException;
288    
289            /**
290            * Returns the groups associated with the organizations.
291            *
292            * @param organizations the organizations
293            * @return the groups associated with the organizations
294            * @throws PortalException if a portal exception occurred
295            */
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
298                    java.util.List<com.liferay.portal.model.Organization> organizations)
299                    throws PortalException;
300    
301            /**
302            * Returns the group directly associated with the user.
303            *
304            * @param companyId the primary key of the company
305            * @param userId the primary key of the user
306            * @return the group directly associated with the user
307            * @throws PortalException if a matching group could not be found or if the
308            current user did not have permission to view the group
309            */
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public com.liferay.portal.model.Group getUserGroup(long companyId,
312                    long userId) throws PortalException;
313    
314            /**
315            * Returns the groups associated with the user groups.
316            *
317            * @param userGroups the user groups
318            * @return the groups associated with the user groups
319            * @throws PortalException if any one of the user group's group could not be
320            found
321            */
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
324                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
325                    throws PortalException;
326    
327            /**
328            * Returns the range of all groups associated with the user's organization
329            * groups, including the ancestors of the organization groups, unless portal
330            * property <code>organizations.membership.strict</code> is set to
331            * <code>true</code>.
332            *
333            * <p>
334            * Useful when paginating results. Returns a maximum of <code>end -
335            * start</code> instances. <code>start</code> and <code>end</code> are not
336            * primary keys, they are indexes in the result set. Thus, <code>0</code>
337            * refers to the first result in the set. Setting both <code>start</code>
338            * and <code>end</code> to {@link
339            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
340            * result set.
341            * </p>
342            *
343            * @param userId the primary key of the user
344            * @param start the lower bound of the range of groups to consider
345            * @param end the upper bound of the range of groups to consider (not
346            inclusive)
347            * @return the range of groups associated with the user's organizations
348            * @throws PortalException if a user with the primary key could not be found
349            or if another portal exception occurred
350            */
351            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352            public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
353                    long userId, int start, int end) throws PortalException;
354    
355            /**
356            * Returns the guest or current user's groups &quot;sites&quot; associated
357            * with the group entity class names, including the Control Panel group if
358            * the user is permitted to view the Control Panel.
359            *
360            * <ul>
361            * <li>
362            * Class name &quot;User&quot; includes the user's layout set
363            * group.
364            * </li>
365            * <li>
366            * Class name &quot;Organization&quot; includes the user's
367            * immediate organization groups and inherited organization groups.
368            * </li>
369            * <li>
370            * Class name &quot;Group&quot; includes the user's immediate
371            * organization groups and site groups.
372            * </li>
373            * <li>
374            * A <code>classNames</code>
375            * value of <code>null</code> includes the user's layout set group,
376            * organization groups, inherited organization groups, and site groups.
377            * </li>
378            * </ul>
379            *
380            * @param classNames the group entity class names (optionally
381            <code>null</code>). For more information see {@link
382            #getUserSitesGroups(String[], int)}.
383            * @param max the maximum number of groups to return
384            * @return the user's groups &quot;sites&quot;
385            * @throws PortalException if a portal exception occurred
386            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(String[],
387            int)}
388            */
389            @java.lang.Deprecated
390            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391            public java.util.List<com.liferay.portal.model.Group> getUserPlaces(
392                    java.lang.String[] classNames, int max) throws PortalException;
393    
394            /**
395            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long,
396            String[], boolean, int)}
397            */
398            @java.lang.Deprecated
399            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
400            public java.util.List<com.liferay.portal.model.Group> getUserPlaces(
401                    long userId, java.lang.String[] classNames,
402                    boolean includeControlPanel, int max) throws PortalException;
403    
404            /**
405            * Returns the user's groups &quot;sites&quot; associated with the group
406            * entity class names, including the Control Panel group if the user is
407            * permitted to view the Control Panel.
408            *
409            * <ul>
410            * <li>
411            * Class name &quot;User&quot; includes the user's layout set
412            * group.
413            * </li>
414            * <li>
415            * Class name &quot;Organization&quot; includes the user's
416            * immediate organization groups and inherited organization groups.
417            * </li>
418            * <li>
419            * Class name &quot;Group&quot; includes the user's immediate
420            * organization groups and site groups.
421            * </li>
422            * <li>
423            * A <code>classNames</code>
424            * value of <code>null</code> includes the user's layout set group,
425            * organization groups, inherited organization groups, and site groups.
426            * </li>
427            * </ul>
428            *
429            * @param userId the primary key of the user
430            * @param classNames the group entity class names (optionally
431            <code>null</code>). For more information see {@link
432            #getUserSitesGroups(long, String[], int)}.
433            * @param max the maximum number of groups to return
434            * @return the user's groups &quot;sites&quot;
435            * @throws PortalException if a portal exception occurred
436            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups(long,
437            String[], int)}
438            */
439            @java.lang.Deprecated
440            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
441            public java.util.List<com.liferay.portal.model.Group> getUserPlaces(
442                    long userId, java.lang.String[] classNames, int max)
443                    throws PortalException;
444    
445            /**
446            * Returns the number of the guest or current user's groups
447            * &quot;sites&quot; associated with the group entity class names, including
448            * the Control Panel group if the user is permitted to view the Control
449            * Panel.
450            *
451            * @return the number of user's groups &quot;sites&quot;
452            * @throws PortalException if a portal exception occurred
453            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroupsCount()}
454            */
455            @java.lang.Deprecated
456            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
457            public int getUserPlacesCount() throws PortalException;
458    
459            /**
460            * Returns the guest or current user's layout set group, organization
461            * groups, inherited organization groups, and site groups.
462            *
463            * @return the user's layout set group, organization groups, and
464            inherited organization groups, and site groups
465            * @throws PortalException if a portal exception occurred
466            * @deprecated As of 6.2.0, replaced by {@link #getUserSitesGroups}
467            */
468            @java.lang.Deprecated
469            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
470            public java.util.List<com.liferay.portal.model.Group> getUserSites()
471                    throws PortalException;
472    
473            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
474            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups()
475                    throws PortalException;
476    
477            /**
478            * Returns the guest or current user's groups &quot;sites&quot; associated
479            * with the group entity class names, including the Control Panel group if
480            * the user is permitted to view the Control Panel.
481            *
482            * <ul>
483            * <li>
484            * Class name &quot;User&quot; includes the user's layout set
485            * group.
486            * </li>
487            * <li>
488            * Class name &quot;Organization&quot; includes the user's
489            * immediate organization groups and inherited organization groups.
490            * </li>
491            * <li>
492            * Class name &quot;Group&quot; includes the user's immediate
493            * organization groups and site groups.
494            * </li>
495            * <li>
496            * A <code>classNames</code>
497            * value of <code>null</code> includes the user's layout set group,
498            * organization groups, inherited organization groups, and site groups.
499            * </li>
500            * </ul>
501            *
502            * @param classNames the group entity class names (optionally
503            <code>null</code>). For more information see {@link
504            #getUserSitesGroups(long, String[], boolean, int)}.
505            * @param max the maximum number of groups to return
506            * @return the user's groups &quot;sites&quot;
507            * @throws PortalException if a portal exception occurred
508            */
509            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
510            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups(
511                    java.lang.String[] classNames, int max) throws PortalException;
512    
513            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
514            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups(
515                    long userId, java.lang.String[] classNames,
516                    boolean includeControlPanel, int max) throws PortalException;
517    
518            /**
519            * Returns the user's groups &quot;sites&quot; associated with the group
520            * entity class names, including the Control Panel group if the user is
521            * permitted to view the Control Panel.
522            *
523            * <ul>
524            * <li>
525            * Class name &quot;User&quot; includes the user's layout set
526            * group.
527            * </li>
528            * <li>
529            * Class name &quot;Organization&quot; includes the user's
530            * immediate organization groups and inherited organization groups.
531            * </li>
532            * <li>
533            * Class name &quot;Group&quot; includes the user's immediate
534            * organization groups and site groups.
535            * </li>
536            * <li>
537            * A <code>classNames</code>
538            * value of <code>null</code> includes the user's layout set group,
539            * organization groups, inherited organization groups, and site groups.
540            * </li>
541            * </ul>
542            *
543            * @param userId the primary key of the user
544            * @param classNames the group entity class names (optionally
545            <code>null</code>). For more information see {@link
546            #getUserSitesGroups(long, String[], boolean, int)}.
547            * @param max the maximum number of groups to return
548            * @return the user's groups &quot;sites&quot;
549            * @throws PortalException if a portal exception occurred
550            */
551            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
552            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups(
553                    long userId, java.lang.String[] classNames, int max)
554                    throws PortalException;
555    
556            /**
557            * Returns the number of the guest or current user's groups
558            * &quot;sites&quot; associated with the group entity class names, including
559            * the Control Panel group if the user is permitted to view the Control
560            * Panel.
561            *
562            * @return the number of user's groups &quot;sites&quot;
563            * @throws PortalException if a portal exception occurred
564            */
565            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
566            public int getUserSitesGroupsCount() throws PortalException;
567    
568            /**
569            * Returns <code>true</code> if the user is associated with the group,
570            * including the user's inherited organizations and user groups. System and
571            * staged groups are not included.
572            *
573            * @param userId the primary key of the user
574            * @param groupId the primary key of the group
575            * @return <code>true</code> if the user is associated with the group;
576            <code>false</code> otherwise
577            * @throws PortalException if the current user did not have permission to
578            view the user or group members
579            */
580            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
581            public boolean hasUserGroup(long userId, long groupId)
582                    throws PortalException;
583    
584            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
585            public java.util.List<com.liferay.portal.model.Group> search(
586                    long companyId, long[] classNameIds, java.lang.String keywords,
587                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
588                    int start, int end,
589                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc)
590                    throws PortalException;
591    
592            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
593            public java.util.List<com.liferay.portal.model.Group> search(
594                    long companyId, long[] classNameIds, java.lang.String name,
595                    java.lang.String description,
596                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
597                    boolean andOperator, int start, int end,
598                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc)
599                    throws PortalException;
600    
601            /**
602            * Returns an ordered range of all the site groups and organization groups
603            * that match the name and description, optionally including the user's
604            * inherited organization groups and user groups. System and staged groups
605            * are not included.
606            *
607            * <p>
608            * Useful when paginating results. Returns a maximum of <code>end -
609            * start</code> instances. <code>start</code> and <code>end</code> are not
610            * primary keys, they are indexes in the result set. Thus, <code>0</code>
611            * refers to the first result in the set. Setting both <code>start</code>
612            * and <code>end</code> to {@link
613            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
614            * result set.
615            * </p>
616            *
617            * @param companyId the primary key of the company
618            * @param name the group's name (optionally <code>null</code>)
619            * @param description the group's description (optionally
620            <code>null</code>)
621            * @param params the finder params (optionally <code>null</code>). To
622            include the user's inherited organizations and user groups in the
623            search, add entries having &quot;usersGroups&quot; and
624            &quot;inherit&quot; as keys mapped to the the user's ID. For more
625            information see {@link
626            com.liferay.portal.service.persistence.GroupFinder}.
627            * @param start the lower bound of the range of groups to return
628            * @param end the upper bound of the range of groups to return (not
629            inclusive)
630            * @return the matching groups ordered by name
631            * @throws PortalException if a portal exception occurred
632            */
633            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
634            public java.util.List<com.liferay.portal.model.Group> search(
635                    long companyId, java.lang.String name, java.lang.String description,
636                    java.lang.String[] params, int start, int end)
637                    throws PortalException;
638    
639            /**
640            * Returns the number of groups and organization groups that match the name
641            * and description, optionally including the user's inherited organizations
642            * and user groups. System and staged groups are not included.
643            *
644            * @param companyId the primary key of the company
645            * @param name the group's name (optionally <code>null</code>)
646            * @param description the group's description (optionally
647            <code>null</code>)
648            * @param params the finder params (optionally <code>null</code>). To
649            include the user's inherited organizations and user groups in the
650            search, add entries having &quot;usersGroups&quot; and
651            &quot;inherit&quot; as keys mapped to the the user's ID. For more
652            information see {@link
653            com.liferay.portal.service.persistence.GroupFinder}.
654            * @return the number of matching groups
655            */
656            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
657            public int searchCount(long companyId, java.lang.String name,
658                    java.lang.String description, java.lang.String[] params);
659    
660            /**
661            * Sets the Spring bean ID for this bean.
662            *
663            * @param beanIdentifier the Spring bean ID for this bean
664            */
665            public void setBeanIdentifier(java.lang.String beanIdentifier);
666    
667            /**
668            * Sets the groups associated with the role, removing and adding
669            * associations as necessary.
670            *
671            * @param roleId the primary key of the role
672            * @param groupIds the primary keys of the groups
673            * @throws PortalException if the user did not have permission to update
674            update the role
675            */
676            public void setRoleGroups(long roleId, long[] groupIds)
677                    throws PortalException;
678    
679            /**
680            * Removes the groups from the role.
681            *
682            * @param roleId the primary key of the role
683            * @param groupIds the primary keys of the groups
684            * @throws PortalException if the user did not have permission to update the
685            role
686            */
687            public void unsetRoleGroups(long roleId, long[] groupIds)
688                    throws PortalException;
689    
690            /**
691            * Updates the group's friendly URL.
692            *
693            * @param groupId the primary key of the group
694            * @param friendlyURL the group's new friendlyURL (optionally
695            <code>null</code>)
696            * @return the group
697            * @throws PortalException if the user did not have permission to update the
698            group, if a group with the primary key could not be found, or if
699            a valid friendly URL could not be created for the group
700            */
701            public com.liferay.portal.model.Group updateFriendlyURL(long groupId,
702                    java.lang.String friendlyURL) throws PortalException;
703    
704            /**
705            * Updates the group.
706            *
707            * @param groupId the primary key of the group
708            * @param parentGroupId the primary key of the parent group
709            * @param name the group's name
710            * @param description the group's new description (optionally
711            <code>null</code>)
712            * @param type the group's new type. For more information see {@link
713            GroupConstants}.
714            * @param manualMembership whether manual membership is allowed for the
715            group
716            * @param membershipRestriction the group's membership restriction. For
717            more information see {@link GroupConstants}.
718            * @param friendlyURL the group's new friendlyURL (optionally
719            <code>null</code>)
720            * @param active whether the group is active
721            * @param serviceContext the service context to be applied (optionally
722            <code>null</code>). Can set the asset category IDs and asset
723            tag names for the group.
724            * @return the group
725            * @throws PortalException if the user did not have permission to update
726            the group, if a group with the primary key could not be
727            found, if the friendly URL was invalid or could one not be
728            created
729            * @deprecated As of 7.0.0, replaced by {@link #updateGroup(long, long, Map,
730            Map, int, boolean, int, String, boolean, boolean,
731            ServiceContext)}
732            */
733            @java.lang.Deprecated
734            public com.liferay.portal.model.Group updateGroup(long groupId,
735                    long parentGroupId, java.lang.String name,
736                    java.lang.String description, int type, boolean manualMembership,
737                    int membershipRestriction, java.lang.String friendlyURL,
738                    boolean inheritContent, boolean active,
739                    com.liferay.portal.service.ServiceContext serviceContext)
740                    throws PortalException;
741    
742            public com.liferay.portal.model.Group updateGroup(long groupId,
743                    long parentGroupId,
744                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
745                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
746                    int type, boolean manualMembership, int membershipRestriction,
747                    java.lang.String friendlyURL, boolean inheritContent, boolean active,
748                    com.liferay.portal.service.ServiceContext serviceContext)
749                    throws PortalException;
750    
751            /**
752            * Updates the group's type settings.
753            *
754            * @param groupId the primary key of the group
755            * @param typeSettings the group's new type settings (optionally
756            <code>null</code>)
757            * @return the group
758            * @throws PortalException if the user did not have permission to update the
759            group or if a group with the primary key could not be found
760            */
761            public com.liferay.portal.model.Group updateGroup(long groupId,
762                    java.lang.String typeSettings) throws PortalException;
763    
764            public void updateStagedPortlets(long groupId,
765                    java.util.Map<java.lang.String, java.lang.String> stagedPortletIds)
766                    throws PortalException;
767    }