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