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