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