001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    /**
018     * <p>
019     * This class is a wrapper for {@link 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
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
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
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
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
102            * @param start the lower bound of the range of model instances
103            * @param end the upper bound of the range of model instances (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
122            * @param start the lower bound of the range of model instances
123            * @param end the upper bound of the range of model instances (not inclusive)
124            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns the number of rows that match the dynamic query.
140            *
141            * @param dynamicQuery the dynamic query
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            * Returns the permission with the primary key.
153            *
154            * @param permissionId the primary key of the permission
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            public com.liferay.portal.model.PersistedModel getPersistedModel(
166                    java.io.Serializable primaryKeyObj)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    return _permissionLocalService.getPersistedModel(primaryKeyObj);
170            }
171    
172            /**
173            * Returns a range of all the permissions.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param start the lower bound of the range of permissions
180            * @param end the upper bound of the range of permissions (not inclusive)
181            * @return the range of permissions
182            * @throws SystemException if a system exception occurred
183            */
184            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
185                    int start, int end)
186                    throws com.liferay.portal.kernel.exception.SystemException {
187                    return _permissionLocalService.getPermissions(start, end);
188            }
189    
190            /**
191            * Returns the number of permissions.
192            *
193            * @return the number of permissions
194            * @throws SystemException if a system exception occurred
195            */
196            public int getPermissionsCount()
197                    throws com.liferay.portal.kernel.exception.SystemException {
198                    return _permissionLocalService.getPermissionsCount();
199            }
200    
201            /**
202            * Updates the permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
203            *
204            * @param permission the permission
205            * @return the permission that was updated
206            * @throws SystemException if a system exception occurred
207            */
208            public com.liferay.portal.model.Permission updatePermission(
209                    com.liferay.portal.model.Permission permission)
210                    throws com.liferay.portal.kernel.exception.SystemException {
211                    return _permissionLocalService.updatePermission(permission);
212            }
213    
214            /**
215            * Updates the permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
216            *
217            * @param permission the permission
218            * @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.
219            * @return the permission that was updated
220            * @throws SystemException if a system exception occurred
221            */
222            public com.liferay.portal.model.Permission updatePermission(
223                    com.liferay.portal.model.Permission permission, boolean merge)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return _permissionLocalService.updatePermission(permission, merge);
226            }
227    
228            /**
229            * Returns the Spring bean ID for this bean.
230            *
231            * @return the Spring bean ID for this bean
232            */
233            public java.lang.String getBeanIdentifier() {
234                    return _permissionLocalService.getBeanIdentifier();
235            }
236    
237            /**
238            * Sets the Spring bean ID for this bean.
239            *
240            * @param beanIdentifier the Spring bean ID for this bean
241            */
242            public void setBeanIdentifier(java.lang.String beanIdentifier) {
243                    _permissionLocalService.setBeanIdentifier(beanIdentifier);
244            }
245    
246            public com.liferay.portal.model.Permission addPermission(long companyId,
247                    java.lang.String actionId, long resourceId)
248                    throws com.liferay.portal.kernel.exception.SystemException {
249                    return _permissionLocalService.addPermission(companyId, actionId,
250                            resourceId);
251            }
252    
253            public java.util.List<com.liferay.portal.model.Permission> addPermissions(
254                    long companyId, java.util.List<java.lang.String> actionIds,
255                    long resourceId)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    return _permissionLocalService.addPermissions(companyId, actionIds,
258                            resourceId);
259            }
260    
261            public java.util.List<com.liferay.portal.model.Permission> addPermissions(
262                    long companyId, java.lang.String name, long resourceId,
263                    boolean portletActions)
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    return _permissionLocalService.addPermissions(companyId, name,
266                            resourceId, portletActions);
267            }
268    
269            public void addUserPermissions(long userId, java.lang.String[] actionIds,
270                    long resourceId)
271                    throws com.liferay.portal.kernel.exception.PortalException,
272                            com.liferay.portal.kernel.exception.SystemException {
273                    _permissionLocalService.addUserPermissions(userId, actionIds, resourceId);
274            }
275    
276            public void checkPermissions(java.lang.String name,
277                    java.util.List<java.lang.String> actionIds)
278                    throws com.liferay.portal.kernel.exception.PortalException,
279                            com.liferay.portal.kernel.exception.SystemException {
280                    _permissionLocalService.checkPermissions(name, actionIds);
281            }
282    
283            public java.util.List<java.lang.String> getActions(
284                    java.util.List<com.liferay.portal.model.Permission> permissions) {
285                    return _permissionLocalService.getActions(permissions);
286            }
287    
288            public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
289                    long groupId, long resourceId)
290                    throws com.liferay.portal.kernel.exception.SystemException {
291                    return _permissionLocalService.getGroupPermissions(groupId, resourceId);
292            }
293    
294            public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
295                    long groupId, long companyId, java.lang.String name, int scope,
296                    java.lang.String primKey)
297                    throws com.liferay.portal.kernel.exception.SystemException {
298                    return _permissionLocalService.getGroupPermissions(groupId, companyId,
299                            name, scope, primKey);
300            }
301    
302            public long getLatestPermissionId()
303                    throws com.liferay.portal.kernel.exception.SystemException {
304                    return _permissionLocalService.getLatestPermissionId();
305            }
306    
307            public java.util.List<com.liferay.portal.model.Permission> getOrgGroupPermissions(
308                    long organizationId, long groupId, long resourceId)
309                    throws com.liferay.portal.kernel.exception.SystemException {
310                    return _permissionLocalService.getOrgGroupPermissions(organizationId,
311                            groupId, resourceId);
312            }
313    
314            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
315                    long companyId, java.lang.String[] actionIds, long resourceId)
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    return _permissionLocalService.getPermissions(companyId, actionIds,
318                            resourceId);
319            }
320    
321            public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
322                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
323                    return _permissionLocalService.getRolePermissions(roleId);
324            }
325    
326            public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
327                    long roleId, long resourceId)
328                    throws com.liferay.portal.kernel.exception.SystemException {
329                    return _permissionLocalService.getRolePermissions(roleId, resourceId);
330            }
331    
332            public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
333                    long userId, long resourceId)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    return _permissionLocalService.getUserPermissions(userId, resourceId);
336            }
337    
338            public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
339                    long userId, long companyId, java.lang.String name, int scope,
340                    java.lang.String primKey)
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return _permissionLocalService.getUserPermissions(userId, companyId,
343                            name, scope, primKey);
344            }
345    
346            public boolean hasGroupPermission(long groupId, java.lang.String actionId,
347                    long resourceId)
348                    throws com.liferay.portal.kernel.exception.SystemException {
349                    return _permissionLocalService.hasGroupPermission(groupId, actionId,
350                            resourceId);
351            }
352    
353            public boolean hasRolePermission(long roleId, long companyId,
354                    java.lang.String name, int scope, java.lang.String actionId)
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    return _permissionLocalService.hasRolePermission(roleId, companyId,
357                            name, scope, actionId);
358            }
359    
360            public boolean hasRolePermission(long roleId, long companyId,
361                    java.lang.String name, int scope, java.lang.String primKey,
362                    java.lang.String actionId)
363                    throws com.liferay.portal.kernel.exception.SystemException {
364                    return _permissionLocalService.hasRolePermission(roleId, companyId,
365                            name, scope, primKey, actionId);
366            }
367    
368            public boolean hasUserPermission(long userId, java.lang.String actionId,
369                    long resourceId)
370                    throws com.liferay.portal.kernel.exception.SystemException {
371                    return _permissionLocalService.hasUserPermission(userId, actionId,
372                            resourceId);
373            }
374    
375            public boolean hasUserPermissions(long userId, long groupId,
376                    java.util.List<com.liferay.portal.model.Resource> resources,
377                    java.lang.String actionId,
378                    com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
379                    throws com.liferay.portal.kernel.exception.PortalException,
380                            com.liferay.portal.kernel.exception.SystemException {
381                    return _permissionLocalService.hasUserPermissions(userId, groupId,
382                            resources, actionId, permissionCheckerBag);
383            }
384    
385            public void setContainerResourcePermissions(java.lang.String name,
386                    java.lang.String roleName, java.lang.String actionId)
387                    throws com.liferay.portal.kernel.exception.PortalException,
388                            com.liferay.portal.kernel.exception.SystemException {
389                    _permissionLocalService.setContainerResourcePermissions(name, roleName,
390                            actionId);
391            }
392    
393            public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
394                    long resourceId)
395                    throws com.liferay.portal.kernel.exception.PortalException,
396                            com.liferay.portal.kernel.exception.SystemException {
397                    _permissionLocalService.setGroupPermissions(groupId, actionIds,
398                            resourceId);
399            }
400    
401            public void setGroupPermissions(java.lang.String className,
402                    java.lang.String classPK, long groupId, java.lang.String[] actionIds,
403                    long resourceId)
404                    throws com.liferay.portal.kernel.exception.PortalException,
405                            com.liferay.portal.kernel.exception.SystemException {
406                    _permissionLocalService.setGroupPermissions(className, classPK,
407                            groupId, actionIds, resourceId);
408            }
409    
410            public void setOrgGroupPermissions(long organizationId, long groupId,
411                    java.lang.String[] actionIds, long resourceId)
412                    throws com.liferay.portal.kernel.exception.PortalException,
413                            com.liferay.portal.kernel.exception.SystemException {
414                    _permissionLocalService.setOrgGroupPermissions(organizationId, groupId,
415                            actionIds, resourceId);
416            }
417    
418            public void setRolePermission(long roleId, long companyId,
419                    java.lang.String name, int scope, java.lang.String primKey,
420                    java.lang.String actionId)
421                    throws com.liferay.portal.kernel.exception.PortalException,
422                            com.liferay.portal.kernel.exception.SystemException {
423                    _permissionLocalService.setRolePermission(roleId, companyId, name,
424                            scope, primKey, actionId);
425            }
426    
427            public void setRolePermissions(long roleId, long companyId,
428                    java.lang.String name, int scope, java.lang.String primKey,
429                    java.lang.String[] actionIds)
430                    throws com.liferay.portal.kernel.exception.PortalException,
431                            com.liferay.portal.kernel.exception.SystemException {
432                    _permissionLocalService.setRolePermissions(roleId, companyId, name,
433                            scope, primKey, actionIds);
434            }
435    
436            public void setRolePermissions(long roleId, java.lang.String[] actionIds,
437                    long resourceId)
438                    throws com.liferay.portal.kernel.exception.PortalException,
439                            com.liferay.portal.kernel.exception.SystemException {
440                    _permissionLocalService.setRolePermissions(roleId, actionIds, resourceId);
441            }
442    
443            public void setUserPermissions(long userId, java.lang.String[] actionIds,
444                    long resourceId)
445                    throws com.liferay.portal.kernel.exception.PortalException,
446                            com.liferay.portal.kernel.exception.SystemException {
447                    _permissionLocalService.setUserPermissions(userId, actionIds, resourceId);
448            }
449    
450            public void unsetRolePermission(long roleId, long permissionId)
451                    throws com.liferay.portal.kernel.exception.SystemException {
452                    _permissionLocalService.unsetRolePermission(roleId, permissionId);
453            }
454    
455            public void unsetRolePermission(long roleId, long companyId,
456                    java.lang.String name, int scope, java.lang.String primKey,
457                    java.lang.String actionId)
458                    throws com.liferay.portal.kernel.exception.SystemException {
459                    _permissionLocalService.unsetRolePermission(roleId, companyId, name,
460                            scope, primKey, actionId);
461            }
462    
463            public void unsetRolePermissions(long roleId, long companyId,
464                    java.lang.String name, int scope, java.lang.String actionId)
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    _permissionLocalService.unsetRolePermissions(roleId, companyId, name,
467                            scope, actionId);
468            }
469    
470            public void unsetUserPermissions(long userId, java.lang.String[] actionIds,
471                    long resourceId)
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    _permissionLocalService.unsetUserPermissions(userId, actionIds,
474                            resourceId);
475            }
476    
477            public PermissionLocalService getWrappedPermissionLocalService() {
478                    return _permissionLocalService;
479            }
480    
481            public void setWrappedPermissionLocalService(
482                    PermissionLocalService permissionLocalService) {
483                    _permissionLocalService = permissionLocalService;
484            }
485    
486            private PermissionLocalService _permissionLocalService;
487    }