001    /**
002     * Copyright (c) 2000-2013 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                    ServiceWrapper<ResourcePermissionLocalService> {
029            public ResourcePermissionLocalServiceWrapper(
030                    ResourcePermissionLocalService resourcePermissionLocalService) {
031                    _resourcePermissionLocalService = resourcePermissionLocalService;
032            }
033    
034            /**
035            * Adds the resource permission to the database. Also notifies the appropriate model listeners.
036            *
037            * @param resourcePermission the resource permission
038            * @return the resource permission that was added
039            * @throws SystemException if a system exception occurred
040            */
041            public com.liferay.portal.model.ResourcePermission addResourcePermission(
042                    com.liferay.portal.model.ResourcePermission resourcePermission)
043                    throws com.liferay.portal.kernel.exception.SystemException {
044                    return _resourcePermissionLocalService.addResourcePermission(resourcePermission);
045            }
046    
047            /**
048            * Creates a new resource permission with the primary key. Does not add the resource permission to the database.
049            *
050            * @param resourcePermissionId the primary key for the new resource permission
051            * @return the new resource permission
052            */
053            public com.liferay.portal.model.ResourcePermission createResourcePermission(
054                    long resourcePermissionId) {
055                    return _resourcePermissionLocalService.createResourcePermission(resourcePermissionId);
056            }
057    
058            /**
059            * Deletes the resource permission with the primary key from the database. Also notifies the appropriate model listeners.
060            *
061            * @param resourcePermissionId the primary key of the resource permission
062            * @return the resource permission that was removed
063            * @throws PortalException if a resource permission with the primary key could not be found
064            * @throws SystemException if a system exception occurred
065            */
066            public com.liferay.portal.model.ResourcePermission deleteResourcePermission(
067                    long resourcePermissionId)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    return _resourcePermissionLocalService.deleteResourcePermission(resourcePermissionId);
071            }
072    
073            /**
074            * Deletes the resource permission from the database. Also notifies the appropriate model listeners.
075            *
076            * @param resourcePermission the resource permission
077            * @return the resource permission that was removed
078            * @throws SystemException if a system exception occurred
079            */
080            public com.liferay.portal.model.ResourcePermission deleteResourcePermission(
081                    com.liferay.portal.model.ResourcePermission resourcePermission)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return _resourcePermissionLocalService.deleteResourcePermission(resourcePermission);
084            }
085    
086            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
087                    return _resourcePermissionLocalService.dynamicQuery();
088            }
089    
090            /**
091            * Performs a dynamic query on the database and returns the matching rows.
092            *
093            * @param dynamicQuery the dynamic query
094            * @return the matching rows
095            * @throws SystemException if a system exception occurred
096            */
097            @SuppressWarnings("rawtypes")
098            public java.util.List dynamicQuery(
099                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return _resourcePermissionLocalService.dynamicQuery(dynamicQuery);
102            }
103    
104            /**
105            * Performs a dynamic query on the database and returns a range of the matching rows.
106            *
107            * <p>
108            * 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.
109            * </p>
110            *
111            * @param dynamicQuery the dynamic query
112            * @param start the lower bound of the range of model instances
113            * @param end the upper bound of the range of model instances (not inclusive)
114            * @return the range of matching rows
115            * @throws SystemException if a system exception occurred
116            */
117            @SuppressWarnings("rawtypes")
118            public java.util.List dynamicQuery(
119                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120                    int end) throws com.liferay.portal.kernel.exception.SystemException {
121                    return _resourcePermissionLocalService.dynamicQuery(dynamicQuery,
122                            start, end);
123            }
124    
125            /**
126            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
127            *
128            * <p>
129            * 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.
130            * </p>
131            *
132            * @param dynamicQuery the dynamic query
133            * @param start the lower bound of the range of model instances
134            * @param end the upper bound of the range of model instances (not inclusive)
135            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
136            * @return the ordered range of matching rows
137            * @throws SystemException if a system exception occurred
138            */
139            @SuppressWarnings("rawtypes")
140            public java.util.List dynamicQuery(
141                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
142                    int end,
143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return _resourcePermissionLocalService.dynamicQuery(dynamicQuery,
146                            start, end, orderByComparator);
147            }
148    
149            /**
150            * Returns the number of rows that match the dynamic query.
151            *
152            * @param dynamicQuery the dynamic query
153            * @return the number of rows that match the dynamic query
154            * @throws SystemException if a system exception occurred
155            */
156            public long dynamicQueryCount(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
158                    throws com.liferay.portal.kernel.exception.SystemException {
159                    return _resourcePermissionLocalService.dynamicQueryCount(dynamicQuery);
160            }
161    
162            public com.liferay.portal.model.ResourcePermission fetchResourcePermission(
163                    long resourcePermissionId)
164                    throws com.liferay.portal.kernel.exception.SystemException {
165                    return _resourcePermissionLocalService.fetchResourcePermission(resourcePermissionId);
166            }
167    
168            /**
169            * Returns the resource permission with the primary key.
170            *
171            * @param resourcePermissionId the primary key of the resource permission
172            * @return the resource permission
173            * @throws PortalException if a resource permission with the primary key could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public com.liferay.portal.model.ResourcePermission getResourcePermission(
177                    long resourcePermissionId)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return _resourcePermissionLocalService.getResourcePermission(resourcePermissionId);
181            }
182    
183            public com.liferay.portal.model.PersistedModel getPersistedModel(
184                    java.io.Serializable primaryKeyObj)
185                    throws com.liferay.portal.kernel.exception.PortalException,
186                            com.liferay.portal.kernel.exception.SystemException {
187                    return _resourcePermissionLocalService.getPersistedModel(primaryKeyObj);
188            }
189    
190            /**
191            * Returns a range of all the resource permissions.
192            *
193            * <p>
194            * 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.
195            * </p>
196            *
197            * @param start the lower bound of the range of resource permissions
198            * @param end the upper bound of the range of resource permissions (not inclusive)
199            * @return the range of resource permissions
200            * @throws SystemException if a system exception occurred
201            */
202            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
203                    int start, int end)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return _resourcePermissionLocalService.getResourcePermissions(start, end);
206            }
207    
208            /**
209            * Returns the number of resource permissions.
210            *
211            * @return the number of resource permissions
212            * @throws SystemException if a system exception occurred
213            */
214            public int getResourcePermissionsCount()
215                    throws com.liferay.portal.kernel.exception.SystemException {
216                    return _resourcePermissionLocalService.getResourcePermissionsCount();
217            }
218    
219            /**
220            * Updates the resource permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
221            *
222            * @param resourcePermission the resource permission
223            * @return the resource permission that was updated
224            * @throws SystemException if a system exception occurred
225            */
226            public com.liferay.portal.model.ResourcePermission updateResourcePermission(
227                    com.liferay.portal.model.ResourcePermission resourcePermission)
228                    throws com.liferay.portal.kernel.exception.SystemException {
229                    return _resourcePermissionLocalService.updateResourcePermission(resourcePermission);
230            }
231    
232            /**
233            * Updates the resource permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
234            *
235            * @param resourcePermission the resource permission
236            * @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.
237            * @return the resource permission that was updated
238            * @throws SystemException if a system exception occurred
239            */
240            public com.liferay.portal.model.ResourcePermission updateResourcePermission(
241                    com.liferay.portal.model.ResourcePermission resourcePermission,
242                    boolean merge)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return _resourcePermissionLocalService.updateResourcePermission(resourcePermission,
245                            merge);
246            }
247    
248            /**
249            * Returns the Spring bean ID for this bean.
250            *
251            * @return the Spring bean ID for this bean
252            */
253            public java.lang.String getBeanIdentifier() {
254                    return _resourcePermissionLocalService.getBeanIdentifier();
255            }
256    
257            /**
258            * Sets the Spring bean ID for this bean.
259            *
260            * @param beanIdentifier the Spring bean ID for this bean
261            */
262            public void setBeanIdentifier(java.lang.String beanIdentifier) {
263                    _resourcePermissionLocalService.setBeanIdentifier(beanIdentifier);
264            }
265    
266            /**
267            * Grants the role permission at the scope to perform the action on
268            * resources of the type. Existing actions are retained.
269            *
270            * <p>
271            * This method cannot be used to grant individual scope permissions, but is
272            * only intended for adding permissions at the company, group, and
273            * group-template scopes. For example, this method could be used to grant a
274            * company scope permission to edit message board posts.
275            * </p>
276            *
277            * <p>
278            * If a company scope permission is granted to resources that the role
279            * already had group scope permissions to, the group scope permissions are
280            * deleted. Likewise, if a group scope permission is granted to resources
281            * that the role already had company scope permissions to, the company scope
282            * permissions are deleted. Be aware that this latter behavior can result in
283            * an overall reduction in permissions for the role.
284            * </p>
285            *
286            * <p>
287            * Depending on the scope, the value of <code>primKey</code> will have
288            * different meanings. For more information, see {@link
289            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
290            * </p>
291            *
292            * @param companyId the primary key of the company
293            * @param name the resource's name, which can be either a class name or a
294            portlet ID
295            * @param scope the scope. This method only supports company, group, and
296            group-template scope.
297            * @param primKey the primary key
298            * @param roleId the primary key of the role
299            * @param actionId the action ID
300            * @throws PortalException if scope was set to individual scope or if a role
301            with the primary key or a resource action with the name and
302            action ID could not be found
303            * @throws SystemException if a system exception occurred
304            */
305            public void addResourcePermission(long companyId, java.lang.String name,
306                    int scope, java.lang.String primKey, long roleId,
307                    java.lang.String actionId)
308                    throws com.liferay.portal.kernel.exception.PortalException,
309                            com.liferay.portal.kernel.exception.SystemException {
310                    _resourcePermissionLocalService.addResourcePermission(companyId, name,
311                            scope, primKey, roleId, actionId);
312            }
313    
314            /**
315            * Grants the role permissions at the scope to perform the actions on all
316            * resources of the type. Existing actions are retained.
317            *
318            * <p>
319            * This method should only be used to add default permissions to existing
320            * resources en masse during upgrades or while verifying permissions. For
321            * example, this method could be used to grant site members individual scope
322            * permissions to view all blog posts.
323            * </p>
324            *
325            * @param resourceName the resource's name, which can be either a class
326            name or a portlet ID
327            * @param roleName the role's name
328            * @param scope the scope
329            * @param resourceActionBitwiseValue the bitwise IDs of the actions
330            * @throws SystemException if a system exception occurred
331            */
332            public void addResourcePermissions(java.lang.String resourceName,
333                    java.lang.String roleName, int scope, long resourceActionBitwiseValue)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    _resourcePermissionLocalService.addResourcePermissions(resourceName,
336                            roleName, scope, resourceActionBitwiseValue);
337            }
338    
339            /**
340            * Deletes all resource permissions at the scope to resources of the type.
341            * This method should not be confused with any of the
342            * <code>removeResourcePermission</code> methods, as its purpose is very
343            * different. This method should only be used for deleting resource
344            * permissions that refer to a resource when that resource is deleted. For
345            * example this method could be used to delete all individual scope
346            * permissions to a blog post when it is deleted.
347            *
348            * <p>
349            * Depending on the scope, the value of <code>primKey</code> will have
350            * different meanings. For more information, see {@link
351            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
352            * </p>
353            *
354            * @param companyId the primary key of the company
355            * @param name the resource's name, which can be either a class name or a
356            portlet ID
357            * @param scope the scope
358            * @param primKey the primary key
359            * @throws PortalException if a portal exception occurred
360            * @throws SystemException if a system exception occurred
361            */
362            public void deleteResourcePermissions(long companyId,
363                    java.lang.String name, int scope, long primKey)
364                    throws com.liferay.portal.kernel.exception.PortalException,
365                            com.liferay.portal.kernel.exception.SystemException {
366                    _resourcePermissionLocalService.deleteResourcePermissions(companyId,
367                            name, scope, primKey);
368            }
369    
370            /**
371            * Deletes all resource permissions at the scope to resources of the type.
372            * This method should not be confused with any of the
373            * <code>removeResourcePermission</code> methods, as its purpose is very
374            * different. This method should only be used for deleting resource
375            * permissions that refer to a resource when that resource is deleted. For
376            * example this method could be used to delete all individual scope
377            * permissions to a blog post when it is deleted.
378            *
379            * <p>
380            * Depending on the scope, the value of <code>primKey</code> will have
381            * different meanings. For more information, see {@link
382            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
383            * </p>
384            *
385            * @param companyId the primary key of the company
386            * @param name the resource's name, which can be either a class name or a
387            portlet ID
388            * @param scope the scope
389            * @param primKey the primary key
390            * @throws PortalException if a portal exception occurred
391            * @throws SystemException if a system exception occurred
392            */
393            public void deleteResourcePermissions(long companyId,
394                    java.lang.String name, int scope, java.lang.String primKey)
395                    throws com.liferay.portal.kernel.exception.PortalException,
396                            com.liferay.portal.kernel.exception.SystemException {
397                    _resourcePermissionLocalService.deleteResourcePermissions(companyId,
398                            name, scope, primKey);
399            }
400    
401            /**
402            * Returns the intersection of action IDs the role has permission at the
403            * scope to perform on resources of the type.
404            *
405            * @param companyId he primary key of the company
406            * @param name the resource's name, which can be either a class name or a
407            portlet ID
408            * @param scope the scope
409            * @param primKey the primary key
410            * @param roleId the primary key of the role
411            * @param actionIds the action IDs
412            * @return the intersection of action IDs the role has permission at the
413            scope to perform on resources of the type
414            * @throws PortalException if a resouce action could not be found for any
415            one of the actions on the resource
416            * @throws SystemException if a system exception occurred
417            */
418            public java.util.List<java.lang.String> getAvailableResourcePermissionActionIds(
419                    long companyId, java.lang.String name, int scope,
420                    java.lang.String primKey, long roleId,
421                    java.util.Collection<java.lang.String> actionIds)
422                    throws com.liferay.portal.kernel.exception.PortalException,
423                            com.liferay.portal.kernel.exception.SystemException {
424                    return _resourcePermissionLocalService.getAvailableResourcePermissionActionIds(companyId,
425                            name, scope, primKey, roleId, actionIds);
426            }
427    
428            public java.util.Map<java.lang.Long, java.util.Set<java.lang.String>> getAvailableResourcePermissionActionIds(
429                    long companyId, java.lang.String name, int scope,
430                    java.lang.String primKey, long[] roleIds,
431                    java.util.Collection<java.lang.String> actionIds)
432                    throws com.liferay.portal.kernel.exception.PortalException,
433                            com.liferay.portal.kernel.exception.SystemException {
434                    return _resourcePermissionLocalService.getAvailableResourcePermissionActionIds(companyId,
435                            name, scope, primKey, roleIds, actionIds);
436            }
437    
438            /**
439            * Returns the resource permission for the role at the scope to perform the
440            * actions on resources of the type.
441            *
442            * @param companyId the primary key of the company
443            * @param name the resource's name, which can be either a class name or a
444            portlet ID
445            * @param scope the scope
446            * @param primKey the primary key
447            * @param roleId the primary key of the role
448            * @return the resource permission for the role at the scope to perform the
449            actions on resources of the type
450            * @throws PortalException if no matching resources could be found
451            * @throws SystemException if a system exception occurred
452            */
453            public com.liferay.portal.model.ResourcePermission getResourcePermission(
454                    long companyId, java.lang.String name, int scope,
455                    java.lang.String primKey, long roleId)
456                    throws com.liferay.portal.kernel.exception.PortalException,
457                            com.liferay.portal.kernel.exception.SystemException {
458                    return _resourcePermissionLocalService.getResourcePermission(companyId,
459                            name, scope, primKey, roleId);
460            }
461    
462            /**
463            * Returns all the resource permissions at the scope of the type.
464            *
465            * @param companyId the primary key of the company
466            * @param name the resource's name, which can be either a class name or a
467            portlet ID
468            * @param scope the scope
469            * @param primKey the primary key
470            * @return the resource permissions at the scope of the type
471            * @throws SystemException if a system exception occurred
472            */
473            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
474                    long companyId, java.lang.String name, int scope,
475                    java.lang.String primKey)
476                    throws com.liferay.portal.kernel.exception.SystemException {
477                    return _resourcePermissionLocalService.getResourcePermissions(companyId,
478                            name, scope, primKey);
479            }
480    
481            /**
482            * Returns the number of resource permissions at the scope of the type.
483            *
484            * @param companyId the primary key of the company
485            * @param name the resource's name, which can be either a class name or a
486            portlet ID
487            * @param scope the scope
488            * @param primKey the primary key
489            * @return the number of resource permissions at the scope of the type
490            * @throws SystemException if a system exception occurred
491            */
492            public int getResourcePermissionsCount(long companyId,
493                    java.lang.String name, int scope, java.lang.String primKey)
494                    throws com.liferay.portal.kernel.exception.SystemException {
495                    return _resourcePermissionLocalService.getResourcePermissionsCount(companyId,
496                            name, scope, primKey);
497            }
498    
499            /**
500            * Returns the resource permissions that apply to the resource.
501            *
502            * @param companyId the primary key of the resource's company
503            * @param groupId the primary key of the resource's group
504            * @param name the resource's name, which can be either a class name or a
505            portlet ID
506            * @param primKey the primary key of the resource
507            * @return the resource permissions associated with the resource
508            * @throws SystemException if a system exception occurred
509            */
510            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourceResourcePermissions(
511                    long companyId, long groupId, java.lang.String name,
512                    java.lang.String primKey)
513                    throws com.liferay.portal.kernel.exception.SystemException {
514                    return _resourcePermissionLocalService.getResourceResourcePermissions(companyId,
515                            groupId, name, primKey);
516            }
517    
518            /**
519            * Returns all the resource permissions for the role.
520            *
521            * @param roleId the primary key of the role
522            * @return the resource permissions for the role
523            * @throws SystemException if a system exception occurred
524            */
525            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
526                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
527                    return _resourcePermissionLocalService.getRoleResourcePermissions(roleId);
528            }
529    
530            /**
531            * Returns a range of all the resource permissions for the role at the
532            * scopes.
533            *
534            * <p>
535            * Useful when paginating results. Returns a maximum of <code>end -
536            * start</code> instances. <code>start</code> and <code>end</code> are not
537            * primary keys, they are indexes in the result set. Thus, <code>0</code>
538            * refers to the first result in the set. Setting both <code>start</code>
539            * and <code>end</code> to {@link
540            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
541            * result set.
542            * </p>
543            *
544            * @param roleId the primary key of the role
545            * @param scopes the scopes
546            * @param start the lower bound of the range of results
547            * @param end the upper bound of the range of results (not inclusive)
548            * @return the range of resource permissions for the role at the scopes
549            * @throws SystemException if a system exception occurred
550            */
551            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
552                    long roleId, int[] scopes, int start, int end)
553                    throws com.liferay.portal.kernel.exception.SystemException {
554                    return _resourcePermissionLocalService.getRoleResourcePermissions(roleId,
555                            scopes, start, end);
556            }
557    
558            /**
559            * Returns all the resource permissions where scope = any &#63;.
560            *
561            * <p>
562            * Useful when paginating results. Returns a maximum of <code>end -
563            * start</code> instances. <code>start</code> and <code>end</code> are not
564            * primary keys, they are indexes in the result set. Thus, <code>0</code>
565            * refers to the first result in the set. Setting both <code>start</code>
566            * and <code>end</code> to {@link
567            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
568            * result set.
569            * </p>
570            *
571            * @param scopes the scopes
572            * @return the resource permissions where scope = any &#63;
573            * @throws SystemException if a system exception occurred
574            */
575            public java.util.List<com.liferay.portal.model.ResourcePermission> getScopeResourcePermissions(
576                    int[] scopes)
577                    throws com.liferay.portal.kernel.exception.SystemException {
578                    return _resourcePermissionLocalService.getScopeResourcePermissions(scopes);
579            }
580    
581            /**
582            * Returns <code>true</code> if the resource permission grants permission to
583            * perform the resource action. Note that this method does not ensure that
584            * the resource permission refers to the same type of resource as the
585            * resource action.
586            *
587            * @param resourcePermission the resource permission
588            * @param resourceAction the resource action
589            * @return <code>true</code> if the resource permission grants permission to
590            perform the resource action
591            */
592            public boolean hasActionId(
593                    com.liferay.portal.model.ResourcePermission resourcePermission,
594                    com.liferay.portal.model.ResourceAction resourceAction) {
595                    return _resourcePermissionLocalService.hasActionId(resourcePermission,
596                            resourceAction);
597            }
598    
599            /**
600            * Returns <code>true</code> if the roles have permission at the scope to
601            * perform the action on the resources.
602            *
603            * <p>
604            * Depending on the scope, the value of <code>primKey</code> will have
605            * different meanings. For more information, see {@link
606            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
607            * </p>
608            *
609            * @param resources the resources
610            * @param roleIds the primary keys of the roles
611            * @param actionId the action ID
612            * @return <code>true</code> if any one of the roles has permission to
613            perform the action on any one of the resources;
614            <code>false</code> otherwise
615            * @throws PortalException if any one of the roles with the primary keys
616            could not be found or if a resource action with the name and
617            action ID could not be found
618            * @throws SystemException if a system exception occurred
619            */
620            public boolean hasResourcePermission(
621                    java.util.List<com.liferay.portal.model.Resource> resources,
622                    long[] roleIds, java.lang.String actionId)
623                    throws com.liferay.portal.kernel.exception.PortalException,
624                            com.liferay.portal.kernel.exception.SystemException {
625                    return _resourcePermissionLocalService.hasResourcePermission(resources,
626                            roleIds, actionId);
627            }
628    
629            /**
630            * Returns <code>true</code> if the role has permission at the scope to
631            * perform the action on resources of the type.
632            *
633            * <p>
634            * Depending on the scope, the value of <code>primKey</code> will have
635            * different meanings. For more information, see {@link
636            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
637            * </p>
638            *
639            * @param companyId the primary key of the company
640            * @param name the resource's name, which can be either a class name or a
641            portlet ID
642            * @param scope the scope
643            * @param primKey the primary key
644            * @param roleId the primary key of the role
645            * @param actionId the action ID
646            * @return <code>true</code> if the role has permission to perform the
647            action on the resource; <code>false</code> otherwise
648            * @throws PortalException if a role with the primary key or a resource
649            action with the name and action ID could not be found
650            * @throws SystemException if a system exception occurred
651            */
652            public boolean hasResourcePermission(long companyId, java.lang.String name,
653                    int scope, java.lang.String primKey, long roleId,
654                    java.lang.String actionId)
655                    throws com.liferay.portal.kernel.exception.PortalException,
656                            com.liferay.portal.kernel.exception.SystemException {
657                    return _resourcePermissionLocalService.hasResourcePermission(companyId,
658                            name, scope, primKey, roleId, actionId);
659            }
660    
661            /**
662            * Returns <code>true</code> if the roles have permission at the scope to
663            * perform the action on resources of the type.
664            *
665            * <p>
666            * Depending on the scope, the value of <code>primKey</code> will have
667            * different meanings. For more information, see {@link
668            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
669            * </p>
670            *
671            * @param companyId the primary key of the company
672            * @param name the resource's name, which can be either a class name or a
673            portlet ID
674            * @param scope the scope
675            * @param primKey the primary key
676            * @param roleIds the primary keys of the roles
677            * @param actionId the action ID
678            * @return <code>true</code> if any one of the roles has permission to
679            perform the action on the resource; <code>false</code> otherwise
680            * @throws PortalException if any one of the roles with the primary keys
681            could not be found or if a resource action with the name and
682            action ID could not be found
683            * @throws SystemException if a system exception occurred
684            */
685            public boolean hasResourcePermission(long companyId, java.lang.String name,
686                    int scope, java.lang.String primKey, long[] roleIds,
687                    java.lang.String actionId)
688                    throws com.liferay.portal.kernel.exception.PortalException,
689                            com.liferay.portal.kernel.exception.SystemException {
690                    return _resourcePermissionLocalService.hasResourcePermission(companyId,
691                            name, scope, primKey, roleIds, actionId);
692            }
693    
694            public boolean[] hasResourcePermissions(long companyId,
695                    java.lang.String name, int scope, java.lang.String primKey,
696                    long[] roleIds, java.lang.String actionId)
697                    throws com.liferay.portal.kernel.exception.PortalException,
698                            com.liferay.portal.kernel.exception.SystemException {
699                    return _resourcePermissionLocalService.hasResourcePermissions(companyId,
700                            name, scope, primKey, roleIds, actionId);
701            }
702    
703            /**
704            * Returns <code>true</code> if the role has permission at the scope to
705            * perform the action on the resource.
706            *
707            * <p>
708            * Depending on the scope, the value of <code>primKey</code> will have
709            * different meanings. For more information, see {@link
710            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
711            * </p>
712            *
713            * @param companyId the primary key of the company
714            * @param name the resource's name, which can be either a class name or a
715            portlet ID
716            * @param scope the scope
717            * @param roleId the primary key of the role
718            * @param actionId the action ID
719            * @return <code>true</code> if the role has permission to perform the
720            action on the resource; <code>false</code> otherwise
721            * @throws PortalException if a role with the primary key or a resource
722            action with the name and action ID could not be found
723            * @throws SystemException if a system exception occurred
724            */
725            public boolean hasScopeResourcePermission(long companyId,
726                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
727                    throws com.liferay.portal.kernel.exception.PortalException,
728                            com.liferay.portal.kernel.exception.SystemException {
729                    return _resourcePermissionLocalService.hasScopeResourcePermission(companyId,
730                            name, scope, roleId, actionId);
731            }
732    
733            /**
734            * Reassigns all the resource permissions from the source role to the
735            * destination role, and deletes the source role.
736            *
737            * @param fromRoleId the primary key of the source role
738            * @param toRoleId the primary key of the destination role
739            * @throws PortalException if a role with the primary key could not be found
740            * @throws SystemException if a system exception occurred
741            */
742            public void mergePermissions(long fromRoleId, long toRoleId)
743                    throws com.liferay.portal.kernel.exception.PortalException,
744                            com.liferay.portal.kernel.exception.SystemException {
745                    _resourcePermissionLocalService.mergePermissions(fromRoleId, toRoleId);
746            }
747    
748            /**
749            * Grants the role default permissions to all the resources of the type and
750            * at the scope stored in the resource permission, deletes the resource
751            * permission, and deletes the resource permission's role if it has no
752            * permissions remaining.
753            *
754            * @param resourcePermissionId the primary key of the resource permission
755            * @param toRoleId the primary key of the role
756            * @throws PortalException if a resource permission or role with the primary
757            key could not be found
758            * @throws SystemException if a system exception occurred
759            */
760            public void reassignPermissions(long resourcePermissionId, long toRoleId)
761                    throws com.liferay.portal.kernel.exception.PortalException,
762                            com.liferay.portal.kernel.exception.SystemException {
763                    _resourcePermissionLocalService.reassignPermissions(resourcePermissionId,
764                            toRoleId);
765            }
766    
767            /**
768            * Revokes permission at the scope from the role to perform the action on
769            * resources of the type. For example, this method could be used to revoke a
770            * group scope permission to edit blog posts.
771            *
772            * <p>
773            * Depending on the scope, the value of <code>primKey</code> will have
774            * different meanings. For more information, see {@link
775            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
776            * </p>
777            *
778            * @param companyId the primary key of the company
779            * @param name the resource's name, which can be either a class name or a
780            portlet ID
781            * @param scope the scope
782            * @param primKey the primary key
783            * @param roleId the primary key of the role
784            * @param actionId the action ID
785            * @throws PortalException if a role with the primary key or a resource
786            action with the name and action ID could not be found
787            * @throws SystemException if a system exception occurred
788            */
789            public void removeResourcePermission(long companyId, java.lang.String name,
790                    int scope, java.lang.String primKey, long roleId,
791                    java.lang.String actionId)
792                    throws com.liferay.portal.kernel.exception.PortalException,
793                            com.liferay.portal.kernel.exception.SystemException {
794                    _resourcePermissionLocalService.removeResourcePermission(companyId,
795                            name, scope, primKey, roleId, actionId);
796            }
797    
798            /**
799            * Revokes all permissions at the scope from the role to perform the action
800            * on resources of the type. For example, this method could be used to
801            * revoke all individual scope permissions to edit blog posts from site
802            * members.
803            *
804            * @param companyId the primary key of the company
805            * @param name the resource's name, which can be either a class name or a
806            portlet ID
807            * @param scope the scope
808            * @param roleId the primary key of the role
809            * @param actionId the action ID
810            * @throws PortalException if a role with the primary key or a resource
811            action with the name and action ID could not be found
812            * @throws SystemException if a system exception occurred
813            */
814            public void removeResourcePermissions(long companyId,
815                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
816                    throws com.liferay.portal.kernel.exception.PortalException,
817                            com.liferay.portal.kernel.exception.SystemException {
818                    _resourcePermissionLocalService.removeResourcePermissions(companyId,
819                            name, scope, roleId, actionId);
820            }
821    
822            /**
823            * Updates the role's permissions at the scope, setting the actions that can
824            * be performed on resources of the type, also setting the owner of any
825            * newly created resource permissions. Existing actions are replaced.
826            *
827            * <p>
828            * This method can be used to set permissions at any scope, but it is
829            * generally only used at the individual scope. For example, it could be
830            * used to set the guest permissions on a blog post.
831            * </p>
832            *
833            * <p>
834            * Depending on the scope, the value of <code>primKey</code> will have
835            * different meanings. For more information, see {@link
836            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
837            * </p>
838            *
839            * @param companyId the primary key of the company
840            * @param name the resource's name, which can be either a class name or a
841            portlet ID
842            * @param scope the scope
843            * @param primKey the primary key
844            * @param roleId the primary key of the role
845            * @param ownerId the primary key of the owner (generally the user that
846            created the resource)
847            * @param actionIds the action IDs of the actions
848            * @throws PortalException if a role with the primary key or a resource
849            action with the name and action ID could not be found
850            * @throws SystemException if a system exception occurred
851            */
852            public void setOwnerResourcePermissions(long companyId,
853                    java.lang.String name, int scope, java.lang.String primKey,
854                    long roleId, long ownerId, java.lang.String[] actionIds)
855                    throws com.liferay.portal.kernel.exception.PortalException,
856                            com.liferay.portal.kernel.exception.SystemException {
857                    _resourcePermissionLocalService.setOwnerResourcePermissions(companyId,
858                            name, scope, primKey, roleId, ownerId, actionIds);
859            }
860    
861            /**
862            * Updates the role's permissions at the scope, setting the actions that can
863            * be performed on resources of the type. Existing actions are replaced.
864            *
865            * <p>
866            * This method can be used to set permissions at any scope, but it is
867            * generally only used at the individual scope. For example, it could be
868            * used to set the guest permissions on a blog post.
869            * </p>
870            *
871            * <p>
872            * Depending on the scope, the value of <code>primKey</code> will have
873            * different meanings. For more information, see {@link
874            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
875            * </p>
876            *
877            * @param companyId the primary key of the company
878            * @param name the resource's name, which can be either a class name or a
879            portlet ID
880            * @param scope the scope
881            * @param primKey the primary key
882            * @param roleId the primary key of the role
883            * @param actionIds the action IDs of the actions
884            * @throws PortalException if a role with the primary key or a resource
885            action with the name and action ID could not be found
886            * @throws SystemException if a system exception occurred
887            */
888            public void setResourcePermissions(long companyId, java.lang.String name,
889                    int scope, java.lang.String primKey, long roleId,
890                    java.lang.String[] actionIds)
891                    throws com.liferay.portal.kernel.exception.PortalException,
892                            com.liferay.portal.kernel.exception.SystemException {
893                    _resourcePermissionLocalService.setResourcePermissions(companyId, name,
894                            scope, primKey, roleId, actionIds);
895            }
896    
897            /**
898            * Updates the role's permissions at the scope, setting the actions that can
899            * be performed on resources of the type. Existing actions are replaced.
900            *
901            * <p>
902            * This method can be used to set permissions at any scope, but it is
903            * generally only used at the individual scope. For example, it could be
904            * used to set the guest permissions on a blog post.
905            * </p>
906            *
907            * <p>
908            * Depending on the scope, the value of <code>primKey</code> will have
909            * different meanings. For more information, see {@link
910            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
911            * </p>
912            *
913            * @param companyId the primary key of the company
914            * @param name the resource's name, which can be either a class name or a
915            portlet ID
916            * @param scope the scope
917            * @param primKey the primary key
918            * @param roleIdsToActionIds a map of role IDs to action IDs of the actions
919            * @throws PortalException if a role with the primary key or a resource
920            action with the name and action ID could not be found
921            * @throws SystemException if a system exception occurred
922            */
923            public void setResourcePermissions(long companyId, java.lang.String name,
924                    int scope, java.lang.String primKey,
925                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds)
926                    throws com.liferay.portal.kernel.exception.PortalException,
927                            com.liferay.portal.kernel.exception.SystemException {
928                    _resourcePermissionLocalService.setResourcePermissions(companyId, name,
929                            scope, primKey, roleIdsToActionIds);
930            }
931    
932            /**
933             * @deprecated Renamed to {@link #getWrappedService}
934             */
935            public ResourcePermissionLocalService getWrappedResourcePermissionLocalService() {
936                    return _resourcePermissionLocalService;
937            }
938    
939            /**
940             * @deprecated Renamed to {@link #setWrappedService}
941             */
942            public void setWrappedResourcePermissionLocalService(
943                    ResourcePermissionLocalService resourcePermissionLocalService) {
944                    _resourcePermissionLocalService = resourcePermissionLocalService;
945            }
946    
947            public ResourcePermissionLocalService getWrappedService() {
948                    return _resourcePermissionLocalService;
949            }
950    
951            public void setWrappedService(
952                    ResourcePermissionLocalService resourcePermissionLocalService) {
953                    _resourcePermissionLocalService = resourcePermissionLocalService;
954            }
955    
956            private ResourcePermissionLocalService _resourcePermissionLocalService;
957    }