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 RoleLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       RoleLocalService
024     * @generated
025     */
026    public class RoleLocalServiceWrapper implements RoleLocalService,
027            ServiceWrapper<RoleLocalService> {
028            public RoleLocalServiceWrapper(RoleLocalService roleLocalService) {
029                    _roleLocalService = roleLocalService;
030            }
031    
032            /**
033            * Adds the role to the database. Also notifies the appropriate model listeners.
034            *
035            * @param role the role
036            * @return the role that was added
037            * @throws SystemException if a system exception occurred
038            */
039            public com.liferay.portal.model.Role addRole(
040                    com.liferay.portal.model.Role role)
041                    throws com.liferay.portal.kernel.exception.SystemException {
042                    return _roleLocalService.addRole(role);
043            }
044    
045            /**
046            * Creates a new role with the primary key. Does not add the role to the database.
047            *
048            * @param roleId the primary key for the new role
049            * @return the new role
050            */
051            public com.liferay.portal.model.Role createRole(long roleId) {
052                    return _roleLocalService.createRole(roleId);
053            }
054    
055            /**
056            * Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.
057            *
058            * @param roleId the primary key of the role
059            * @return the role that was removed
060            * @throws PortalException if a role with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public com.liferay.portal.model.Role deleteRole(long roleId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return _roleLocalService.deleteRole(roleId);
067            }
068    
069            /**
070            * Deletes the role from the database. Also notifies the appropriate model listeners.
071            *
072            * @param role the role
073            * @return the role that was removed
074            * @throws PortalException
075            * @throws SystemException if a system exception occurred
076            */
077            public com.liferay.portal.model.Role deleteRole(
078                    com.liferay.portal.model.Role role)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    return _roleLocalService.deleteRole(role);
082            }
083    
084            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
085                    return _roleLocalService.dynamicQuery();
086            }
087    
088            /**
089            * Performs a dynamic query on the database and returns the matching rows.
090            *
091            * @param dynamicQuery the dynamic query
092            * @return the matching rows
093            * @throws SystemException if a system exception occurred
094            */
095            @SuppressWarnings("rawtypes")
096            public java.util.List dynamicQuery(
097                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return _roleLocalService.dynamicQuery(dynamicQuery);
100            }
101    
102            /**
103            * Performs a dynamic query on the database and returns a range of the matching rows.
104            *
105            * <p>
106            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
107            * </p>
108            *
109            * @param dynamicQuery the dynamic query
110            * @param start the lower bound of the range of model instances
111            * @param end the upper bound of the range of model instances (not inclusive)
112            * @return the range of matching rows
113            * @throws SystemException if a system exception occurred
114            */
115            @SuppressWarnings("rawtypes")
116            public java.util.List dynamicQuery(
117                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
118                    int end) throws com.liferay.portal.kernel.exception.SystemException {
119                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end);
120            }
121    
122            /**
123            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
124            *
125            * <p>
126            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
127            * </p>
128            *
129            * @param dynamicQuery the dynamic query
130            * @param start the lower bound of the range of model instances
131            * @param end the upper bound of the range of model instances (not inclusive)
132            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
133            * @return the ordered range of matching rows
134            * @throws SystemException if a system exception occurred
135            */
136            @SuppressWarnings("rawtypes")
137            public java.util.List dynamicQuery(
138                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139                    int end,
140                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end,
143                            orderByComparator);
144            }
145    
146            /**
147            * Returns the number of rows that match the dynamic query.
148            *
149            * @param dynamicQuery the dynamic query
150            * @return the number of rows that match the dynamic query
151            * @throws SystemException if a system exception occurred
152            */
153            public long dynamicQueryCount(
154                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return _roleLocalService.dynamicQueryCount(dynamicQuery);
157            }
158    
159            public com.liferay.portal.model.Role fetchRole(long roleId)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return _roleLocalService.fetchRole(roleId);
162            }
163    
164            /**
165            * Returns the role with the primary key.
166            *
167            * @param roleId the primary key of the role
168            * @return the role
169            * @throws PortalException if a role with the primary key could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public com.liferay.portal.model.Role getRole(long roleId)
173                    throws com.liferay.portal.kernel.exception.PortalException,
174                            com.liferay.portal.kernel.exception.SystemException {
175                    return _roleLocalService.getRole(roleId);
176            }
177    
178            public com.liferay.portal.model.PersistedModel getPersistedModel(
179                    java.io.Serializable primaryKeyObj)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return _roleLocalService.getPersistedModel(primaryKeyObj);
183            }
184    
185            /**
186            * Returns a range of all the roles.
187            *
188            * <p>
189            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
190            * </p>
191            *
192            * @param start the lower bound of the range of roles
193            * @param end the upper bound of the range of roles (not inclusive)
194            * @return the range of roles
195            * @throws SystemException if a system exception occurred
196            */
197            public java.util.List<com.liferay.portal.model.Role> getRoles(int start,
198                    int end) throws com.liferay.portal.kernel.exception.SystemException {
199                    return _roleLocalService.getRoles(start, end);
200            }
201    
202            /**
203            * Returns the number of roles.
204            *
205            * @return the number of roles
206            * @throws SystemException if a system exception occurred
207            */
208            public int getRolesCount()
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return _roleLocalService.getRolesCount();
211            }
212    
213            /**
214            * Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
215            *
216            * @param role the role
217            * @return the role that was updated
218            * @throws SystemException if a system exception occurred
219            */
220            public com.liferay.portal.model.Role updateRole(
221                    com.liferay.portal.model.Role role)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return _roleLocalService.updateRole(role);
224            }
225    
226            /**
227            * Returns the Spring bean ID for this bean.
228            *
229            * @return the Spring bean ID for this bean
230            */
231            public java.lang.String getBeanIdentifier() {
232                    return _roleLocalService.getBeanIdentifier();
233            }
234    
235            /**
236            * Sets the Spring bean ID for this bean.
237            *
238            * @param beanIdentifier the Spring bean ID for this bean
239            */
240            public void setBeanIdentifier(java.lang.String beanIdentifier) {
241                    _roleLocalService.setBeanIdentifier(beanIdentifier);
242            }
243    
244            /**
245            * Adds a role. The user is reindexed after role is added.
246            *
247            * @param userId the primary key of the user
248            * @param companyId the primary key of the company
249            * @param name the role's name
250            * @param titleMap the role's localized titles (optionally
251            <code>null</code>)
252            * @param descriptionMap the role's localized descriptions (optionally
253            <code>null</code>)
254            * @param type the role's type (optionally <code>0</code>)
255            * @return the role
256            * @throws PortalException if the class name or the role name were
257            invalid, if the role is a duplicate, or if a user with the
258            primary key could not be found
259            * @throws SystemException if a system exception occurred
260            * @deprecated {@link #addRole(long, String, long, String, Map, Map, int,
261            String)}
262            */
263            public com.liferay.portal.model.Role addRole(long userId, long companyId,
264                    java.lang.String name,
265                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
266                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
267                    int type)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException {
270                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
271                            descriptionMap, type);
272            }
273    
274            /**
275            * Adds a role with additional parameters. The user is reindexed after role
276            * is added.
277            *
278            * @param userId the primary key of the user
279            * @param companyId the primary key of the company
280            * @param name the role's name
281            * @param titleMap the role's localized titles (optionally
282            <code>null</code>)
283            * @param descriptionMap the role's localized descriptions (optionally
284            <code>null</code>)
285            * @param type the role's type (optionally <code>0</code>)
286            * @param className the name of the class for which the role is created
287            (optionally <code>null</code>)
288            * @param classPK the primary key of the class for which the role is
289            created (optionally <code>0</code>)
290            * @return the role
291            * @throws PortalException if the class name or the role name were
292            invalid, if the role is a duplicate, or if a user with the
293            primary key could not be found
294            * @throws SystemException if a system exception occurred
295            * @deprecated {@link #addRole(long, String, long, String, Map, Map, int,
296            String)}
297            */
298            public com.liferay.portal.model.Role addRole(long userId, long companyId,
299                    java.lang.String name,
300                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
301                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
302                    int type, java.lang.String className, long classPK)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException {
305                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
306                            descriptionMap, type, className, classPK);
307            }
308    
309            /**
310            * Adds a role with additional parameters. The user is reindexed after role
311            * is added.
312            *
313            * @param userId the primary key of the user
314            * @param className the name of the class for which the role is created
315            (optionally <code>null</code>)
316            * @param classPK the primary key of the class for which the role is
317            created (optionally <code>0</code>)
318            * @param name the role's name
319            * @param titleMap the role's localized titles (optionally
320            <code>null</code>)
321            * @param descriptionMap the role's localized descriptions (optionally
322            <code>null</code>)
323            * @param type the role's type (optionally <code>0</code>)
324            * @param subType the role's subtype (optionally <code>null</code>)
325            * @return the role
326            * @throws PortalException if the class name or the role name were invalid,
327            if the role is a duplicate, or if a user with the primary key
328            could not be found
329            * @throws SystemException if a system exception occurred
330            */
331            public com.liferay.portal.model.Role addRole(long userId,
332                    java.lang.String className, long classPK, java.lang.String name,
333                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
334                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
335                    int type, java.lang.String subType)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException {
338                    return _roleLocalService.addRole(userId, className, classPK, name,
339                            titleMap, descriptionMap, type, subType);
340            }
341    
342            /**
343            * Adds the roles to the user. The user is reindexed after the roles are
344            * added.
345            *
346            * @param userId the primary key of the user
347            * @param roleIds the primary keys of the roles
348            * @throws PortalException if a user with the primary key could not be found
349            * @throws SystemException if a system exception occurred
350            * @see com.liferay.portal.service.persistence.UserPersistence#addRoles(
351            long, long[])
352            */
353            public void addUserRoles(long userId, long[] roleIds)
354                    throws com.liferay.portal.kernel.exception.PortalException,
355                            com.liferay.portal.kernel.exception.SystemException {
356                    _roleLocalService.addUserRoles(userId, roleIds);
357            }
358    
359            /**
360            * Checks to ensure that the system roles map has appropriate default roles
361            * in each company.
362            *
363            * @throws PortalException if the current user did not have permission to
364            set applicable permissions on a role
365            * @throws SystemException if a system exception occurred
366            */
367            public void checkSystemRoles()
368                    throws com.liferay.portal.kernel.exception.PortalException,
369                            com.liferay.portal.kernel.exception.SystemException {
370                    _roleLocalService.checkSystemRoles();
371            }
372    
373            /**
374            * Checks to ensure that the system roles map has appropriate default roles
375            * in the company.
376            *
377            * @param companyId the primary key of the company
378            * @throws PortalException if the current user did not have permission to
379            set applicable permissions on a role
380            * @throws SystemException if a system exception occurred
381            */
382            public void checkSystemRoles(long companyId)
383                    throws com.liferay.portal.kernel.exception.PortalException,
384                            com.liferay.portal.kernel.exception.SystemException {
385                    _roleLocalService.checkSystemRoles(companyId);
386            }
387    
388            /**
389            * Returns the role with the name in the company.
390            *
391            * <p>
392            * The method searches the system roles map first for default roles. If a
393            * role with the name is not found, then the method will query the database.
394            * </p>
395            *
396            * @param companyId the primary key of the company
397            * @param name the role's name
398            * @return Returns the role with the name or <code>null</code> if a role
399            with the name could not be found in the company
400            * @throws SystemException if a system exception occurred
401            */
402            public com.liferay.portal.model.Role fetchRole(long companyId,
403                    java.lang.String name)
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    return _roleLocalService.fetchRole(companyId, name);
406            }
407    
408            /**
409            * Returns the default role for the group with the primary key.
410            *
411            * <p>
412            * If the group is a site, then the default role is {@link
413            * com.liferay.portal.model.RoleConstants#SITE_MEMBER}. If the group is an
414            * organization, then the default role is {@link
415            * com.liferay.portal.model.RoleConstants#ORGANIZATION_USER}. If the group
416            * is a user or user group, then the default role is {@link
417            * com.liferay.portal.model.RoleConstants#POWER_USER}. For all other group
418            * types, the default role is {@link
419            * com.liferay.portal.model.RoleConstants#USER}.
420            * </p>
421            *
422            * @param groupId the primary key of the group
423            * @return the default role for the group with the primary key
424            * @throws PortalException if a group with the primary key could not be
425            found, or if a default role could not be found for the group
426            * @throws SystemException if a system exception occurred
427            */
428            public com.liferay.portal.model.Role getDefaultGroupRole(long groupId)
429                    throws com.liferay.portal.kernel.exception.PortalException,
430                            com.liferay.portal.kernel.exception.SystemException {
431                    return _roleLocalService.getDefaultGroupRole(groupId);
432            }
433    
434            /**
435            * Returns all the roles associated with the group.
436            *
437            * @param groupId the primary key of the group
438            * @return the roles associated with the group
439            * @throws SystemException if a system exception occurred
440            */
441            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
442                    long groupId)
443                    throws com.liferay.portal.kernel.exception.SystemException {
444                    return _roleLocalService.getGroupRoles(groupId);
445            }
446    
447            public java.util.List<com.liferay.portal.model.Role> getResourceBlockRoles(
448                    long resourceBlockId, java.lang.String className,
449                    java.lang.String actionId)
450                    throws com.liferay.portal.kernel.exception.SystemException {
451                    return _roleLocalService.getResourceBlockRoles(resourceBlockId,
452                            className, actionId);
453            }
454    
455            /**
456            * Returns a map of role names to associated action IDs for the named
457            * resource in the company within the permission scope.
458            *
459            * @param companyId the primary key of the company
460            * @param name the resource name
461            * @param scope the permission scope
462            * @param primKey the primary key of the resource's class
463            * @return the role names and action IDs
464            * @throws SystemException if a system exception occurred
465            * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P(
466            long, String, int, String)
467            */
468            public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getResourceRoles(
469                    long companyId, java.lang.String name, int scope,
470                    java.lang.String primKey)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    return _roleLocalService.getResourceRoles(companyId, name, scope,
473                            primKey);
474            }
475    
476            /**
477            * Returns all the roles associated with the action ID in the company within
478            * the permission scope.
479            *
480            * @param companyId the primary key of the company
481            * @param name the resource name
482            * @param scope the permission scope
483            * @param primKey the primary key of the resource's class
484            * @param actionId the name of the resource action
485            * @return the roles
486            * @throws SystemException if a system exception occurred
487            * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P_A(
488            long, String, int, String, String)
489            */
490            public java.util.List<com.liferay.portal.model.Role> getResourceRoles(
491                    long companyId, java.lang.String name, int scope,
492                    java.lang.String primKey, java.lang.String actionId)
493                    throws com.liferay.portal.kernel.exception.SystemException {
494                    return _roleLocalService.getResourceRoles(companyId, name, scope,
495                            primKey, actionId);
496            }
497    
498            /**
499            * Returns the role with the name in the company.
500            *
501            * <p>
502            * The method searches the system roles map first for default roles. If a
503            * role with the name is not found, then the method will query the database.
504            * </p>
505            *
506            * @param companyId the primary key of the company
507            * @param name the role's name
508            * @return the role with the name
509            * @throws PortalException if a role with the name could not be found in the
510            company
511            * @throws SystemException if a system exception occurred
512            */
513            public com.liferay.portal.model.Role getRole(long companyId,
514                    java.lang.String name)
515                    throws com.liferay.portal.kernel.exception.PortalException,
516                            com.liferay.portal.kernel.exception.SystemException {
517                    return _roleLocalService.getRole(companyId, name);
518            }
519    
520            /**
521            * Returns all the roles of the type and subtype.
522            *
523            * @param type the role's type (optionally <code>0</code>)
524            * @param subtype the role's subtype (optionally <code>null</code>)
525            * @return the roles of the type and subtype
526            * @throws SystemException if a system exception occurred
527            */
528            public java.util.List<com.liferay.portal.model.Role> getRoles(int type,
529                    java.lang.String subtype)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return _roleLocalService.getRoles(type, subtype);
532            }
533    
534            /**
535            * Returns all the roles in the company.
536            *
537            * @param companyId the primary key of the company
538            * @return the roles in the company
539            * @throws SystemException if a system exception occurred
540            */
541            public java.util.List<com.liferay.portal.model.Role> getRoles(
542                    long companyId)
543                    throws com.liferay.portal.kernel.exception.SystemException {
544                    return _roleLocalService.getRoles(companyId);
545            }
546    
547            /**
548            * Returns all the roles with the primary keys.
549            *
550            * @param roleIds the primary keys of the roles
551            * @return the roles with the primary keys
552            * @throws PortalException if any one of the roles with the primary keys
553            could not be found
554            * @throws SystemException if a system exception occurred
555            */
556            public java.util.List<com.liferay.portal.model.Role> getRoles(
557                    long[] roleIds)
558                    throws com.liferay.portal.kernel.exception.PortalException,
559                            com.liferay.portal.kernel.exception.SystemException {
560                    return _roleLocalService.getRoles(roleIds);
561            }
562    
563            /**
564            * Returns all the roles of the subtype.
565            *
566            * @param subtype the role's subtype (optionally <code>null</code>)
567            * @return the roles of the subtype
568            * @throws SystemException if a system exception occurred
569            */
570            public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles(
571                    java.lang.String subtype)
572                    throws com.liferay.portal.kernel.exception.SystemException {
573                    return _roleLocalService.getSubtypeRoles(subtype);
574            }
575    
576            /**
577            * Returns the number of roles of the subtype.
578            *
579            * @param subtype the role's subtype (optionally <code>null</code>)
580            * @return the number of roles of the subtype
581            * @throws SystemException if a system exception occurred
582            */
583            public int getSubtypeRolesCount(java.lang.String subtype)
584                    throws com.liferay.portal.kernel.exception.SystemException {
585                    return _roleLocalService.getSubtypeRolesCount(subtype);
586            }
587    
588            /**
589            * Returns the team role in the company.
590            *
591            * @param companyId the primary key of the company
592            * @param teamId the primary key of the team
593            * @return the team role in the company
594            * @throws PortalException if a role could not be found in the team and
595            company
596            * @throws SystemException if a system exception occurred
597            */
598            public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId)
599                    throws com.liferay.portal.kernel.exception.PortalException,
600                            com.liferay.portal.kernel.exception.SystemException {
601                    return _roleLocalService.getTeamRole(companyId, teamId);
602            }
603    
604            /**
605            * Returns all the user's roles within the user group.
606            *
607            * @param userId the primary key of the user
608            * @param groupId the primary key of the group
609            * @return the user's roles within the user group
610            * @throws SystemException if a system exception occurred
611            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupGroupRole(
612            long, long)
613            */
614            public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(
615                    long userId, long groupId)
616                    throws com.liferay.portal.kernel.exception.SystemException {
617                    return _roleLocalService.getUserGroupGroupRoles(userId, groupId);
618            }
619    
620            /**
621            * Returns all the user's roles within the user group.
622            *
623            * @param userId the primary key of the user
624            * @param groupId the primary key of the group
625            * @return the user's roles within the user group
626            * @throws SystemException if a system exception occurred
627            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupRole(
628            long, long)
629            */
630            public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
631                    long userId, long groupId)
632                    throws com.liferay.portal.kernel.exception.SystemException {
633                    return _roleLocalService.getUserGroupRoles(userId, groupId);
634            }
635    
636            /**
637            * Returns the union of all the user's roles within the groups.
638            *
639            * @param userId the primary key of the user
640            * @param groups the groups (optionally <code>null</code>)
641            * @return the union of all the user's roles within the groups
642            * @throws SystemException if a system exception occurred
643            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
644            long, List)
645            */
646            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
647                    long userId, java.util.List<com.liferay.portal.model.Group> groups)
648                    throws com.liferay.portal.kernel.exception.SystemException {
649                    return _roleLocalService.getUserRelatedRoles(userId, groups);
650            }
651    
652            /**
653            * Returns all the user's roles within the group.
654            *
655            * @param userId the primary key of the user
656            * @param groupId the primary key of the group
657            * @return the user's roles within the group
658            * @throws SystemException if a system exception occurred
659            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
660            long, long)
661            */
662            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
663                    long userId, long groupId)
664                    throws com.liferay.portal.kernel.exception.SystemException {
665                    return _roleLocalService.getUserRelatedRoles(userId, groupId);
666            }
667    
668            /**
669            * Returns the union of all the user's roles within the groups.
670            *
671            * @param userId the primary key of the user
672            * @param groupIds the primary keys of the groups
673            * @return the union of all the user's roles within the groups
674            * @throws SystemException if a system exception occurred
675            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
676            long, long[])
677            */
678            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
679                    long userId, long[] groupIds)
680                    throws com.liferay.portal.kernel.exception.SystemException {
681                    return _roleLocalService.getUserRelatedRoles(userId, groupIds);
682            }
683    
684            /**
685            * Returns all the roles associated with the user.
686            *
687            * @param userId the primary key of the user
688            * @return the roles associated with the user
689            * @throws SystemException if a system exception occurred
690            */
691            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
692                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
693                    return _roleLocalService.getUserRoles(userId);
694            }
695    
696            /**
697            * Returns <code>true</code> if the user is associated with the role.
698            *
699            * @param userId the primary key of the user
700            * @param roleId the primary key of the role
701            * @return <code>true</code> if the user is associated with the role;
702            <code>false</code> otherwise
703            * @throws SystemException if a system exception occurred
704            */
705            public boolean hasUserRole(long userId, long roleId)
706                    throws com.liferay.portal.kernel.exception.SystemException {
707                    return _roleLocalService.hasUserRole(userId, roleId);
708            }
709    
710            /**
711            * Returns <code>true</code> if the user is associated with the named
712            * regular role.
713            *
714            * @param userId the primary key of the user
715            * @param companyId the primary key of the company
716            * @param name the name of the role
717            * @param inherited whether to include the user's inherited roles in the
718            search
719            * @return <code>true</code> if the user is associated with the regular
720            role; <code>false</code> otherwise
721            * @throws PortalException if a role with the name could not be found in the
722            company or if a default user for the company could not be found
723            * @throws SystemException if a system exception occurred
724            */
725            public boolean hasUserRole(long userId, long companyId,
726                    java.lang.String name, boolean inherited)
727                    throws com.liferay.portal.kernel.exception.PortalException,
728                            com.liferay.portal.kernel.exception.SystemException {
729                    return _roleLocalService.hasUserRole(userId, companyId, name, inherited);
730            }
731    
732            /**
733            * Returns <code>true</code> if the user has any one of the named regular
734            * roles.
735            *
736            * @param userId the primary key of the user
737            * @param companyId the primary key of the company
738            * @param names the names of the roles
739            * @param inherited whether to include the user's inherited roles in the
740            search
741            * @return <code>true</code> if the user has any one of the regular roles;
742            <code>false</code> otherwise
743            * @throws PortalException if any one of the roles with the names could not
744            be found in the company or if the default user for the company
745            could not be found
746            * @throws SystemException if a system exception occurred
747            */
748            public boolean hasUserRoles(long userId, long companyId,
749                    java.lang.String[] names, boolean inherited)
750                    throws com.liferay.portal.kernel.exception.PortalException,
751                            com.liferay.portal.kernel.exception.SystemException {
752                    return _roleLocalService.hasUserRoles(userId, companyId, names,
753                            inherited);
754            }
755    
756            /**
757            * Returns a role with the name in the company.
758            *
759            * @param companyId the primary key of the company
760            * @param name the role's name (optionally <code>null</code>)
761            * @return the role with the name, or <code>null</code> if a role with the
762            name could not be found in the company
763            * @throws SystemException if a system exception occurred
764            */
765            public com.liferay.portal.model.Role loadFetchRole(long companyId,
766                    java.lang.String name)
767                    throws com.liferay.portal.kernel.exception.SystemException {
768                    return _roleLocalService.loadFetchRole(companyId, name);
769            }
770    
771            /**
772            * Returns a role with the name in the company.
773            *
774            * @param companyId the primary key of the company
775            * @param name the role's name
776            * @return the role with the name in the company
777            * @throws PortalException if a role with the name could not be found in the
778            company
779            * @throws SystemException if a system exception occurred
780            */
781            public com.liferay.portal.model.Role loadGetRole(long companyId,
782                    java.lang.String name)
783                    throws com.liferay.portal.kernel.exception.PortalException,
784                            com.liferay.portal.kernel.exception.SystemException {
785                    return _roleLocalService.loadGetRole(companyId, name);
786            }
787    
788            /**
789            * Returns an ordered range of all the roles that match the keywords and
790            * types.
791            *
792            * <p>
793            * Useful when paginating results. Returns a maximum of <code>end -
794            * start</code> instances. <code>start</code> and <code>end</code> are not
795            * primary keys, they are indexes in the result set. Thus, <code>0</code>
796            * refers to the first result in the set. Setting both <code>start</code>
797            * and <code>end</code> to {@link
798            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
799            * result set.
800            * </p>
801            *
802            * @param companyId the primary key of the company
803            * @param keywords the keywords (space separated), which may occur in the
804            role's name or description (optionally <code>null</code>)
805            * @param types the role types (optionally <code>null</code>)
806            * @param start the lower bound of the range of roles to return
807            * @param end the upper bound of the range of roles to return (not
808            inclusive)
809            * @param obc the comparator to order the roles (optionally
810            <code>null</code>)
811            * @return the ordered range of the matching roles, ordered by
812            <code>obc</code>
813            * @throws SystemException if a system exception occurred
814            * @see com.liferay.portal.service.persistence.RoleFinder
815            */
816            public java.util.List<com.liferay.portal.model.Role> search(
817                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
818                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
819                    throws com.liferay.portal.kernel.exception.SystemException {
820                    return _roleLocalService.search(companyId, keywords, types, start, end,
821                            obc);
822            }
823    
824            /**
825            * Returns an ordered range of all the roles that match the keywords, types,
826            * and params.
827            *
828            * <p>
829            * Useful when paginating results. Returns a maximum of <code>end -
830            * start</code> instances. <code>start</code> and <code>end</code> are not
831            * primary keys, they are indexes in the result set. Thus, <code>0</code>
832            * refers to the first result in the set. Setting both <code>start</code>
833            * and <code>end</code> to {@link
834            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
835            * result set.
836            * </p>
837            *
838            * @param companyId the primary key of the company
839            * @param keywords the keywords (space separated), which may occur in the
840            role's name or description (optionally <code>null</code>)
841            * @param types the role types (optionally <code>null</code>)
842            * @param params the finder parameters. Can specify values for the
843            "usersRoles" key. For more information, see {@link
844            com.liferay.portal.service.persistence.RoleFinder}
845            * @param start the lower bound of the range of roles to return
846            * @param end the upper bound of the range of roles to return (not
847            inclusive)
848            * @param obc the comparator to order the roles (optionally
849            <code>null</code>)
850            * @return the ordered range of the matching roles, ordered by
851            <code>obc</code>
852            * @throws SystemException if a system exception occurred
853            * @see com.liferay.portal.service.persistence.RoleFinder
854            */
855            public java.util.List<com.liferay.portal.model.Role> search(
856                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
857                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
858                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
859                    throws com.liferay.portal.kernel.exception.SystemException {
860                    return _roleLocalService.search(companyId, keywords, types, params,
861                            start, end, obc);
862            }
863    
864            /**
865            * Returns an ordered range of all the roles that match the name,
866            * description, and types.
867            *
868            * <p>
869            * Useful when paginating results. Returns a maximum of <code>end -
870            * start</code> instances. <code>start</code> and <code>end</code> are not
871            * primary keys, they are indexes in the result set. Thus, <code>0</code>
872            * refers to the first result in the set. Setting both <code>start</code>
873            * and <code>end</code> to {@link
874            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
875            * result set.
876            * </p>
877            *
878            * @param companyId the primary key of the company
879            * @param name the role's name (optionally <code>null</code>)
880            * @param description the role's description (optionally <code>null</code>)
881            * @param types the role types (optionally <code>null</code>)
882            * @param start the lower bound of the range of the roles to return
883            * @param end the upper bound of the range of the roles to return (not
884            inclusive)
885            * @param obc the comparator to order the roles (optionally
886            <code>null</code>)
887            * @return the ordered range of the matching roles, ordered by
888            <code>obc</code>
889            * @throws SystemException if a system exception occurred
890            * @see com.liferay.portal.service.persistence.RoleFinder
891            */
892            public java.util.List<com.liferay.portal.model.Role> search(
893                    long companyId, java.lang.String name, java.lang.String description,
894                    java.lang.Integer[] types, int start, int end,
895                    com.liferay.portal.kernel.util.OrderByComparator obc)
896                    throws com.liferay.portal.kernel.exception.SystemException {
897                    return _roleLocalService.search(companyId, name, description, types,
898                            start, end, obc);
899            }
900    
901            /**
902            * Returns an ordered range of all the roles that match the name,
903            * description, types, and params.
904            *
905            * <p>
906            * Useful when paginating results. Returns a maximum of <code>end -
907            * start</code> instances. <code>start</code> and <code>end</code> are not
908            * primary keys, they are indexes in the result set. Thus, <code>0</code>
909            * refers to the first result in the set. Setting both <code>start</code>
910            * and <code>end</code> to {@link
911            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
912            * result set.
913            * </p>
914            *
915            * @param companyId the primary key of the company
916            * @param name the role's name (optionally <code>null</code>)
917            * @param description the role's description (optionally <code>null</code>)
918            * @param types the role types (optionally <code>null</code>)
919            * @param params the finder's parameters. Can specify values for the
920            "usersRoles" key. For more information, see {@link
921            com.liferay.portal.service.persistence.RoleFinder}
922            * @param start the lower bound of the range of the roles to return
923            * @param end the upper bound of the range of the roles to return (not
924            inclusive)
925            * @param obc the comparator to order the roles (optionally
926            <code>null</code>)
927            * @return the ordered range of the matching roles, ordered by
928            <code>obc</code>
929            * @throws SystemException if a system exception occurred
930            * @see com.liferay.portal.service.persistence.RoleFinder
931            */
932            public java.util.List<com.liferay.portal.model.Role> search(
933                    long companyId, java.lang.String name, java.lang.String description,
934                    java.lang.Integer[] types,
935                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
936                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
937                    throws com.liferay.portal.kernel.exception.SystemException {
938                    return _roleLocalService.search(companyId, name, description, types,
939                            params, start, end, obc);
940            }
941    
942            /**
943            * Returns the number of roles that match the keywords and types.
944            *
945            * @param companyId the primary key of the company
946            * @param keywords the keywords (space separated), which may occur in the
947            role's name or description (optionally <code>null</code>)
948            * @param types the role types (optionally <code>null</code>)
949            * @return the number of matching roles
950            * @throws SystemException if a system exception occurred
951            */
952            public int searchCount(long companyId, java.lang.String keywords,
953                    java.lang.Integer[] types)
954                    throws com.liferay.portal.kernel.exception.SystemException {
955                    return _roleLocalService.searchCount(companyId, keywords, types);
956            }
957    
958            /**
959            * Returns the number of roles that match the keywords, types and params.
960            *
961            * @param companyId the primary key of the company
962            * @param keywords the keywords (space separated), which may occur in the
963            role's name or description (optionally <code>null</code>)
964            * @param types the role types (optionally <code>null</code>)
965            * @param params the finder parameters. For more information, see {@link
966            com.liferay.portal.service.persistence.RoleFinder}
967            * @return the number of matching roles
968            * @throws SystemException if a system exception occurred
969            */
970            public int searchCount(long companyId, java.lang.String keywords,
971                    java.lang.Integer[] types,
972                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
973                    throws com.liferay.portal.kernel.exception.SystemException {
974                    return _roleLocalService.searchCount(companyId, keywords, types, params);
975            }
976    
977            /**
978            * Returns the number of roles that match the name, description, and types.
979            *
980            * @param companyId the primary key of the company
981            * @param name the role's name (optionally <code>null</code>)
982            * @param description the role's description (optionally <code>null</code>)
983            * @param types the role types (optionally <code>null</code>)
984            * @return the number of matching roles
985            * @throws SystemException if a system exception occurred
986            */
987            public int searchCount(long companyId, java.lang.String name,
988                    java.lang.String description, java.lang.Integer[] types)
989                    throws com.liferay.portal.kernel.exception.SystemException {
990                    return _roleLocalService.searchCount(companyId, name, description, types);
991            }
992    
993            /**
994            * Returns the number of roles that match the name, description, types, and
995            * params.
996            *
997            * @param companyId the primary key of the company
998            * @param name the role's name (optionally <code>null</code>)
999            * @param description the role's description (optionally <code>null</code>)
1000            * @param types the role types (optionally <code>null</code>)
1001            * @param params the finder parameters. Can specify values for the
1002            "usersRoles" key. For more information, see {@link
1003            com.liferay.portal.service.persistence.RoleFinder}
1004            * @return the number of matching roles
1005            * @throws SystemException if a system exception occurred
1006            */
1007            public int searchCount(long companyId, java.lang.String name,
1008                    java.lang.String description, java.lang.Integer[] types,
1009                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
1010                    throws com.liferay.portal.kernel.exception.SystemException {
1011                    return _roleLocalService.searchCount(companyId, name, description,
1012                            types, params);
1013            }
1014    
1015            /**
1016            * Sets the roles associated with the user, replacing the user's existing
1017            * roles. The user is reindexed after the roles are set.
1018            *
1019            * @param userId the primary key of the user
1020            * @param roleIds the primary keys of the roles
1021            * @throws PortalException if a user with the primary could not be found or
1022            if any one of the roles with the primary keys could not be found
1023            * @throws SystemException if a system exception occurred
1024            */
1025            public void setUserRoles(long userId, long[] roleIds)
1026                    throws com.liferay.portal.kernel.exception.PortalException,
1027                            com.liferay.portal.kernel.exception.SystemException {
1028                    _roleLocalService.setUserRoles(userId, roleIds);
1029            }
1030    
1031            /**
1032            * Removes the matching roles associated with the user. The user is
1033            * reindexed after the roles are removed.
1034            *
1035            * @param userId the primary key of the user
1036            * @param roleIds the primary keys of the roles
1037            * @throws PortalException if a user with the primary key could not be found
1038            or if a role with any one of the primary keys could not be found
1039            * @throws SystemException if a system exception occurred
1040            */
1041            public void unsetUserRoles(long userId, long[] roleIds)
1042                    throws com.liferay.portal.kernel.exception.PortalException,
1043                            com.liferay.portal.kernel.exception.SystemException {
1044                    _roleLocalService.unsetUserRoles(userId, roleIds);
1045            }
1046    
1047            /**
1048            * Updates the role with the primary key.
1049            *
1050            * @param roleId the primary key of the role
1051            * @param name the role's new name
1052            * @param titleMap the new localized titles (optionally <code>null</code>)
1053            to replace those existing for the role
1054            * @param descriptionMap the new localized descriptions (optionally
1055            <code>null</code>) to replace those existing for the role
1056            * @param subtype the role's new subtype (optionally <code>null</code>)
1057            * @return the role with the primary key
1058            * @throws PortalException if a role with the primary could not be found or
1059            if the role's name was invalid
1060            * @throws SystemException if a system exception occurred
1061            */
1062            public com.liferay.portal.model.Role updateRole(long roleId,
1063                    java.lang.String name,
1064                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1065                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1066                    java.lang.String subtype)
1067                    throws com.liferay.portal.kernel.exception.PortalException,
1068                            com.liferay.portal.kernel.exception.SystemException {
1069                    return _roleLocalService.updateRole(roleId, name, titleMap,
1070                            descriptionMap, subtype);
1071            }
1072    
1073            /**
1074             * @deprecated Renamed to {@link #getWrappedService}
1075             */
1076            public RoleLocalService getWrappedRoleLocalService() {
1077                    return _roleLocalService;
1078            }
1079    
1080            /**
1081             * @deprecated Renamed to {@link #setWrappedService}
1082             */
1083            public void setWrappedRoleLocalService(RoleLocalService roleLocalService) {
1084                    _roleLocalService = roleLocalService;
1085            }
1086    
1087            public RoleLocalService getWrappedService() {
1088                    return _roleLocalService;
1089            }
1090    
1091            public void setWrappedService(RoleLocalService roleLocalService) {
1092                    _roleLocalService = roleLocalService;
1093            }
1094    
1095            private RoleLocalService _roleLocalService;
1096    }