001    /**
002     * Copyright (c) 2000-2010 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 RoleLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       RoleLocalService
024     * @generated
025     */
026    public class RoleLocalServiceWrapper implements RoleLocalService {
027            public RoleLocalServiceWrapper(RoleLocalService roleLocalService) {
028                    _roleLocalService = roleLocalService;
029            }
030    
031            /**
032            * Adds the role to the database. Also notifies the appropriate model listeners.
033            *
034            * @param role the role to add
035            * @return the role that was added
036            * @throws SystemException if a system exception occurred
037            */
038            public com.liferay.portal.model.Role addRole(
039                    com.liferay.portal.model.Role role)
040                    throws com.liferay.portal.kernel.exception.SystemException {
041                    return _roleLocalService.addRole(role);
042            }
043    
044            /**
045            * Creates a new role with the primary key. Does not add the role to the database.
046            *
047            * @param roleId the primary key for the new role
048            * @return the new role
049            */
050            public com.liferay.portal.model.Role createRole(long roleId) {
051                    return _roleLocalService.createRole(roleId);
052            }
053    
054            /**
055            * Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.
056            *
057            * @param roleId the primary key of the role to delete
058            * @throws PortalException if a role with the primary key could not be found
059            * @throws SystemException if a system exception occurred
060            */
061            public void deleteRole(long roleId)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    _roleLocalService.deleteRole(roleId);
065            }
066    
067            /**
068            * Deletes the role from the database. Also notifies the appropriate model listeners.
069            *
070            * @param role the role to delete
071            * @throws SystemException if a system exception occurred
072            */
073            public void deleteRole(com.liferay.portal.model.Role role)
074                    throws com.liferay.portal.kernel.exception.SystemException {
075                    _roleLocalService.deleteRole(role);
076            }
077    
078            /**
079            * Performs a dynamic query on the database and returns the matching rows.
080            *
081            * @param dynamicQuery the dynamic query to search with
082            * @return the matching rows
083            * @throws SystemException if a system exception occurred
084            */
085            @SuppressWarnings("rawtypes")
086            public java.util.List dynamicQuery(
087                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
088                    throws com.liferay.portal.kernel.exception.SystemException {
089                    return _roleLocalService.dynamicQuery(dynamicQuery);
090            }
091    
092            /**
093            * Performs a dynamic query on the database and returns a range of the matching rows.
094            *
095            * <p>
096            * 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.
097            * </p>
098            *
099            * @param dynamicQuery the dynamic query to search with
100            * @param start the lower bound of the range of model instances to return
101            * @param end the upper bound of the range of model instances to return (not inclusive)
102            * @return the range of matching rows
103            * @throws SystemException if a system exception occurred
104            */
105            @SuppressWarnings("rawtypes")
106            public java.util.List dynamicQuery(
107                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
108                    int end) throws com.liferay.portal.kernel.exception.SystemException {
109                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end);
110            }
111    
112            /**
113            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
114            *
115            * <p>
116            * 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.
117            * </p>
118            *
119            * @param dynamicQuery the dynamic query to search with
120            * @param start the lower bound of the range of model instances to return
121            * @param end the upper bound of the range of model instances to return (not inclusive)
122            * @param orderByComparator the comparator to order the results by
123            * @return the ordered range of matching rows
124            * @throws SystemException if a system exception occurred
125            */
126            @SuppressWarnings("rawtypes")
127            public java.util.List dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
129                    int end,
130                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
131                    throws com.liferay.portal.kernel.exception.SystemException {
132                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end,
133                            orderByComparator);
134            }
135    
136            /**
137            * Counts the number of rows that match the dynamic query.
138            *
139            * @param dynamicQuery the dynamic query to search with
140            * @return the number of rows that match the dynamic query
141            * @throws SystemException if a system exception occurred
142            */
143            public long dynamicQueryCount(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
145                    throws com.liferay.portal.kernel.exception.SystemException {
146                    return _roleLocalService.dynamicQueryCount(dynamicQuery);
147            }
148    
149            /**
150            * Gets the role with the primary key.
151            *
152            * @param roleId the primary key of the role to get
153            * @return the role
154            * @throws PortalException if a role with the primary key could not be found
155            * @throws SystemException if a system exception occurred
156            */
157            public com.liferay.portal.model.Role getRole(long roleId)
158                    throws com.liferay.portal.kernel.exception.PortalException,
159                            com.liferay.portal.kernel.exception.SystemException {
160                    return _roleLocalService.getRole(roleId);
161            }
162    
163            /**
164            * Gets a range of all the roles.
165            *
166            * <p>
167            * 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.
168            * </p>
169            *
170            * @param start the lower bound of the range of roles to return
171            * @param end the upper bound of the range of roles to return (not inclusive)
172            * @return the range of roles
173            * @throws SystemException if a system exception occurred
174            */
175            public java.util.List<com.liferay.portal.model.Role> getRoles(int start,
176                    int end) throws com.liferay.portal.kernel.exception.SystemException {
177                    return _roleLocalService.getRoles(start, end);
178            }
179    
180            /**
181            * Gets the number of roles.
182            *
183            * @return the number of roles
184            * @throws SystemException if a system exception occurred
185            */
186            public int getRolesCount()
187                    throws com.liferay.portal.kernel.exception.SystemException {
188                    return _roleLocalService.getRolesCount();
189            }
190    
191            /**
192            * Updates the role in the database. Also notifies the appropriate model listeners.
193            *
194            * @param role the role to update
195            * @return the role that was updated
196            * @throws SystemException if a system exception occurred
197            */
198            public com.liferay.portal.model.Role updateRole(
199                    com.liferay.portal.model.Role role)
200                    throws com.liferay.portal.kernel.exception.SystemException {
201                    return _roleLocalService.updateRole(role);
202            }
203    
204            /**
205            * Updates the role in the database. Also notifies the appropriate model listeners.
206            *
207            * @param role the role to update
208            * @param merge whether to merge the role 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.
209            * @return the role that was updated
210            * @throws SystemException if a system exception occurred
211            */
212            public com.liferay.portal.model.Role updateRole(
213                    com.liferay.portal.model.Role role, boolean merge)
214                    throws com.liferay.portal.kernel.exception.SystemException {
215                    return _roleLocalService.updateRole(role, merge);
216            }
217    
218            public com.liferay.portal.model.Role addRole(long userId, long companyId,
219                    java.lang.String name,
220                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
221                    java.lang.String description, int type)
222                    throws com.liferay.portal.kernel.exception.PortalException,
223                            com.liferay.portal.kernel.exception.SystemException {
224                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
225                            description, type);
226            }
227    
228            public com.liferay.portal.model.Role addRole(long userId, long companyId,
229                    java.lang.String name,
230                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
231                    java.lang.String description, int type, java.lang.String className,
232                    long classPK)
233                    throws com.liferay.portal.kernel.exception.PortalException,
234                            com.liferay.portal.kernel.exception.SystemException {
235                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
236                            description, type, className, classPK);
237            }
238    
239            public void addUserRoles(long userId, long[] roleIds)
240                    throws com.liferay.portal.kernel.exception.PortalException,
241                            com.liferay.portal.kernel.exception.SystemException {
242                    _roleLocalService.addUserRoles(userId, roleIds);
243            }
244    
245            public void checkSystemRoles(long companyId)
246                    throws com.liferay.portal.kernel.exception.PortalException,
247                            com.liferay.portal.kernel.exception.SystemException {
248                    _roleLocalService.checkSystemRoles(companyId);
249            }
250    
251            public com.liferay.portal.model.Role getDefaultGroupRole(long groupId)
252                    throws com.liferay.portal.kernel.exception.PortalException,
253                            com.liferay.portal.kernel.exception.SystemException {
254                    return _roleLocalService.getDefaultGroupRole(groupId);
255            }
256    
257            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
258                    long groupId)
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    return _roleLocalService.getGroupRoles(groupId);
261            }
262    
263            public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getResourceRoles(
264                    long companyId, java.lang.String name, int scope,
265                    java.lang.String primKey)
266                    throws com.liferay.portal.kernel.exception.SystemException {
267                    return _roleLocalService.getResourceRoles(companyId, name, scope,
268                            primKey);
269            }
270    
271            public com.liferay.portal.model.Role getRole(long companyId,
272                    java.lang.String name)
273                    throws com.liferay.portal.kernel.exception.PortalException,
274                            com.liferay.portal.kernel.exception.SystemException {
275                    return _roleLocalService.getRole(companyId, name);
276            }
277    
278            public java.util.List<com.liferay.portal.model.Role> getRoles(
279                    long companyId)
280                    throws com.liferay.portal.kernel.exception.SystemException {
281                    return _roleLocalService.getRoles(companyId);
282            }
283    
284            public java.util.List<com.liferay.portal.model.Role> getRoles(
285                    long[] roleIds)
286                    throws com.liferay.portal.kernel.exception.PortalException,
287                            com.liferay.portal.kernel.exception.SystemException {
288                    return _roleLocalService.getRoles(roleIds);
289            }
290    
291            public java.util.List<com.liferay.portal.model.Role> getRoles(int type,
292                    java.lang.String subtype)
293                    throws com.liferay.portal.kernel.exception.SystemException {
294                    return _roleLocalService.getRoles(type, subtype);
295            }
296    
297            public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles(
298                    java.lang.String subtype)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return _roleLocalService.getSubtypeRoles(subtype);
301            }
302    
303            public int getSubtypeRolesCount(java.lang.String subtype)
304                    throws com.liferay.portal.kernel.exception.SystemException {
305                    return _roleLocalService.getSubtypeRolesCount(subtype);
306            }
307    
308            public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId)
309                    throws com.liferay.portal.kernel.exception.PortalException,
310                            com.liferay.portal.kernel.exception.SystemException {
311                    return _roleLocalService.getTeamRole(companyId, teamId);
312            }
313    
314            public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(
315                    long userId, long groupId)
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    return _roleLocalService.getUserGroupGroupRoles(userId, groupId);
318            }
319    
320            public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
321                    long userId, long groupId)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return _roleLocalService.getUserGroupRoles(userId, groupId);
324            }
325    
326            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
327                    long userId, long groupId)
328                    throws com.liferay.portal.kernel.exception.SystemException {
329                    return _roleLocalService.getUserRelatedRoles(userId, groupId);
330            }
331    
332            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
333                    long userId, long[] groupIds)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    return _roleLocalService.getUserRelatedRoles(userId, groupIds);
336            }
337    
338            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
339                    long userId, java.util.List<com.liferay.portal.model.Group> groups)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return _roleLocalService.getUserRelatedRoles(userId, groups);
342            }
343    
344            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
345                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
346                    return _roleLocalService.getUserRoles(userId);
347            }
348    
349            public boolean hasUserRole(long userId, long roleId)
350                    throws com.liferay.portal.kernel.exception.SystemException {
351                    return _roleLocalService.hasUserRole(userId, roleId);
352            }
353    
354            /**
355            * Returns <code>true</code> if the user has the regular role.
356            *
357            * @return <code>true</code> if the user has the regular role
358            */
359            public boolean hasUserRole(long userId, long companyId,
360                    java.lang.String name, boolean inherited)
361                    throws com.liferay.portal.kernel.exception.PortalException,
362                            com.liferay.portal.kernel.exception.SystemException {
363                    return _roleLocalService.hasUserRole(userId, companyId, name, inherited);
364            }
365    
366            /**
367            * Returns <code>true</code> if the user has any one of the specified
368            * regular roles.
369            *
370            * @return <code>true</code> if the user has the regular role
371            */
372            public boolean hasUserRoles(long userId, long companyId,
373                    java.lang.String[] names, boolean inherited)
374                    throws com.liferay.portal.kernel.exception.PortalException,
375                            com.liferay.portal.kernel.exception.SystemException {
376                    return _roleLocalService.hasUserRoles(userId, companyId, names,
377                            inherited);
378            }
379    
380            public java.util.List<com.liferay.portal.model.Role> search(
381                    long companyId, java.lang.String name, java.lang.String description,
382                    java.lang.Integer[] types, int start, int end,
383                    com.liferay.portal.kernel.util.OrderByComparator obc)
384                    throws com.liferay.portal.kernel.exception.SystemException {
385                    return _roleLocalService.search(companyId, name, description, types,
386                            start, end, obc);
387            }
388    
389            public java.util.List<com.liferay.portal.model.Role> search(
390                    long companyId, java.lang.String name, java.lang.String description,
391                    java.lang.Integer[] types,
392                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
393                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
394                    throws com.liferay.portal.kernel.exception.SystemException {
395                    return _roleLocalService.search(companyId, name, description, types,
396                            params, start, end, obc);
397            }
398    
399            public int searchCount(long companyId, java.lang.String name,
400                    java.lang.String description, java.lang.Integer[] types)
401                    throws com.liferay.portal.kernel.exception.SystemException {
402                    return _roleLocalService.searchCount(companyId, name, description, types);
403            }
404    
405            public int searchCount(long companyId, java.lang.String name,
406                    java.lang.String description, java.lang.Integer[] types,
407                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
408                    throws com.liferay.portal.kernel.exception.SystemException {
409                    return _roleLocalService.searchCount(companyId, name, description,
410                            types, params);
411            }
412    
413            public void setUserRoles(long userId, long[] roleIds)
414                    throws com.liferay.portal.kernel.exception.PortalException,
415                            com.liferay.portal.kernel.exception.SystemException {
416                    _roleLocalService.setUserRoles(userId, roleIds);
417            }
418    
419            public void unsetUserRoles(long userId, long[] roleIds)
420                    throws com.liferay.portal.kernel.exception.PortalException,
421                            com.liferay.portal.kernel.exception.SystemException {
422                    _roleLocalService.unsetUserRoles(userId, roleIds);
423            }
424    
425            public com.liferay.portal.model.Role updateRole(long roleId,
426                    java.lang.String name,
427                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
428                    java.lang.String description, java.lang.String subtype)
429                    throws com.liferay.portal.kernel.exception.PortalException,
430                            com.liferay.portal.kernel.exception.SystemException {
431                    return _roleLocalService.updateRole(roleId, name, titleMap,
432                            description, subtype);
433            }
434    
435            public RoleLocalService getWrappedRoleLocalService() {
436                    return _roleLocalService;
437            }
438    
439            private RoleLocalService _roleLocalService;
440    }