001    /**
002     * Copyright (c) 2000-2012 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    /**
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 set the asset category IDs and asset tag
047            names for the group, and can set 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 set asset category IDs and asset tag
078            names for the group, and can set 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            public java.util.List<com.liferay.portal.model.Group> getUserPlaces(
266                    long userId, java.lang.String[] classNames,
267                    boolean includeControlPanel, int max)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException {
270                    return _groupService.getUserPlaces(userId, classNames,
271                            includeControlPanel, max);
272            }
273    
274            /**
275            * Returns the user's group &quot;places&quot; associated with the group
276            * entity class names, including the control panel group if the user is
277            * permitted to view the control panel.
278            *
279            * <p>
280            * <ul> <li> Class name &quot;User&quot; includes the user's layout set
281            * group. </li> <li> Class name &quot;Organization&quot; includes the user's
282            * immediate organization groups and inherited organization groups. </li>
283            * <li> Class name &quot;Group&quot; includes the user's immediate
284            * organization groups and site groups. </li> <li> A <code>classNames</code>
285            * value of <code>null</code> includes the user's layout set group,
286            * organization groups, inherited organization groups, and site groups.
287            * </li> </ul>
288            * </p>
289            *
290            * @param userId the primary key of the user
291            * @param classNames the group entity class names (optionally
292            <code>null</code>). For more information see {@link
293            #getUserPlaces(long, String[], int)}
294            * @param max the maximum number of groups to return
295            * @return the user's group &quot;places&quot;
296            * @throws PortalException if a portal exception occurred
297            * @throws SystemException if a system exception occurred
298            */
299            public java.util.List<com.liferay.portal.model.Group> getUserPlaces(
300                    long userId, java.lang.String[] classNames, int max)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    return _groupService.getUserPlaces(userId, classNames, max);
304            }
305    
306            /**
307            * Returns the guest or current user's group &quot;places&quot; associated
308            * with the group entity class names, including the control panel group if
309            * the user is permitted to view the control panel.
310            *
311            * <p>
312            * <ul> <li> Class name &quot;User&quot; includes the user's layout set
313            * group. </li> <li> Class name &quot;Organization&quot; includes the user's
314            * immediate organization groups and inherited organization groups. </li>
315            * <li> Class name &quot;Group&quot; includes the user's immediate
316            * organization groups and site groups. </li> <li> A <code>classNames</code>
317            * value of <code>null</code> includes the user's layout set group,
318            * organization groups, inherited organization groups, and site groups.
319            * </li> </ul>
320            * </p>
321            *
322            * @param classNames the group entity class names (optionally
323            <code>null</code>). For more information see {@link
324            #getUserPlaces(String[], int)}
325            * @param max the maximum number of groups to return
326            * @return the user's group &quot;places&quot;
327            * @throws PortalException if a portal exception occurred
328            * @throws SystemException if a system exception occurred
329            */
330            public java.util.List<com.liferay.portal.model.Group> getUserPlaces(
331                    java.lang.String[] classNames, int max)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException {
334                    return _groupService.getUserPlaces(classNames, max);
335            }
336    
337            /**
338            * Returns the guest or current user's layout set group, organization
339            * groups, inherited organization groups, and site groups.
340            *
341            * @return the user's layout set group, organization groups, and inherited
342            organization groups, and site groups
343            * @throws PortalException if a portal exception occurred
344            * @throws SystemException if a system exception occurred
345            */
346            public java.util.List<com.liferay.portal.model.Group> getUserSites()
347                    throws com.liferay.portal.kernel.exception.PortalException,
348                            com.liferay.portal.kernel.exception.SystemException {
349                    return _groupService.getUserSites();
350            }
351    
352            /**
353            * Returns <code>true</code> if the user is associated with the group,
354            * including the user's inherited organizations and user groups. System and
355            * staged groups are not included.
356            *
357            * @param userId the primary key of the user
358            * @param groupId the primary key of the group
359            * @return <code>true</code> if the user is associated with the group;
360            <code>false</code> otherwise
361            * @throws SystemException if a system exception occurred
362            */
363            public boolean hasUserGroup(long userId, long groupId)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    return _groupService.hasUserGroup(userId, groupId);
366            }
367    
368            /**
369            * Returns a name ordered range of all the site groups and organization
370            * groups that match the name and description, optionally including the
371            * user's inherited organization groups and user groups. System and staged
372            * groups are not included.
373            *
374            * <p>
375            * Useful when paginating results. Returns a maximum of <code>end -
376            * start</code> instances. <code>start</code> and <code>end</code> are not
377            * primary keys, they are indexes in the result set. Thus, <code>0</code>
378            * refers to the first result in the set. Setting both <code>start</code>
379            * and <code>end</code> to {@link
380            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
381            * result set.
382            * </p>
383            *
384            * @param companyId the primary key of the company
385            * @param name the group's name (optionally <code>null</code>)
386            * @param description the group's description (optionally
387            <code>null</code>)
388            * @param params the finder params (optionally <code>null</code>). To
389            include the user's inherited organizations and user groups in the
390            search, add entries having &quot;usersGroups&quot; and
391            &quot;inherit&quot; as keys mapped to the the user's ID. For more
392            information see {@link
393            com.liferay.portal.service.persistence.GroupFinder}
394            * @param start the lower bound of the range of groups to return
395            * @param end the upper bound of the range of groups to return (not
396            inclusive)
397            * @return the matching groups ordered by name
398            * @throws PortalException if a portal exception occurred
399            * @throws SystemException if a system exception occurred
400            */
401            public java.util.List<com.liferay.portal.model.Group> search(
402                    long companyId, java.lang.String name, java.lang.String description,
403                    java.lang.String[] params, int start, int end)
404                    throws com.liferay.portal.kernel.exception.PortalException,
405                            com.liferay.portal.kernel.exception.SystemException {
406                    return _groupService.search(companyId, name, description, params,
407                            start, end);
408            }
409    
410            /**
411            * Returns the number of groups and organization groups that match the name
412            * and description, optionally including the user's inherited organizations
413            * and user groups. System and staged groups are not included.
414            *
415            * @param companyId the primary key of the company
416            * @param name the group's name (optionally <code>null</code>)
417            * @param description the group's description (optionally
418            <code>null</code>)
419            * @param params the finder params (optionally <code>null</code>). To
420            include the user's inherited organizations and user groups in the
421            search, add entries having &quot;usersGroups&quot; and
422            &quot;inherit&quot; as keys mapped to the the user's ID. For more
423            information see {@link
424            com.liferay.portal.service.persistence.GroupFinder}
425            * @return the number of matching groups
426            * @throws SystemException if a system exception occurred
427            */
428            public int searchCount(long companyId, java.lang.String name,
429                    java.lang.String description, java.lang.String[] params)
430                    throws com.liferay.portal.kernel.exception.SystemException {
431                    return _groupService.searchCount(companyId, name, description, params);
432            }
433    
434            /**
435            * Sets the groups associated with the role, removing and adding
436            * associations as necessary.
437            *
438            * @param roleId the primary key of the role
439            * @param groupIds the primary keys of the groups
440            * @throws PortalException if the user did not have permission to update
441            update the role
442            * @throws SystemException if a system exception occurred
443            */
444            public void setRoleGroups(long roleId, long[] groupIds)
445                    throws com.liferay.portal.kernel.exception.PortalException,
446                            com.liferay.portal.kernel.exception.SystemException {
447                    _groupService.setRoleGroups(roleId, groupIds);
448            }
449    
450            /**
451            * Removes the groups from the role.
452            *
453            * @param roleId the primary key of the role
454            * @param groupIds the primary keys of the groups
455            * @throws PortalException if the user did not have permission to update the
456            role
457            * @throws SystemException if a system exception occurred
458            */
459            public void unsetRoleGroups(long roleId, long[] groupIds)
460                    throws com.liferay.portal.kernel.exception.PortalException,
461                            com.liferay.portal.kernel.exception.SystemException {
462                    _groupService.unsetRoleGroups(roleId, groupIds);
463            }
464    
465            /**
466            * Updates the group's friendly URL.
467            *
468            * @param groupId the primary key of the group
469            * @param friendlyURL the group's new friendlyURL (optionally
470            <code>null</code>)
471            * @return the group
472            * @throws PortalException if the user did not have permission to update the
473            group, if a group with the primary key could not be found, or if
474            a valid friendly URL could not be created for the group
475            * @throws SystemException if a system exception occurred
476            */
477            public com.liferay.portal.model.Group updateFriendlyURL(long groupId,
478                    java.lang.String friendlyURL)
479                    throws com.liferay.portal.kernel.exception.PortalException,
480                            com.liferay.portal.kernel.exception.SystemException {
481                    return _groupService.updateFriendlyURL(groupId, friendlyURL);
482            }
483    
484            /**
485            * Updates the group's type settings.
486            *
487            * @param groupId the primary key of the group
488            * @param typeSettings the group's new type settings (optionally
489            <code>null</code>)
490            * @return the group
491            * @throws PortalException if the user did not have permission to update the
492            group or if a group with the primary key could not be found
493            * @throws SystemException if a system exception occurred
494            */
495            public com.liferay.portal.model.Group updateGroup(long groupId,
496                    java.lang.String typeSettings)
497                    throws com.liferay.portal.kernel.exception.PortalException,
498                            com.liferay.portal.kernel.exception.SystemException {
499                    return _groupService.updateGroup(groupId, typeSettings);
500            }
501    
502            /**
503            * Updates the group.
504            *
505            * @param groupId the primary key of the group
506            * @param name the group's new name
507            * @param description the group's new description (optionally
508            <code>null</code>)
509            * @param type the group's new type. For more information see {@link
510            com.liferay.portal.model.GroupConstants}
511            * @param friendlyURL the group's new friendlyURL (optionally
512            <code>null</code>)
513            * @param active whether the group is active
514            * @param serviceContext the service context to be applied (optionally
515            <code>null</code>). Can set the asset category IDs and asset tag
516            names for the group.
517            * @return the group
518            * @throws PortalException if the user did not have permission to update the
519            group, if a group with the primary key could not be found, if the
520            friendly URL was invalid or could one not be created
521            * @throws SystemException if a system exception occurred
522            */
523            public com.liferay.portal.model.Group updateGroup(long groupId,
524                    java.lang.String name, java.lang.String description, int type,
525                    java.lang.String friendlyURL, boolean active,
526                    com.liferay.portal.service.ServiceContext serviceContext)
527                    throws com.liferay.portal.kernel.exception.PortalException,
528                            com.liferay.portal.kernel.exception.SystemException {
529                    return _groupService.updateGroup(groupId, name, description, type,
530                            friendlyURL, active, serviceContext);
531            }
532    
533            /**
534             * @deprecated Renamed to {@link #getWrappedService}
535             */
536            public GroupService getWrappedGroupService() {
537                    return _groupService;
538            }
539    
540            /**
541             * @deprecated Renamed to {@link #setWrappedService}
542             */
543            public void setWrappedGroupService(GroupService groupService) {
544                    _groupService = groupService;
545            }
546    
547            public GroupService getWrappedService() {
548                    return _groupService;
549            }
550    
551            public void setWrappedService(GroupService groupService) {
552                    _groupService = groupService;
553            }
554    
555            private GroupService _groupService;
556    }