001    /**
002     * Copyright (c) 2000-2010 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 ResourcePermissionLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       ResourcePermissionLocalService
024     * @generated
025     */
026    public class ResourcePermissionLocalServiceWrapper
027            implements ResourcePermissionLocalService {
028            public ResourcePermissionLocalServiceWrapper(
029                    ResourcePermissionLocalService resourcePermissionLocalService) {
030                    _resourcePermissionLocalService = resourcePermissionLocalService;
031            }
032    
033            /**
034            * Adds the resource permission to the database. Also notifies the appropriate model listeners.
035            *
036            * @param resourcePermission the resource permission to add
037            * @return the resource permission that was added
038            * @throws SystemException if a system exception occurred
039            */
040            public com.liferay.portal.model.ResourcePermission addResourcePermission(
041                    com.liferay.portal.model.ResourcePermission resourcePermission)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return _resourcePermissionLocalService.addResourcePermission(resourcePermission);
044            }
045    
046            /**
047            * Creates a new resource permission with the primary key. Does not add the resource permission to the database.
048            *
049            * @param resourcePermissionId the primary key for the new resource permission
050            * @return the new resource permission
051            */
052            public com.liferay.portal.model.ResourcePermission createResourcePermission(
053                    long resourcePermissionId) {
054                    return _resourcePermissionLocalService.createResourcePermission(resourcePermissionId);
055            }
056    
057            /**
058            * Deletes the resource permission with the primary key from the database. Also notifies the appropriate model listeners.
059            *
060            * @param resourcePermissionId the primary key of the resource permission to delete
061            * @throws PortalException if a resource permission with the primary key could not be found
062            * @throws SystemException if a system exception occurred
063            */
064            public void deleteResourcePermission(long resourcePermissionId)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    _resourcePermissionLocalService.deleteResourcePermission(resourcePermissionId);
068            }
069    
070            /**
071            * Deletes the resource permission from the database. Also notifies the appropriate model listeners.
072            *
073            * @param resourcePermission the resource permission to delete
074            * @throws SystemException if a system exception occurred
075            */
076            public void deleteResourcePermission(
077                    com.liferay.portal.model.ResourcePermission resourcePermission)
078                    throws com.liferay.portal.kernel.exception.SystemException {
079                    _resourcePermissionLocalService.deleteResourcePermission(resourcePermission);
080            }
081    
082            /**
083            * Performs a dynamic query on the database and returns the matching rows.
084            *
085            * @param dynamicQuery the dynamic query to search with
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 _resourcePermissionLocalService.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 to search with
104            * @param start the lower bound of the range of model instances to return
105            * @param end the upper bound of the range of model instances to return (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 _resourcePermissionLocalService.dynamicQuery(dynamicQuery,
114                            start, end);
115            }
116    
117            /**
118            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
119            *
120            * <p>
121            * 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.
122            * </p>
123            *
124            * @param dynamicQuery the dynamic query to search with
125            * @param start the lower bound of the range of model instances to return
126            * @param end the upper bound of the range of model instances to return (not inclusive)
127            * @param orderByComparator the comparator to order the results by
128            * @return the ordered range of matching rows
129            * @throws SystemException if a system exception occurred
130            */
131            @SuppressWarnings("rawtypes")
132            public java.util.List dynamicQuery(
133                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
134                    int end,
135                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
136                    throws com.liferay.portal.kernel.exception.SystemException {
137                    return _resourcePermissionLocalService.dynamicQuery(dynamicQuery,
138                            start, end, orderByComparator);
139            }
140    
141            /**
142            * Counts the number of rows that match the dynamic query.
143            *
144            * @param dynamicQuery the dynamic query to search with
145            * @return the number of rows that match the dynamic query
146            * @throws SystemException if a system exception occurred
147            */
148            public long dynamicQueryCount(
149                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return _resourcePermissionLocalService.dynamicQueryCount(dynamicQuery);
152            }
153    
154            /**
155            * Gets the resource permission with the primary key.
156            *
157            * @param resourcePermissionId the primary key of the resource permission to get
158            * @return the resource permission
159            * @throws PortalException if a resource permission with the primary key could not be found
160            * @throws SystemException if a system exception occurred
161            */
162            public com.liferay.portal.model.ResourcePermission getResourcePermission(
163                    long resourcePermissionId)
164                    throws com.liferay.portal.kernel.exception.PortalException,
165                            com.liferay.portal.kernel.exception.SystemException {
166                    return _resourcePermissionLocalService.getResourcePermission(resourcePermissionId);
167            }
168    
169            /**
170            * Gets a range of all the resource permissions.
171            *
172            * <p>
173            * 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.
174            * </p>
175            *
176            * @param start the lower bound of the range of resource permissions to return
177            * @param end the upper bound of the range of resource permissions to return (not inclusive)
178            * @return the range of resource permissions
179            * @throws SystemException if a system exception occurred
180            */
181            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
182                    int start, int end)
183                    throws com.liferay.portal.kernel.exception.SystemException {
184                    return _resourcePermissionLocalService.getResourcePermissions(start, end);
185            }
186    
187            /**
188            * Gets the number of resource permissions.
189            *
190            * @return the number of resource permissions
191            * @throws SystemException if a system exception occurred
192            */
193            public int getResourcePermissionsCount()
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return _resourcePermissionLocalService.getResourcePermissionsCount();
196            }
197    
198            /**
199            * Updates the resource permission in the database. Also notifies the appropriate model listeners.
200            *
201            * @param resourcePermission the resource permission to update
202            * @return the resource permission that was updated
203            * @throws SystemException if a system exception occurred
204            */
205            public com.liferay.portal.model.ResourcePermission updateResourcePermission(
206                    com.liferay.portal.model.ResourcePermission resourcePermission)
207                    throws com.liferay.portal.kernel.exception.SystemException {
208                    return _resourcePermissionLocalService.updateResourcePermission(resourcePermission);
209            }
210    
211            /**
212            * Updates the resource permission in the database. Also notifies the appropriate model listeners.
213            *
214            * @param resourcePermission the resource permission to update
215            * @param merge whether to merge the resource permission 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.
216            * @return the resource permission that was updated
217            * @throws SystemException if a system exception occurred
218            */
219            public com.liferay.portal.model.ResourcePermission updateResourcePermission(
220                    com.liferay.portal.model.ResourcePermission resourcePermission,
221                    boolean merge)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return _resourcePermissionLocalService.updateResourcePermission(resourcePermission,
224                            merge);
225            }
226    
227            public void addResourcePermission(long companyId, java.lang.String name,
228                    int scope, java.lang.String primKey, long roleId,
229                    java.lang.String actionId)
230                    throws com.liferay.portal.kernel.exception.PortalException,
231                            com.liferay.portal.kernel.exception.SystemException {
232                    _resourcePermissionLocalService.addResourcePermission(companyId, name,
233                            scope, primKey, roleId, actionId);
234            }
235    
236            public java.util.List<java.lang.String> getAvailableResourcePermissionActionIds(
237                    long companyId, java.lang.String name, int scope,
238                    java.lang.String primKey, long roleId,
239                    java.util.List<java.lang.String> actionIds)
240                    throws com.liferay.portal.kernel.exception.PortalException,
241                            com.liferay.portal.kernel.exception.SystemException {
242                    return _resourcePermissionLocalService.getAvailableResourcePermissionActionIds(companyId,
243                            name, scope, primKey, roleId, actionIds);
244            }
245    
246            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
247                    long companyId, java.lang.String name, int scope,
248                    java.lang.String primKey)
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    return _resourcePermissionLocalService.getResourcePermissions(companyId,
251                            name, scope, primKey);
252            }
253    
254            public int getResourcePermissionsCount(long companyId,
255                    java.lang.String name, int scope, java.lang.String primKey)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    return _resourcePermissionLocalService.getResourcePermissionsCount(companyId,
258                            name, scope, primKey);
259            }
260    
261            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
262                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
263                    return _resourcePermissionLocalService.getRoleResourcePermissions(roleId);
264            }
265    
266            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
267                    long roleId, int[] scopes, int start, int end)
268                    throws com.liferay.portal.kernel.exception.SystemException {
269                    return _resourcePermissionLocalService.getRoleResourcePermissions(roleId,
270                            scopes, start, end);
271            }
272    
273            public boolean hasActionId(
274                    com.liferay.portal.model.ResourcePermission resourcePermission,
275                    com.liferay.portal.model.ResourceAction resourceAction) {
276                    return _resourcePermissionLocalService.hasActionId(resourcePermission,
277                            resourceAction);
278            }
279    
280            public boolean hasResourcePermission(long companyId, java.lang.String name,
281                    int scope, java.lang.String primKey, long roleId,
282                    java.lang.String actionId)
283                    throws com.liferay.portal.kernel.exception.PortalException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    return _resourcePermissionLocalService.hasResourcePermission(companyId,
286                            name, scope, primKey, roleId, actionId);
287            }
288    
289            public boolean hasScopeResourcePermission(long companyId,
290                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
291                    throws com.liferay.portal.kernel.exception.PortalException,
292                            com.liferay.portal.kernel.exception.SystemException {
293                    return _resourcePermissionLocalService.hasScopeResourcePermission(companyId,
294                            name, scope, roleId, actionId);
295            }
296    
297            public void mergePermissions(long fromRoleId, long toRoleId)
298                    throws com.liferay.portal.kernel.exception.PortalException,
299                            com.liferay.portal.kernel.exception.SystemException {
300                    _resourcePermissionLocalService.mergePermissions(fromRoleId, toRoleId);
301            }
302    
303            public void reassignPermissions(long resourcePermissionId, long toRoleId)
304                    throws com.liferay.portal.kernel.exception.PortalException,
305                            com.liferay.portal.kernel.exception.SystemException {
306                    _resourcePermissionLocalService.reassignPermissions(resourcePermissionId,
307                            toRoleId);
308            }
309    
310            public void removeResourcePermission(long companyId, java.lang.String name,
311                    int scope, java.lang.String primKey, long roleId,
312                    java.lang.String actionId)
313                    throws com.liferay.portal.kernel.exception.PortalException,
314                            com.liferay.portal.kernel.exception.SystemException {
315                    _resourcePermissionLocalService.removeResourcePermission(companyId,
316                            name, scope, primKey, roleId, actionId);
317            }
318    
319            public void removeResourcePermissions(long companyId,
320                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
321                    throws com.liferay.portal.kernel.exception.PortalException,
322                            com.liferay.portal.kernel.exception.SystemException {
323                    _resourcePermissionLocalService.removeResourcePermissions(companyId,
324                            name, scope, roleId, actionId);
325            }
326    
327            public void setResourcePermissions(long companyId, java.lang.String name,
328                    int scope, java.lang.String primKey, long roleId,
329                    java.lang.String[] actionIds)
330                    throws com.liferay.portal.kernel.exception.PortalException,
331                            com.liferay.portal.kernel.exception.SystemException {
332                    _resourcePermissionLocalService.setResourcePermissions(companyId, name,
333                            scope, primKey, roleId, actionIds);
334            }
335    
336            public ResourcePermissionLocalService getWrappedResourcePermissionLocalService() {
337                    return _resourcePermissionLocalService;
338            }
339    
340            private ResourcePermissionLocalService _resourcePermissionLocalService;
341    }