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