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