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 name
106            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 matching the dynamic query.
287            *
288            * @param dynamicQuery the dynamic query
289            * @return the number of rows matching 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 matching 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 matching 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 companyId, java.lang.String name, int scope,
315                    java.lang.String primKey, long roleId) {
316                    return _resourcePermissionLocalService.fetchResourcePermission(companyId,
317                            name, scope, primKey, roleId);
318            }
319    
320            @Override
321            public com.liferay.portal.model.ResourcePermission fetchResourcePermission(
322                    long resourcePermissionId) {
323                    return _resourcePermissionLocalService.fetchResourcePermission(resourcePermissionId);
324            }
325    
326            @Override
327            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
328                    return _resourcePermissionLocalService.getActionableDynamicQuery();
329            }
330    
331            @Override
332            public java.util.Map<java.lang.Long, java.util.Set<java.lang.String>> getAvailableResourcePermissionActionIds(
333                    long companyId, java.lang.String name, int scope,
334                    java.lang.String primKey,
335                    java.util.Collection<java.lang.String> actionIds) {
336                    return _resourcePermissionLocalService.getAvailableResourcePermissionActionIds(companyId,
337                            name, scope, primKey, actionIds);
338            }
339    
340            /**
341            * Returns the intersection of action IDs the role has permission at the
342            * scope to perform on resources of the type.
343            *
344            * @param companyId he primary key of the company
345            * @param name the resource's name, which can be either a class name or a
346            portlet ID
347            * @param scope the scope
348            * @param primKey the primary key
349            * @param roleId the primary key of the role
350            * @param actionIds the action IDs
351            * @return the intersection of action IDs the role has permission at the
352            scope to perform on resources of the type
353            * @throws PortalException if a resouce action could not be found for any
354            one of the actions on the resource
355            */
356            @Override
357            public java.util.List<java.lang.String> getAvailableResourcePermissionActionIds(
358                    long companyId, java.lang.String name, int scope,
359                    java.lang.String primKey, long roleId,
360                    java.util.Collection<java.lang.String> actionIds)
361                    throws com.liferay.portal.kernel.exception.PortalException {
362                    return _resourcePermissionLocalService.getAvailableResourcePermissionActionIds(companyId,
363                            name, scope, primKey, roleId, actionIds);
364            }
365    
366            /**
367            * @deprecated As of 7.0.0, replaced by {@link
368            #getAvailableResourcePermissionActionIds(long, String, int,
369            String, Collection)}
370            */
371            @Deprecated
372            @Override
373            public java.util.Map<java.lang.Long, java.util.Set<java.lang.String>> getAvailableResourcePermissionActionIds(
374                    long companyId, java.lang.String name, int scope,
375                    java.lang.String primKey, long[] roleIds,
376                    java.util.Collection<java.lang.String> actionIds) {
377                    return _resourcePermissionLocalService.getAvailableResourcePermissionActionIds(companyId,
378                            name, scope, primKey, roleIds, actionIds);
379            }
380    
381            /**
382            * Returns the Spring bean ID for this bean.
383            *
384            * @return the Spring bean ID for this bean
385            */
386            @Override
387            public java.lang.String getBeanIdentifier() {
388                    return _resourcePermissionLocalService.getBeanIdentifier();
389            }
390    
391            @Override
392            public com.liferay.portal.model.PersistedModel getPersistedModel(
393                    java.io.Serializable primaryKeyObj)
394                    throws com.liferay.portal.kernel.exception.PortalException {
395                    return _resourcePermissionLocalService.getPersistedModel(primaryKeyObj);
396            }
397    
398            /**
399            * Returns the resource permission for the role at the scope to perform the
400            * actions on resources of the type.
401            *
402            * @param companyId the primary key of the company
403            * @param name the resource's name, which can be either a class name or a
404            portlet ID
405            * @param scope the scope
406            * @param primKey the primary key
407            * @param roleId the primary key of the role
408            * @return the resource permission for the role at the scope to perform the
409            actions on resources of the type
410            * @throws PortalException if no matching resources could be found
411            */
412            @Override
413            public com.liferay.portal.model.ResourcePermission getResourcePermission(
414                    long companyId, java.lang.String name, int scope,
415                    java.lang.String primKey, long roleId)
416                    throws com.liferay.portal.kernel.exception.PortalException {
417                    return _resourcePermissionLocalService.getResourcePermission(companyId,
418                            name, scope, primKey, roleId);
419            }
420    
421            /**
422            * Returns the resource permission with the primary key.
423            *
424            * @param resourcePermissionId the primary key of the resource permission
425            * @return the resource permission
426            * @throws PortalException if a resource permission with the primary key could not be found
427            */
428            @Override
429            public com.liferay.portal.model.ResourcePermission getResourcePermission(
430                    long resourcePermissionId)
431                    throws com.liferay.portal.kernel.exception.PortalException {
432                    return _resourcePermissionLocalService.getResourcePermission(resourcePermissionId);
433            }
434    
435            /**
436            * Returns all the resource permissions at the scope of the type.
437            *
438            * @param companyId the primary key of the company
439            * @param name the resource's name, which can be either a class name or a
440            portlet ID
441            * @param scope the scope
442            * @param primKey the primary key
443            * @return the resource permissions at the scope of the type
444            */
445            @Override
446            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
447                    long companyId, java.lang.String name, int scope,
448                    java.lang.String primKey) {
449                    return _resourcePermissionLocalService.getResourcePermissions(companyId,
450                            name, scope, primKey);
451            }
452    
453            /**
454            * Returns a range of all the resource permissions.
455            *
456            * <p>
457            * 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.
458            * </p>
459            *
460            * @param start the lower bound of the range of resource permissions
461            * @param end the upper bound of the range of resource permissions (not inclusive)
462            * @return the range of resource permissions
463            */
464            @Override
465            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
466                    int start, int end) {
467                    return _resourcePermissionLocalService.getResourcePermissions(start, end);
468            }
469    
470            /**
471            * Returns the number of resource permissions.
472            *
473            * @return the number of resource permissions
474            */
475            @Override
476            public int getResourcePermissionsCount() {
477                    return _resourcePermissionLocalService.getResourcePermissionsCount();
478            }
479    
480            /**
481            * Returns the number of resource permissions at the scope of the type.
482            *
483            * @param companyId the primary key of the company
484            * @param name the resource's name, which can be either a class name or a
485            portlet ID
486            * @param scope the scope
487            * @param primKey the primary key
488            * @return the number of resource permissions at the scope of the type
489            */
490            @Override
491            public int getResourcePermissionsCount(long companyId,
492                    java.lang.String name, int scope, java.lang.String primKey) {
493                    return _resourcePermissionLocalService.getResourcePermissionsCount(companyId,
494                            name, scope, primKey);
495            }
496    
497            /**
498            * Returns the resource permissions that apply to the resource.
499            *
500            * @param companyId the primary key of the resource's company
501            * @param groupId the primary key of the resource's group
502            * @param name the resource's name, which can be either a class name or a
503            portlet ID
504            * @param primKey the primary key of the resource
505            * @return the resource permissions associated with the resource
506            */
507            @Override
508            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourceResourcePermissions(
509                    long companyId, long groupId, java.lang.String name,
510                    java.lang.String primKey) {
511                    return _resourcePermissionLocalService.getResourceResourcePermissions(companyId,
512                            groupId, name, primKey);
513            }
514    
515            /**
516            * Returns all the resource permissions for the role.
517            *
518            * @param roleId the primary key of the role
519            * @return the resource permissions for the role
520            */
521            @Override
522            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
523                    long roleId) {
524                    return _resourcePermissionLocalService.getRoleResourcePermissions(roleId);
525            }
526    
527            /**
528            * Returns a range of all the resource permissions for the role at the
529            * scopes.
530            *
531            * <p>
532            * Useful when paginating results. Returns a maximum of <code>end -
533            * start</code> instances. <code>start</code> and <code>end</code> are not
534            * primary keys, they are indexes in the result set. Thus, <code>0</code>
535            * refers to the first result in the set. Setting both <code>start</code>
536            * and <code>end</code> to {@link
537            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
538            * result set.
539            * </p>
540            *
541            * @param roleId the primary key of the role
542            * @param scopes the scopes
543            * @param start the lower bound of the range of results
544            * @param end the upper bound of the range of results (not inclusive)
545            * @return the range of resource permissions for the role at the scopes
546            */
547            @Override
548            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
549                    long roleId, int[] scopes, int start, int end) {
550                    return _resourcePermissionLocalService.getRoleResourcePermissions(roleId,
551                            scopes, start, end);
552            }
553    
554            /**
555            * Returns all the resource permissions where scope = any &#63;.
556            *
557            * <p>
558            * Useful when paginating results. Returns a maximum of <code>end -
559            * start</code> instances. <code>start</code> and <code>end</code> are not
560            * primary keys, they are indexes in the result set. Thus, <code>0</code>
561            * refers to the first result in the set. Setting both <code>start</code>
562            * and <code>end</code> to {@link
563            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
564            * result set.
565            * </p>
566            *
567            * @param scopes the scopes
568            * @return the resource permissions where scope = any &#63;
569            */
570            @Override
571            public java.util.List<com.liferay.portal.model.ResourcePermission> getScopeResourcePermissions(
572                    int[] scopes) {
573                    return _resourcePermissionLocalService.getScopeResourcePermissions(scopes);
574            }
575    
576            /**
577            * Returns <code>true</code> if the resource permission grants permission to
578            * perform the resource action. Note that this method does not ensure that
579            * the resource permission refers to the same type of resource as the
580            * resource action.
581            *
582            * @param resourcePermission the resource permission
583            * @param resourceAction the resource action
584            * @return <code>true</code> if the resource permission grants permission to
585            perform the resource action
586            */
587            @Override
588            public boolean hasActionId(
589                    com.liferay.portal.model.ResourcePermission resourcePermission,
590                    com.liferay.portal.model.ResourceAction resourceAction) {
591                    return _resourcePermissionLocalService.hasActionId(resourcePermission,
592                            resourceAction);
593            }
594    
595            /**
596            * Returns <code>true</code> if the role has permission at the scope to
597            * perform the action on resources of the type.
598            *
599            * <p>
600            * Depending on the scope, the value of <code>primKey</code> will have
601            * different meanings. For more information, see {@link
602            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
603            * </p>
604            *
605            * @param companyId the primary key of the company
606            * @param name the resource's name, which can be either a class name or a
607            portlet ID
608            * @param scope the scope
609            * @param primKey the primary key
610            * @param roleId the primary key of the role
611            * @param actionId the action ID
612            * @return <code>true</code> if the role has permission to perform the
613            action on the resource; <code>false</code> otherwise
614            * @throws PortalException if a role with the primary key or a resource
615            action with the name and action ID could not be found
616            */
617            @Override
618            public boolean hasResourcePermission(long companyId, java.lang.String name,
619                    int scope, java.lang.String primKey, long roleId,
620                    java.lang.String actionId)
621                    throws com.liferay.portal.kernel.exception.PortalException {
622                    return _resourcePermissionLocalService.hasResourcePermission(companyId,
623                            name, scope, primKey, roleId, actionId);
624            }
625    
626            /**
627            * Returns <code>true</code> if the roles have permission at the scope to
628            * perform the action on resources of the type.
629            *
630            * <p>
631            * Depending on the scope, the value of <code>primKey</code> will have
632            * different meanings. For more information, see {@link
633            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
634            * </p>
635            *
636            * @param companyId the primary key of the company
637            * @param name the resource's name, which can be either a class name or a
638            portlet ID
639            * @param scope the scope
640            * @param primKey the primary key
641            * @param roleIds the primary keys of the roles
642            * @param actionId the action ID
643            * @return <code>true</code> if any one of the roles has permission to
644            perform the action on the resource; <code>false</code> otherwise
645            * @throws PortalException if any one of the roles with the primary keys
646            could not be found or if a resource action with the name and
647            action ID could not be found
648            */
649            @Override
650            public boolean hasResourcePermission(long companyId, java.lang.String name,
651                    int scope, java.lang.String primKey, long[] roleIds,
652                    java.lang.String actionId)
653                    throws com.liferay.portal.kernel.exception.PortalException {
654                    return _resourcePermissionLocalService.hasResourcePermission(companyId,
655                            name, scope, primKey, roleIds, actionId);
656            }
657    
658            /**
659            * Returns <code>true</code> if the roles have permission at the scope to
660            * perform the action on the resources.
661            *
662            * <p>
663            * Depending on the scope, the value of <code>primKey</code> will have
664            * different meanings. For more information, see {@link
665            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
666            * </p>
667            *
668            * @param resources the resources
669            * @param roleIds the primary keys of the roles
670            * @param actionId the action ID
671            * @return <code>true</code> if any one of the roles has permission to
672            perform the action on any one of the resources;
673            <code>false</code> otherwise
674            * @throws PortalException if any one of the roles with the primary keys
675            could not be found or if a resource action with the name and
676            action ID could not be found
677            */
678            @Override
679            public boolean hasResourcePermission(
680                    java.util.List<com.liferay.portal.model.Resource> resources,
681                    long[] roleIds, java.lang.String actionId)
682                    throws com.liferay.portal.kernel.exception.PortalException {
683                    return _resourcePermissionLocalService.hasResourcePermission(resources,
684                            roleIds, actionId);
685            }
686    
687            @Override
688            public boolean[] hasResourcePermissions(long companyId,
689                    java.lang.String name, int scope, java.lang.String primKey,
690                    long[] roleIds, java.lang.String actionId)
691                    throws com.liferay.portal.kernel.exception.PortalException {
692                    return _resourcePermissionLocalService.hasResourcePermissions(companyId,
693                            name, scope, primKey, roleIds, actionId);
694            }
695    
696            /**
697            * Returns <code>true</code> if the role has permission at the scope to
698            * perform the action on the resource.
699            *
700            * <p>
701            * Depending on the scope, the value of <code>primKey</code> will have
702            * different meanings. For more information, see {@link
703            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
704            * </p>
705            *
706            * @param companyId the primary key of the company
707            * @param name the resource's name, which can be either a class name or a
708            portlet ID
709            * @param scope the scope
710            * @param roleId the primary key of the role
711            * @param actionId the action ID
712            * @return <code>true</code> if the role has permission to perform the
713            action on the resource; <code>false</code> otherwise
714            * @throws PortalException if a role with the primary key or a resource
715            action with the name and action ID could not be found
716            */
717            @Override
718            public boolean hasScopeResourcePermission(long companyId,
719                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
720                    throws com.liferay.portal.kernel.exception.PortalException {
721                    return _resourcePermissionLocalService.hasScopeResourcePermission(companyId,
722                            name, scope, roleId, actionId);
723            }
724    
725            /**
726            * Reassigns all the resource permissions from the source role to the
727            * destination role, and deletes the source role.
728            *
729            * @param fromRoleId the primary key of the source role
730            * @param toRoleId the primary key of the destination role
731            * @throws PortalException if a role with the primary key could not be found
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            * @throws PortalException if a resource permission or role with the primary
748            key could not be found
749            */
750            @Override
751            public void reassignPermissions(long resourcePermissionId, long toRoleId)
752                    throws com.liferay.portal.kernel.exception.PortalException {
753                    _resourcePermissionLocalService.reassignPermissions(resourcePermissionId,
754                            toRoleId);
755            }
756    
757            /**
758            * Revokes permission at the scope from the role to perform the action on
759            * resources of the type. For example, this method could be used to revoke a
760            * group scope permission to edit blog posts.
761            *
762            * <p>
763            * Depending on the scope, the value of <code>primKey</code> will have
764            * different meanings. For more information, see {@link
765            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
766            * </p>
767            *
768            * @param companyId the primary key of the company
769            * @param name the resource's name, which can be either a class name or a
770            portlet ID
771            * @param scope the scope
772            * @param primKey the primary key
773            * @param roleId the primary key of the role
774            * @param actionId the action ID
775            * @throws PortalException if a role with the primary key or a resource
776            action with the name and action ID could not be found
777            */
778            @Override
779            public void removeResourcePermission(long companyId, java.lang.String name,
780                    int scope, java.lang.String primKey, long roleId,
781                    java.lang.String actionId)
782                    throws com.liferay.portal.kernel.exception.PortalException {
783                    _resourcePermissionLocalService.removeResourcePermission(companyId,
784                            name, scope, primKey, roleId, actionId);
785            }
786    
787            /**
788            * Revokes all permissions at the scope from the role to perform the action
789            * on resources of the type. For example, this method could be used to
790            * revoke all individual scope permissions to edit blog posts from site
791            * members.
792            *
793            * @param companyId the primary key of the company
794            * @param name the resource's name, which can be either a class name or a
795            portlet ID
796            * @param scope the scope
797            * @param roleId the primary key of the role
798            * @param actionId the action ID
799            * @throws PortalException if a role with the primary key or a resource
800            action with the name and action ID could not be found
801            */
802            @Override
803            public void removeResourcePermissions(long companyId,
804                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
805                    throws com.liferay.portal.kernel.exception.PortalException {
806                    _resourcePermissionLocalService.removeResourcePermissions(companyId,
807                            name, scope, roleId, actionId);
808            }
809    
810            /**
811            * Sets the Spring bean ID for this bean.
812            *
813            * @param beanIdentifier the Spring bean ID for this bean
814            */
815            @Override
816            public void setBeanIdentifier(java.lang.String beanIdentifier) {
817                    _resourcePermissionLocalService.setBeanIdentifier(beanIdentifier);
818            }
819    
820            /**
821            * Updates the role's permissions at the scope, setting the actions that can
822            * be performed on resources of the type, also setting the owner of any
823            * newly created resource permissions. Existing actions are replaced.
824            *
825            * <p>
826            * This method can be used to set permissions at any scope, but it is
827            * generally only used at the individual scope. For example, it could be
828            * used to set the guest permissions on a blog post.
829            * </p>
830            *
831            * <p>
832            * Depending on the scope, the value of <code>primKey</code> will have
833            * different meanings. For more information, see {@link
834            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
835            * </p>
836            *
837            * @param companyId the primary key of the company
838            * @param name the resource's name, which can be either a class name or a
839            portlet ID
840            * @param scope the scope
841            * @param primKey the primary key
842            * @param roleId the primary key of the role
843            * @param ownerId the primary key of the owner (generally the user that
844            created the resource)
845            * @param actionIds the action IDs of the actions
846            * @throws PortalException if a role with the primary key or a resource
847            action with the name and action ID could not be found
848            */
849            @Override
850            public void setOwnerResourcePermissions(long companyId,
851                    java.lang.String name, int scope, java.lang.String primKey,
852                    long roleId, long ownerId, java.lang.String[] actionIds)
853                    throws com.liferay.portal.kernel.exception.PortalException {
854                    _resourcePermissionLocalService.setOwnerResourcePermissions(companyId,
855                            name, scope, primKey, roleId, ownerId, actionIds);
856            }
857    
858            /**
859            * Updates the role's permissions at the scope, setting the actions that can
860            * be performed on resources of the type. Existing actions are replaced.
861            *
862            * <p>
863            * This method can be used to set permissions at any scope, but it is
864            * generally only used at the individual scope. For example, it could be
865            * used to set the guest permissions on a blog post.
866            * </p>
867            *
868            * <p>
869            * Depending on the scope, the value of <code>primKey</code> will have
870            * different meanings. For more information, see {@link
871            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
872            * </p>
873            *
874            * @param companyId the primary key of the company
875            * @param name the resource's name, which can be either a class name or a
876            portlet ID
877            * @param scope the scope
878            * @param primKey the primary key
879            * @param roleId the primary key of the role
880            * @param actionIds the action IDs of the actions
881            * @throws PortalException if a role with the primary key or a resource
882            action with the name and action ID could not be found
883            */
884            @Override
885            public void setResourcePermissions(long companyId, java.lang.String name,
886                    int scope, java.lang.String primKey, long roleId,
887                    java.lang.String[] actionIds)
888                    throws com.liferay.portal.kernel.exception.PortalException {
889                    _resourcePermissionLocalService.setResourcePermissions(companyId, name,
890                            scope, primKey, roleId, actionIds);
891            }
892    
893            /**
894            * Updates the role's permissions at the scope, setting the actions that can
895            * be performed on resources of the type. Existing actions are replaced.
896            *
897            * <p>
898            * This method can be used to set permissions at any scope, but it is
899            * generally only used at the individual scope. For example, it could be
900            * used to set the guest permissions on a blog post.
901            * </p>
902            *
903            * <p>
904            * Depending on the scope, the value of <code>primKey</code> will have
905            * different meanings. For more information, see {@link
906            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
907            * </p>
908            *
909            * @param companyId the primary key of the company
910            * @param name the resource's name, which can be either a class name or a
911            portlet ID
912            * @param scope the scope
913            * @param primKey the primary key
914            * @param roleIdsToActionIds a map of role IDs to action IDs of the actions
915            * @throws PortalException if a role with the primary key or a resource
916            action with the name and action ID could not be found
917            */
918            @Override
919            public void setResourcePermissions(long companyId, java.lang.String name,
920                    int scope, java.lang.String primKey,
921                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds)
922                    throws com.liferay.portal.kernel.exception.PortalException {
923                    _resourcePermissionLocalService.setResourcePermissions(companyId, name,
924                            scope, primKey, roleIdsToActionIds);
925            }
926    
927            /**
928            * Updates the resource permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
929            *
930            * @param resourcePermission the resource permission
931            * @return the resource permission that was updated
932            */
933            @Override
934            public com.liferay.portal.model.ResourcePermission updateResourcePermission(
935                    com.liferay.portal.model.ResourcePermission resourcePermission) {
936                    return _resourcePermissionLocalService.updateResourcePermission(resourcePermission);
937            }
938    
939            /**
940             * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
941             */
942            @Deprecated
943            public ResourcePermissionLocalService getWrappedResourcePermissionLocalService() {
944                    return _resourcePermissionLocalService;
945            }
946    
947            /**
948             * @deprecated As of 6.1.0, replaced by {@link #setWrappedService}
949             */
950            @Deprecated
951            public void setWrappedResourcePermissionLocalService(
952                    ResourcePermissionLocalService resourcePermissionLocalService) {
953                    _resourcePermissionLocalService = resourcePermissionLocalService;
954            }
955    
956            @Override
957            public ResourcePermissionLocalService getWrappedService() {
958                    return _resourcePermissionLocalService;
959            }
960    
961            @Override
962            public void setWrappedService(
963                    ResourcePermissionLocalService resourcePermissionLocalService) {
964                    _resourcePermissionLocalService = resourcePermissionLocalService;
965            }
966    
967            private ResourcePermissionLocalService _resourcePermissionLocalService;
968    }