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