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