001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    /**
018     * <p>
019     * This class is a wrapper for {@link UserGroupLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       UserGroupLocalService
024     * @generated
025     */
026    public class UserGroupLocalServiceWrapper implements UserGroupLocalService,
027            ServiceWrapper<UserGroupLocalService> {
028            public UserGroupLocalServiceWrapper(
029                    UserGroupLocalService userGroupLocalService) {
030                    _userGroupLocalService = userGroupLocalService;
031            }
032    
033            /**
034            * Adds the user group to the database. Also notifies the appropriate model listeners.
035            *
036            * @param userGroup the user group
037            * @return the user group that was added
038            * @throws SystemException if a system exception occurred
039            */
040            public com.liferay.portal.model.UserGroup addUserGroup(
041                    com.liferay.portal.model.UserGroup userGroup)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return _userGroupLocalService.addUserGroup(userGroup);
044            }
045    
046            /**
047            * Creates a new user group with the primary key. Does not add the user group to the database.
048            *
049            * @param userGroupId the primary key for the new user group
050            * @return the new user group
051            */
052            public com.liferay.portal.model.UserGroup createUserGroup(long userGroupId) {
053                    return _userGroupLocalService.createUserGroup(userGroupId);
054            }
055    
056            /**
057            * Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners.
058            *
059            * @param userGroupId the primary key of the user group
060            * @throws PortalException if a user group with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public void deleteUserGroup(long userGroupId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    _userGroupLocalService.deleteUserGroup(userGroupId);
067            }
068    
069            /**
070            * Deletes the user group from the database. Also notifies the appropriate model listeners.
071            *
072            * @param userGroup the user group
073            * @throws PortalException
074            * @throws SystemException if a system exception occurred
075            */
076            public void deleteUserGroup(com.liferay.portal.model.UserGroup userGroup)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    _userGroupLocalService.deleteUserGroup(userGroup);
080            }
081    
082            /**
083            * Performs a dynamic query on the database and returns the matching rows.
084            *
085            * @param dynamicQuery the dynamic query
086            * @return the matching rows
087            * @throws SystemException if a system exception occurred
088            */
089            @SuppressWarnings("rawtypes")
090            public java.util.List dynamicQuery(
091                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
092                    throws com.liferay.portal.kernel.exception.SystemException {
093                    return _userGroupLocalService.dynamicQuery(dynamicQuery);
094            }
095    
096            /**
097            * Performs a dynamic query on the database and returns a range of the matching rows.
098            *
099            * <p>
100            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
101            * </p>
102            *
103            * @param dynamicQuery the dynamic query
104            * @param start the lower bound of the range of model instances
105            * @param end the upper bound of the range of model instances (not inclusive)
106            * @return the range of matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
112                    int end) throws com.liferay.portal.kernel.exception.SystemException {
113                    return _userGroupLocalService.dynamicQuery(dynamicQuery, start, end);
114            }
115    
116            /**
117            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
118            *
119            * <p>
120            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
127            * @return the ordered range of matching rows
128            * @throws SystemException if a system exception occurred
129            */
130            @SuppressWarnings("rawtypes")
131            public java.util.List dynamicQuery(
132                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
133                    int end,
134                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135                    throws com.liferay.portal.kernel.exception.SystemException {
136                    return _userGroupLocalService.dynamicQuery(dynamicQuery, start, end,
137                            orderByComparator);
138            }
139    
140            /**
141            * Returns the number of rows that match the dynamic query.
142            *
143            * @param dynamicQuery the dynamic query
144            * @return the number of rows that match the dynamic query
145            * @throws SystemException if a system exception occurred
146            */
147            public long dynamicQueryCount(
148                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return _userGroupLocalService.dynamicQueryCount(dynamicQuery);
151            }
152    
153            public com.liferay.portal.model.UserGroup fetchUserGroup(long userGroupId)
154                    throws com.liferay.portal.kernel.exception.SystemException {
155                    return _userGroupLocalService.fetchUserGroup(userGroupId);
156            }
157    
158            /**
159            * Returns the user group with the primary key.
160            *
161            * @param userGroupId the primary key of the user group
162            * @return the user group
163            * @throws PortalException if a user group with the primary key could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    return _userGroupLocalService.getUserGroup(userGroupId);
170            }
171    
172            public com.liferay.portal.model.PersistedModel getPersistedModel(
173                    java.io.Serializable primaryKeyObj)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return _userGroupLocalService.getPersistedModel(primaryKeyObj);
177            }
178    
179            /**
180            * Returns a range of all the user groups.
181            *
182            * <p>
183            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
184            * </p>
185            *
186            * @param start the lower bound of the range of user groups
187            * @param end the upper bound of the range of user groups (not inclusive)
188            * @return the range of user groups
189            * @throws SystemException if a system exception occurred
190            */
191            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
192                    int start, int end)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return _userGroupLocalService.getUserGroups(start, end);
195            }
196    
197            /**
198            * Returns the number of user groups.
199            *
200            * @return the number of user groups
201            * @throws SystemException if a system exception occurred
202            */
203            public int getUserGroupsCount()
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return _userGroupLocalService.getUserGroupsCount();
206            }
207    
208            /**
209            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
210            *
211            * @param userGroup the user group
212            * @return the user group that was updated
213            * @throws SystemException if a system exception occurred
214            */
215            public com.liferay.portal.model.UserGroup updateUserGroup(
216                    com.liferay.portal.model.UserGroup userGroup)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return _userGroupLocalService.updateUserGroup(userGroup);
219            }
220    
221            /**
222            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
223            *
224            * @param userGroup the user group
225            * @param merge whether to merge the user group with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
226            * @return the user group that was updated
227            * @throws SystemException if a system exception occurred
228            */
229            public com.liferay.portal.model.UserGroup updateUserGroup(
230                    com.liferay.portal.model.UserGroup userGroup, boolean merge)
231                    throws com.liferay.portal.kernel.exception.SystemException {
232                    return _userGroupLocalService.updateUserGroup(userGroup, merge);
233            }
234    
235            /**
236            * Returns the Spring bean ID for this bean.
237            *
238            * @return the Spring bean ID for this bean
239            */
240            public java.lang.String getBeanIdentifier() {
241                    return _userGroupLocalService.getBeanIdentifier();
242            }
243    
244            /**
245            * Sets the Spring bean ID for this bean.
246            *
247            * @param beanIdentifier the Spring bean ID for this bean
248            */
249            public void setBeanIdentifier(java.lang.String beanIdentifier) {
250                    _userGroupLocalService.setBeanIdentifier(beanIdentifier);
251            }
252    
253            /**
254            * Adds the user groups to the group.
255            *
256            * @param groupId the primary key of the group
257            * @param userGroupIds the primary keys of the user groups
258            * @throws SystemException if a system exception occurred
259            */
260            public void addGroupUserGroups(long groupId, long[] userGroupIds)
261                    throws com.liferay.portal.kernel.exception.SystemException {
262                    _userGroupLocalService.addGroupUserGroups(groupId, userGroupIds);
263            }
264    
265            /**
266            * Adds the user groups to the team.
267            *
268            * @param teamId the primary key of the team
269            * @param userGroupIds the primary keys of the user groups
270            * @throws SystemException if a system exception occurred
271            */
272            public void addTeamUserGroups(long teamId, long[] userGroupIds)
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    _userGroupLocalService.addTeamUserGroups(teamId, userGroupIds);
275            }
276    
277            /**
278            * Adds a user group.
279            *
280            * <p>
281            * This method handles the creation and bookkeeping of the user group,
282            * including its resources, metadata, and internal data structures. It is
283            * not necessary to make subsequent calls to setup default groups and
284            * resources for the user group.
285            * </p>
286            *
287            * @param userId the primary key of the user
288            * @param companyId the primary key of the user group's company
289            * @param name the user group's name
290            * @param description the user group's description
291            * @param publicLayoutSetPrototypeId the primary key of the user group's
292            public layout set
293            * @param privateLayoutSetPrototypeId the primary key of the user group's
294            private layout set
295            * @return the user group
296            * @throws PortalException if the user group's information was invalid
297            * @throws SystemException if a system exception occurred
298            */
299            public com.liferay.portal.model.UserGroup addUserGroup(long userId,
300                    long companyId, java.lang.String name, java.lang.String description,
301                    long publicLayoutSetPrototypeId, long privateLayoutSetPrototypeId)
302                    throws com.liferay.portal.kernel.exception.PortalException,
303                            com.liferay.portal.kernel.exception.SystemException {
304                    return _userGroupLocalService.addUserGroup(userId, companyId, name,
305                            description, publicLayoutSetPrototypeId, privateLayoutSetPrototypeId);
306            }
307    
308            /**
309            * Clears all associations between the user and its user groups and clears
310            * the permissions cache.
311            *
312            * <p>
313            * This method is called from {@link #deleteUserGroup(UserGroup)}.
314            * </p>
315            *
316            * @param userId the primary key of the user
317            * @throws SystemException if a system exception occurred
318            */
319            public void clearUserUserGroups(long userId)
320                    throws com.liferay.portal.kernel.exception.SystemException {
321                    _userGroupLocalService.clearUserUserGroups(userId);
322            }
323    
324            /**
325            * Copies the user group's layouts to the users who are not already members
326            * of the user group.
327            *
328            * @param userGroupId the primary key of the user group
329            * @param userIds the primary keys of the users
330            * @throws PortalException if any one of the users could not be found or if
331            a portal exception occurred
332            * @throws SystemException if a system exception occurred
333            */
334            public void copyUserGroupLayouts(long userGroupId, long[] userIds)
335                    throws com.liferay.portal.kernel.exception.PortalException,
336                            com.liferay.portal.kernel.exception.SystemException {
337                    _userGroupLocalService.copyUserGroupLayouts(userGroupId, userIds);
338            }
339    
340            /**
341            * Copies the user groups' layouts to the user.
342            *
343            * @param userGroupIds the primary keys of the user groups
344            * @param userId the primary key of the user
345            * @throws PortalException if a user with the primary key could not be
346            found or if a portal exception occurred
347            * @throws SystemException if a system exception occurred
348            */
349            public void copyUserGroupLayouts(long[] userGroupIds, long userId)
350                    throws com.liferay.portal.kernel.exception.PortalException,
351                            com.liferay.portal.kernel.exception.SystemException {
352                    _userGroupLocalService.copyUserGroupLayouts(userGroupIds, userId);
353            }
354    
355            /**
356            * Copies the user group's layout to the user.
357            *
358            * @param userGroupId the primary key of the user group
359            * @param userId the primary key of the user
360            * @throws PortalException if a user with the primary key could not be
361            found or if a portal exception occurred
362            * @throws SystemException if a system exception occurred
363            */
364            public void copyUserGroupLayouts(long userGroupId, long userId)
365                    throws com.liferay.portal.kernel.exception.PortalException,
366                            com.liferay.portal.kernel.exception.SystemException {
367                    _userGroupLocalService.copyUserGroupLayouts(userGroupId, userId);
368            }
369    
370            /**
371            * Returns the user group with the name.
372            *
373            * @param companyId the primary key of the user group's company
374            * @param name the user group's name
375            * @return Returns the user group with the name
376            * @throws PortalException if a user group with the name could not be found
377            * @throws SystemException if a system exception occurred
378            */
379            public com.liferay.portal.model.UserGroup getUserGroup(long companyId,
380                    java.lang.String name)
381                    throws com.liferay.portal.kernel.exception.PortalException,
382                            com.liferay.portal.kernel.exception.SystemException {
383                    return _userGroupLocalService.getUserGroup(companyId, name);
384            }
385    
386            /**
387            * Returns all the user groups belonging to the company.
388            *
389            * @param companyId the primary key of the user groups' company
390            * @return the user groups belonging to the company
391            * @throws SystemException if a system exception occurred
392            */
393            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
394                    long companyId)
395                    throws com.liferay.portal.kernel.exception.SystemException {
396                    return _userGroupLocalService.getUserGroups(companyId);
397            }
398    
399            /**
400            * Returns all the user groups with the primary keys.
401            *
402            * @param userGroupIds the primary keys of the user groups
403            * @return the user groups with the primary keys
404            * @throws PortalException if any one of the user groups could not be found
405            * @throws SystemException if a system exception occurred
406            */
407            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
408                    long[] userGroupIds)
409                    throws com.liferay.portal.kernel.exception.PortalException,
410                            com.liferay.portal.kernel.exception.SystemException {
411                    return _userGroupLocalService.getUserGroups(userGroupIds);
412            }
413    
414            /**
415            * Returns all the user groups to which the user belongs.
416            *
417            * @param userId the primary key of the user
418            * @return the user groups to which the user belongs
419            * @throws SystemException if a system exception occurred
420            */
421            public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
422                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
423                    return _userGroupLocalService.getUserUserGroups(userId);
424            }
425    
426            /**
427            * Returns <code>true</code> if the user group is associated with the
428            * group.
429            *
430            * @param groupId the primary key of the group
431            * @param userGroupId the primary key of the user group
432            * @return <code>true</code> if the user group belongs to the group;
433            <code>false</code> otherwise
434            * @throws SystemException if a system exception occurred
435            */
436            public boolean hasGroupUserGroup(long groupId, long userGroupId)
437                    throws com.liferay.portal.kernel.exception.SystemException {
438                    return _userGroupLocalService.hasGroupUserGroup(groupId, userGroupId);
439            }
440    
441            /**
442            * Returns <code>true</code> if the user group belongs to the team.
443            *
444            * @param teamId the primary key of the team
445            * @param userGroupId the primary key of the user group
446            * @return <code>true</code> if the user group belongs to the team;
447            <code>false</code> otherwise
448            * @throws SystemException if a system exception occurred
449            */
450            public boolean hasTeamUserGroup(long teamId, long userGroupId)
451                    throws com.liferay.portal.kernel.exception.SystemException {
452                    return _userGroupLocalService.hasTeamUserGroup(teamId, userGroupId);
453            }
454    
455            /**
456            * Returns an ordered range of all the user groups that match the name and
457            * description.
458            *
459            * <p>
460            * Useful when paginating results. Returns a maximum of <code>end -
461            * start</code> instances. <code>start</code> and <code>end</code> are not
462            * primary keys, they are indexes in the result set. Thus, <code>0</code>
463            * refers to the first result in the set. Setting both <code>start</code>
464            * and <code>end</code> to {@link
465            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the
466            * full result set.
467            * </p>
468            *
469            * @param companyId the primary key of the user group's company
470            * @param name the user group's name (optionally <code>null</code>)
471            * @param description the user group's description (optionally
472            <code>null</code>)
473            * @param params the finder params (optionally <code>null</code>). For
474            more information see {@link
475            com.liferay.portal.service.persistence.UserGroupFinder}
476            * @param start the lower bound of the range of user groups to return
477            * @param end the upper bound of the range of user groups to return (not
478            inclusive)
479            * @param obc the comparator to order the user groups (optionally
480            <code>null</code>)
481            * @return the matching user groups ordered by comparator <code>obc</code>
482            * @throws SystemException if a system exception occurred
483            * @see com.liferay.portal.service.persistence.UserGroupFinder
484            */
485            public java.util.List<com.liferay.portal.model.UserGroup> search(
486                    long companyId, java.lang.String name, java.lang.String description,
487                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
488                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
489                    throws com.liferay.portal.kernel.exception.SystemException {
490                    return _userGroupLocalService.search(companyId, name, description,
491                            params, start, end, obc);
492            }
493    
494            /**
495            * Returns the number of user groups that match the name and description.
496            *
497            * @param companyId the primary key of the user group's company
498            * @param name the user group's name (optionally <code>null</code>)
499            * @param description the user group's description (optionally
500            <code>null</code>)
501            * @param params the finder params (optionally <code>null</code>). For
502            more information see {@link
503            com.liferay.portal.service.persistence.UserGroupFinder}
504            * @return the number of matching user groups
505            * @throws SystemException if a system exception occurred
506            * @see com.liferay.portal.service.persistence.UserGroupFinder
507            */
508            public int searchCount(long companyId, java.lang.String name,
509                    java.lang.String description,
510                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
511                    throws com.liferay.portal.kernel.exception.SystemException {
512                    return _userGroupLocalService.searchCount(companyId, name, description,
513                            params);
514            }
515    
516            /**
517            * Sets the user groups associated with the user copying the user group
518            * layouts and removing and adding user group associations for the user as
519            * necessary.
520            *
521            * @param userId the primary key of the user
522            * @param userGroupIds the primary keys of the user groups
523            * @throws PortalException if a portal exception occurred
524            * @throws SystemException if a system exception occurred
525            */
526            public void setUserUserGroups(long userId, long[] userGroupIds)
527                    throws com.liferay.portal.kernel.exception.PortalException,
528                            com.liferay.portal.kernel.exception.SystemException {
529                    _userGroupLocalService.setUserUserGroups(userId, userGroupIds);
530            }
531    
532            /**
533            * Removes the user groups from the group.
534            *
535            * @param groupId the primary key of the group
536            * @param userGroupIds the primary keys of the user groups
537            * @throws SystemException if a system exception occurred
538            */
539            public void unsetGroupUserGroups(long groupId, long[] userGroupIds)
540                    throws com.liferay.portal.kernel.exception.SystemException {
541                    _userGroupLocalService.unsetGroupUserGroups(groupId, userGroupIds);
542            }
543    
544            /**
545            * Removes the user groups from the team.
546            *
547            * @param teamId the primary key of the team
548            * @param userGroupIds the primary keys of the user groups
549            * @throws SystemException if a system exception occurred
550            */
551            public void unsetTeamUserGroups(long teamId, long[] userGroupIds)
552                    throws com.liferay.portal.kernel.exception.SystemException {
553                    _userGroupLocalService.unsetTeamUserGroups(teamId, userGroupIds);
554            }
555    
556            /**
557            * Updates the user group.
558            *
559            * @param companyId the primary key of the user group's company
560            * @param userGroupId the primary key of the user group
561            * @param name the user group's name
562            * @param description the user group's description
563            * @param publicLayoutSetPrototypeId the primary key of the user group's
564            public layout set
565            * @param privateLayoutSetPrototypeId the primary key of the user group's
566            private layout set
567            * @return the user group
568            * @throws PortalException if a user group with the primary key could not
569            be found or if the new information was invalid
570            * @throws SystemException if a system exception occurred
571            */
572            public com.liferay.portal.model.UserGroup updateUserGroup(long companyId,
573                    long userGroupId, java.lang.String name, java.lang.String description,
574                    long publicLayoutSetPrototypeId, long privateLayoutSetPrototypeId)
575                    throws com.liferay.portal.kernel.exception.PortalException,
576                            com.liferay.portal.kernel.exception.SystemException {
577                    return _userGroupLocalService.updateUserGroup(companyId, userGroupId,
578                            name, description, publicLayoutSetPrototypeId,
579                            privateLayoutSetPrototypeId);
580            }
581    
582            /**
583             * @deprecated Renamed to {@link #getWrappedService}
584             */
585            public UserGroupLocalService getWrappedUserGroupLocalService() {
586                    return _userGroupLocalService;
587            }
588    
589            /**
590             * @deprecated Renamed to {@link #setWrappedService}
591             */
592            public void setWrappedUserGroupLocalService(
593                    UserGroupLocalService userGroupLocalService) {
594                    _userGroupLocalService = userGroupLocalService;
595            }
596    
597            public UserGroupLocalService getWrappedService() {
598                    return _userGroupLocalService;
599            }
600    
601            public void setWrappedService(UserGroupLocalService userGroupLocalService) {
602                    _userGroupLocalService = userGroupLocalService;
603            }
604    
605            private UserGroupLocalService _userGroupLocalService;
606    }