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