001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    /**
018     * <p>
019     * This class is a wrapper for {@link GroupService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       GroupService
024     * @generated
025     */
026    public class GroupServiceWrapper implements GroupService,
027            ServiceWrapper<GroupService> {
028            public GroupServiceWrapper(GroupService groupService) {
029                    _groupService = groupService;
030            }
031    
032            /**
033            * Adds a group.
034            *
035            * @param liveGroupId the primary key of the live group
036            * @param name the entity's name
037            * @param description the group's description (optionally
038            <code>null</code>)
039            * @param type the group's type. For more information see {@link
040            com.liferay.portal.model.GroupConstants}
041            * @param friendlyURL the group's friendlyURL (optionally
042            <code>null</code>)
043            * @param site whether the group is to be associated with a main site
044            * @param active whether the group is active
045            * @param serviceContext the service context to be applied (optionally
046            <code>null</code>). Can specify the group's asset category IDs,
047            asset tag names, and whether the group is for staging
048            * @return the group
049            * @throws PortalException if the user did not have permission to add the
050            group, if a creator could not be found, if the group's
051            information was invalid, if a layout could not be found, or if a
052            valid friendly URL could not be created for the group
053            * @throws SystemException if a system exception occurred
054            */
055            public com.liferay.portal.model.Group addGroup(long liveGroupId,
056                    java.lang.String name, java.lang.String description, int type,
057                    java.lang.String friendlyURL, boolean site, boolean active,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws com.liferay.portal.kernel.exception.PortalException,
060                            com.liferay.portal.kernel.exception.SystemException {
061                    return _groupService.addGroup(liveGroupId, name, description, type,
062                            friendlyURL, site, active, serviceContext);
063            }
064    
065            /**
066            * Adds the group using the group default live group ID.
067            *
068            * @param name the entity's name
069            * @param description the group's description (optionally
070            <code>null</code>)
071            * @param type the group's type. For more information see {@link
072            com.liferay.portal.model.GroupConstants}
073            * @param friendlyURL the group's friendlyURL
074            * @param site whether the group is to be associated with a main site
075            * @param active whether the group is active
076            * @param serviceContext the service context to be applied (optionally
077            <code>null</code>). Can specify the group's asset category IDs,
078            asset tag names, and whether the group is for staging
079            * @return the group
080            * @throws PortalException if the user did not have permission to add the
081            group, if a creator could not be found, if the group's
082            information was invalid, if a layout could not be found, or if a
083            valid friendly URL could not be created for the group
084            * @throws SystemException if a system exception occurred
085            */
086            public com.liferay.portal.model.Group addGroup(java.lang.String name,
087                    java.lang.String description, int type, java.lang.String friendlyURL,
088                    boolean site, boolean active,
089                    com.liferay.portal.service.ServiceContext serviceContext)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException {
092                    return _groupService.addGroup(name, description, type, friendlyURL,
093                            site, active, serviceContext);
094            }
095    
096            /**
097            * Adds the groups to the role.
098            *
099            * @param roleId the primary key of the role
100            * @param groupIds the primary keys of the groups
101            * @throws PortalException if the user did not have permission to update the
102            role
103            * @throws SystemException if a system exception occurred
104            */
105            public void addRoleGroups(long roleId, long[] groupIds)
106                    throws com.liferay.portal.kernel.exception.PortalException,
107                            com.liferay.portal.kernel.exception.SystemException {
108                    _groupService.addRoleGroups(roleId, groupIds);
109            }
110    
111            /**
112            * Deletes the group.
113            *
114            * <p>
115            * The group is unstaged and its assets and resources including layouts,
116            * membership requests, subscriptions, teams, blogs, bookmarks, calendar
117            * events, image gallery, journals, message boards, polls, shopping related
118            * entities, software catalog, and wikis are also deleted.
119            * </p>
120            *
121            * @param groupId the primary key of the group
122            * @throws PortalException if the user did not have permission to delete the
123            group or its assets or resources, if a group with the primary key
124            could not be found, or if the group was a system group
125            * @throws SystemException if a system exception occurred
126            */
127            public void deleteGroup(long groupId)
128                    throws com.liferay.portal.kernel.exception.PortalException,
129                            com.liferay.portal.kernel.exception.SystemException {
130                    _groupService.deleteGroup(groupId);
131            }
132    
133            /**
134            * Returns the group with the primary key.
135            *
136            * @param groupId the primary key of the group
137            * @return the group with the primary key
138            * @throws PortalException if a group with the primary key could not be
139            found or if the current user did not have permission to view the
140            group
141            * @throws SystemException if a system exception occurred
142            */
143            public com.liferay.portal.model.Group getGroup(long groupId)
144                    throws com.liferay.portal.kernel.exception.PortalException,
145                            com.liferay.portal.kernel.exception.SystemException {
146                    return _groupService.getGroup(groupId);
147            }
148    
149            /**
150            * Returns the group with the name.
151            *
152            * @param companyId the primary key of the company
153            * @param name the group's name
154            * @return the group with the name
155            * @throws PortalException if a matching group could not be found or if the
156            current user did not have permission to view the group
157            * @throws SystemException if a system exception occurred
158            */
159            public com.liferay.portal.model.Group getGroup(long companyId,
160                    java.lang.String name)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    return _groupService.getGroup(companyId, name);
164            }
165    
166            /**
167            * Returns a range of all the site groups for which the user has control
168            * panel access.
169            *
170            * @param portlets the portlets to manage
171            * @param max the upper bound of the range of groups to consider (not
172            inclusive)
173            * @return the range of site groups for which the user has control panel
174            access
175            * @throws PortalException if a portal exception occurred
176            * @throws SystemException if a system exception occurred
177            */
178            public java.util.List<com.liferay.portal.model.Group> getManageableSites(
179                    java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return _groupService.getManageableSites(portlets, max);
183            }
184    
185            /**
186            * Returns the groups associated with the organizations.
187            *
188            * @param organizations the organizations
189            * @return the groups associated with the organizations
190            * @throws PortalException if a portal exception occurred
191            * @throws SystemException if a system exception occurred
192            */
193            public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
194                    java.util.List<com.liferay.portal.model.Organization> organizations)
195                    throws com.liferay.portal.kernel.exception.PortalException,
196                            com.liferay.portal.kernel.exception.SystemException {
197                    return _groupService.getOrganizationsGroups(organizations);
198            }
199    
200            /**
201            * Returns the group associated with the user.
202            *
203            * @param companyId the primary key of the company
204            * @param userId the primary key of the user
205            * @return the group associated with the user
206            * @throws PortalException if a matching group could not be found or if the
207            current user did not have permission to view the group
208            * @throws SystemException if a system exception occurred
209            */
210            public com.liferay.portal.model.Group getUserGroup(long companyId,
211                    long userId)
212                    throws com.liferay.portal.kernel.exception.PortalException,
213                            com.liferay.portal.kernel.exception.SystemException {
214                    return _groupService.getUserGroup(companyId, userId);
215            }
216    
217            /**
218            * Returns the groups associated with the user groups.
219            *
220            * @param userGroups the user groups
221            * @return the groups associated with the user groups
222            * @throws PortalException if any one of the user group's group could not be
223            found
224            * @throws SystemException if a system exception occurred
225            */
226            public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
227                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
228                    throws com.liferay.portal.kernel.exception.PortalException,
229                            com.liferay.portal.kernel.exception.SystemException {
230                    return _groupService.getUserGroupsGroups(userGroups);
231            }
232    
233            /**
234            * Returns the range of all groups associated with the user's organization
235            * groups, including the ancestors of the organization groups, unless portal
236            * property <code>organizations.membership.strict</code> is set to
237            * <code>true</code>.
238            *
239            * <p>
240            * Useful when paginating results. Returns a maximum of <code>end -
241            * start</code> instances. <code>start</code> and <code>end</code> are not
242            * primary keys, they are indexes in the result set. Thus, <code>0</code>
243            * refers to the first result in the set. Setting both <code>start</code>
244            * and <code>end</code> to {@link
245            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
246            * result set.
247            * </p>
248            *
249            * @param userId the primary key of the user
250            * @param start the lower bound of the range of groups to consider
251            * @param end the upper bound of the range of groups to consider (not
252            inclusive)
253            * @return the range of groups associated with the user's organizations
254            * @throws PortalException if a user with the primary key could not be found
255            or if another portal exception occurred
256            * @throws SystemException if a system exception occurred
257            */
258            public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
259                    long userId, int start, int end)
260                    throws com.liferay.portal.kernel.exception.PortalException,
261                            com.liferay.portal.kernel.exception.SystemException {
262                    return _groupService.getUserOrganizationsGroups(userId, start, end);
263            }
264    
265            /**
266            * Returns the guest or current user's layout set group, organization
267            * groups, inherited organization groups, and site groups.
268            *
269            * @return the user's layout set group, organization groups, and inherited
270            organization groups, and site groups
271            * @throws PortalException if a portal exception occurred
272            * @throws SystemException if a system exception occurred
273            */
274            public java.util.List<com.liferay.portal.model.Group> getUserSites()
275                    throws com.liferay.portal.kernel.exception.PortalException,
276                            com.liferay.portal.kernel.exception.SystemException {
277                    return _groupService.getUserSites();
278            }
279    
280            /**
281            * Returns the guest or current user's group &quot;places&quot; associated
282            * with the group entity class names, including the control panel group if
283            * the user is permitted to view the control panel.
284            *
285            * <p>
286            * <ul> <li> Class name &quot;User&quot; includes the user's layout set
287            * group. </li> <li> Class name &quot;Organization&quot; includes the user's
288            * immediate organization groups and inherited organization groups. </li>
289            * <li> Class name &quot;Group&quot; includes the user's immediate
290            * organization groups and site groups. </li> <li> A <code>classNames</code>
291            * value of <code>null</code> includes the user's layout set group,
292            * organization groups, inherited organization groups, and site groups.
293            * </li> </ul>
294            * </p>
295            *
296            * @param classNames the group entity class names (optionally
297            <code>null</code>). For more information see {@link
298            #getUserPlaces(String[], int)}
299            * @param max the maximum number of groups to return
300            * @return the user's group &quot;places&quot;
301            * @throws PortalException if a portal exception occurred
302            * @throws SystemException if a system exception occurred
303            */
304            public java.util.List<com.liferay.portal.model.Group> getUserPlaces(
305                    java.lang.String[] classNames, int max)
306                    throws com.liferay.portal.kernel.exception.PortalException,
307                            com.liferay.portal.kernel.exception.SystemException {
308                    return _groupService.getUserPlaces(classNames, max);
309            }
310    
311            /**
312            * Returns the user's group &quot;places&quot; associated with the group
313            * entity class names, including the control panel group if the user is
314            * permitted to view the control panel.
315            *
316            * <p>
317            * <ul> <li> Class name &quot;User&quot; includes the user's layout set
318            * group. </li> <li> Class name &quot;Organization&quot; includes the user's
319            * immediate organization groups and inherited organization groups. </li>
320            * <li> Class name &quot;Group&quot; includes the user's immediate
321            * organization groups and site groups. </li> <li> A <code>classNames</code>
322            * value of <code>null</code> includes the user's layout set group,
323            * organization groups, inherited organization groups, and site groups.
324            * </li> </ul>
325            * </p>
326            *
327            * @param userId the primary key of the user
328            * @param classNames the group entity class names (optionally
329            <code>null</code>). For more information see {@link
330            #getUserPlaces(long, String[], int)}
331            * @param max the maximum number of groups to return
332            * @return the user's group &quot;places&quot;
333            * @throws PortalException if a portal exception occurred
334            * @throws SystemException if a system exception occurred
335            */
336            public java.util.List<com.liferay.portal.model.Group> getUserPlaces(
337                    long userId, java.lang.String[] classNames, int max)
338                    throws com.liferay.portal.kernel.exception.PortalException,
339                            com.liferay.portal.kernel.exception.SystemException {
340                    return _groupService.getUserPlaces(userId, classNames, max);
341            }
342    
343            /**
344            * Returns <code>true</code> if the user is associated with the group,
345            * including the user's inherited organizations and user groups. System and
346            * staged groups are not included.
347            *
348            * @param userId the primary key of the user
349            * @param groupId the primary key of the group
350            * @return <code>true</code> if the user is associated with the group;
351            <code>false</code> otherwise
352            * @throws SystemException if a system exception occurred
353            */
354            public boolean hasUserGroup(long userId, long groupId)
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    return _groupService.hasUserGroup(userId, groupId);
357            }
358    
359            /**
360            * Returns a name ordered range of all the site groups and organization
361            * groups that match the name and description, optionally including the
362            * user's inherited organization groups and user groups. System and staged
363            * groups are not included.
364            *
365            * <p>
366            * Useful when paginating results. Returns a maximum of <code>end -
367            * start</code> instances. <code>start</code> and <code>end</code> are not
368            * primary keys, they are indexes in the result set. Thus, <code>0</code>
369            * refers to the first result in the set. Setting both <code>start</code>
370            * and <code>end</code> to {@link
371            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
372            * result set.
373            * </p>
374            *
375            * @param companyId the primary key of the company
376            * @param name the group's name (optionally <code>null</code>)
377            * @param description the group's description (optionally
378            <code>null</code>)
379            * @param params the finder params (optionally <code>null</code>). To
380            include the user's inherited organizations and user groups in the
381            search, add entries having &quot;usersGroups&quot; and
382            &quot;inherit&quot; as keys mapped to the the user's ID. For more
383            information see {@link
384            com.liferay.portal.service.persistence.GroupFinder}
385            * @param start the lower bound of the range of groups to return
386            * @param end the upper bound of the range of groups to return (not
387            inclusive)
388            * @return the matching groups ordered by name
389            * @throws PortalException if a portal exception occurred
390            * @throws SystemException if a system exception occurred
391            */
392            public java.util.List<com.liferay.portal.model.Group> search(
393                    long companyId, java.lang.String name, java.lang.String description,
394                    java.lang.String[] params, int start, int end)
395                    throws com.liferay.portal.kernel.exception.PortalException,
396                            com.liferay.portal.kernel.exception.SystemException {
397                    return _groupService.search(companyId, name, description, params,
398                            start, end);
399            }
400    
401            /**
402            * Returns the number of groups and organization groups that match the name
403            * and description, optionally including the user's inherited organizations
404            * and user groups. System and staged groups are not included.
405            *
406            * @param companyId the primary key of the company
407            * @param name the group's name (optionally <code>null</code>)
408            * @param description the group's description (optionally
409            <code>null</code>)
410            * @param params the finder params (optionally <code>null</code>). To
411            include the user's inherited organizations and user groups in the
412            search, add entries having &quot;usersGroups&quot; and
413            &quot;inherit&quot; as keys mapped to the the user's ID. For more
414            information see {@link
415            com.liferay.portal.service.persistence.GroupFinder}
416            * @return the number of matching groups
417            * @throws SystemException if a system exception occurred
418            */
419            public int searchCount(long companyId, java.lang.String name,
420                    java.lang.String description, java.lang.String[] params)
421                    throws com.liferay.portal.kernel.exception.SystemException {
422                    return _groupService.searchCount(companyId, name, description, params);
423            }
424    
425            /**
426            * Sets the groups associated with the role, removing and adding
427            * associations as necessary.
428            *
429            * @param roleId the primary key of the role
430            * @param groupIds the primary keys of the groups
431            * @throws PortalException if the user did not have permission to update
432            update the role
433            * @throws SystemException if a system exception occurred
434            */
435            public void setRoleGroups(long roleId, long[] groupIds)
436                    throws com.liferay.portal.kernel.exception.PortalException,
437                            com.liferay.portal.kernel.exception.SystemException {
438                    _groupService.setRoleGroups(roleId, groupIds);
439            }
440    
441            /**
442            * Removes the groups from the role.
443            *
444            * @param roleId the primary key of the role
445            * @param groupIds the primary keys of the groups
446            * @throws PortalException if the user did not have permission to update the
447            role
448            * @throws SystemException if a system exception occurred
449            */
450            public void unsetRoleGroups(long roleId, long[] groupIds)
451                    throws com.liferay.portal.kernel.exception.PortalException,
452                            com.liferay.portal.kernel.exception.SystemException {
453                    _groupService.unsetRoleGroups(roleId, groupIds);
454            }
455    
456            /**
457            * Updates the group's friendly URL.
458            *
459            * @param groupId the primary key of the group
460            * @param friendlyURL the group's new friendlyURL (optionally
461            <code>null</code>)
462            * @return the group
463            * @throws PortalException if the user did not have permission to update the
464            group, if a group with the primary key could not be found, or if
465            a valid friendly URL could not be created for the group
466            * @throws SystemException if a system exception occurred
467            */
468            public com.liferay.portal.model.Group updateFriendlyURL(long groupId,
469                    java.lang.String friendlyURL)
470                    throws com.liferay.portal.kernel.exception.PortalException,
471                            com.liferay.portal.kernel.exception.SystemException {
472                    return _groupService.updateFriendlyURL(groupId, friendlyURL);
473            }
474    
475            /**
476            * Updates the group's type settings.
477            *
478            * @param groupId the primary key of the group
479            * @param typeSettings the group's new type settings (optionally
480            <code>null</code>)
481            * @return the group
482            * @throws PortalException if the user did not have permission to update the
483            group or if a group with the primary key could not be found
484            * @throws SystemException if a system exception occurred
485            */
486            public com.liferay.portal.model.Group updateGroup(long groupId,
487                    java.lang.String typeSettings)
488                    throws com.liferay.portal.kernel.exception.PortalException,
489                            com.liferay.portal.kernel.exception.SystemException {
490                    return _groupService.updateGroup(groupId, typeSettings);
491            }
492    
493            /**
494            * Updates the group.
495            *
496            * @param groupId the primary key of the group
497            * @param name the group's new name
498            * @param description the group's new description (optionally
499            <code>null</code>)
500            * @param type the group's new type. For more information see {@link
501            com.liferay.portal.model.GroupConstants}
502            * @param friendlyURL the group's new friendlyURL (optionally
503            <code>null</code>)
504            * @param active whether the group is active
505            * @param serviceContext the service context to be applied (optionally
506            <code>null</code>). Can specify the group's replacement asset
507            category IDs and replacement asset tag names
508            * @return the group
509            * @throws PortalException if the user did not have permission to update the
510            group, if a group with the primary key could not be found, if the
511            friendly URL was invalid or could one not be created
512            * @throws SystemException if a system exception occurred
513            */
514            public com.liferay.portal.model.Group updateGroup(long groupId,
515                    java.lang.String name, java.lang.String description, int type,
516                    java.lang.String friendlyURL, boolean active,
517                    com.liferay.portal.service.ServiceContext serviceContext)
518                    throws com.liferay.portal.kernel.exception.PortalException,
519                            com.liferay.portal.kernel.exception.SystemException {
520                    return _groupService.updateGroup(groupId, name, description, type,
521                            friendlyURL, active, serviceContext);
522            }
523    
524            /**
525             * @deprecated Renamed to {@link #getWrappedService}
526             */
527            public GroupService getWrappedGroupService() {
528                    return _groupService;
529            }
530    
531            /**
532             * @deprecated Renamed to {@link #setWrappedService}
533             */
534            public void setWrappedGroupService(GroupService groupService) {
535                    _groupService = groupService;
536            }
537    
538            public GroupService getWrappedService() {
539                    return _groupService;
540            }
541    
542            public void setWrappedService(GroupService groupService) {
543                    _groupService = groupService;
544            }
545    
546            private GroupService _groupService;
547    }