001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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            public ResourcePermissionLocalServiceWrapper(
029                    ResourcePermissionLocalService resourcePermissionLocalService) {
030                    _resourcePermissionLocalService = resourcePermissionLocalService;
031            }
032    
033            /**
034            * Adds the resource permission to the database. Also notifies the appropriate model listeners.
035            *
036            * @param resourcePermission the resource permission
037            * @return the resource permission that was added
038            * @throws SystemException if a system exception occurred
039            */
040            public com.liferay.portal.model.ResourcePermission addResourcePermission(
041                    com.liferay.portal.model.ResourcePermission resourcePermission)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return _resourcePermissionLocalService.addResourcePermission(resourcePermission);
044            }
045    
046            /**
047            * Creates a new resource permission with the primary key. Does not add the resource permission to the database.
048            *
049            * @param resourcePermissionId the primary key for the new resource permission
050            * @return the new resource permission
051            */
052            public com.liferay.portal.model.ResourcePermission createResourcePermission(
053                    long resourcePermissionId) {
054                    return _resourcePermissionLocalService.createResourcePermission(resourcePermissionId);
055            }
056    
057            /**
058            * Deletes the resource permission with the primary key from the database. Also notifies the appropriate model listeners.
059            *
060            * @param resourcePermissionId the primary key of the resource permission
061            * @throws PortalException if a resource permission with the primary key could not be found
062            * @throws SystemException if a system exception occurred
063            */
064            public void deleteResourcePermission(long resourcePermissionId)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    _resourcePermissionLocalService.deleteResourcePermission(resourcePermissionId);
068            }
069    
070            /**
071            * Deletes the resource permission from the database. Also notifies the appropriate model listeners.
072            *
073            * @param resourcePermission the resource permission
074            * @throws SystemException if a system exception occurred
075            */
076            public void deleteResourcePermission(
077                    com.liferay.portal.model.ResourcePermission resourcePermission)
078                    throws com.liferay.portal.kernel.exception.SystemException {
079                    _resourcePermissionLocalService.deleteResourcePermission(resourcePermission);
080            }
081    
082            /**
083            * Performs a dynamic query on the database and returns the matching rows.
084            *
085            * @param dynamicQuery the dynamic query
086            * @return the matching rows
087            * @throws SystemException if a system exception occurred
088            */
089            @SuppressWarnings("rawtypes")
090            public java.util.List dynamicQuery(
091                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
092                    throws com.liferay.portal.kernel.exception.SystemException {
093                    return _resourcePermissionLocalService.dynamicQuery(dynamicQuery);
094            }
095    
096            /**
097            * Performs a dynamic query on the database and returns a range of the matching rows.
098            *
099            * <p>
100            * 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.
101            * </p>
102            *
103            * @param dynamicQuery the dynamic query
104            * @param start the lower bound of the range of model instances
105            * @param end the upper bound of the range of model instances (not inclusive)
106            * @return the range of matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
112                    int end) throws com.liferay.portal.kernel.exception.SystemException {
113                    return _resourcePermissionLocalService.dynamicQuery(dynamicQuery,
114                            start, end);
115            }
116    
117            /**
118            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
119            *
120            * <p>
121            * 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.
122            * </p>
123            *
124            * @param dynamicQuery the dynamic query
125            * @param start the lower bound of the range of model instances
126            * @param end the upper bound of the range of model instances (not inclusive)
127            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
128            * @return the ordered range of matching rows
129            * @throws SystemException if a system exception occurred
130            */
131            @SuppressWarnings("rawtypes")
132            public java.util.List dynamicQuery(
133                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
134                    int end,
135                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
136                    throws com.liferay.portal.kernel.exception.SystemException {
137                    return _resourcePermissionLocalService.dynamicQuery(dynamicQuery,
138                            start, end, orderByComparator);
139            }
140    
141            /**
142            * Returns the number of rows that match the dynamic query.
143            *
144            * @param dynamicQuery the dynamic query
145            * @return the number of rows that match the dynamic query
146            * @throws SystemException if a system exception occurred
147            */
148            public long dynamicQueryCount(
149                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return _resourcePermissionLocalService.dynamicQueryCount(dynamicQuery);
152            }
153    
154            /**
155            * Returns the resource permission with the primary key.
156            *
157            * @param resourcePermissionId the primary key of the resource permission
158            * @return the resource permission
159            * @throws PortalException if a resource permission with the primary key could not be found
160            * @throws SystemException if a system exception occurred
161            */
162            public com.liferay.portal.model.ResourcePermission getResourcePermission(
163                    long resourcePermissionId)
164                    throws com.liferay.portal.kernel.exception.PortalException,
165                            com.liferay.portal.kernel.exception.SystemException {
166                    return _resourcePermissionLocalService.getResourcePermission(resourcePermissionId);
167            }
168    
169            public com.liferay.portal.model.PersistedModel getPersistedModel(
170                    java.io.Serializable primaryKeyObj)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return _resourcePermissionLocalService.getPersistedModel(primaryKeyObj);
174            }
175    
176            /**
177            * Returns a range of all the resource permissions.
178            *
179            * <p>
180            * 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.
181            * </p>
182            *
183            * @param start the lower bound of the range of resource permissions
184            * @param end the upper bound of the range of resource permissions (not inclusive)
185            * @return the range of resource permissions
186            * @throws SystemException if a system exception occurred
187            */
188            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
189                    int start, int end)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return _resourcePermissionLocalService.getResourcePermissions(start, end);
192            }
193    
194            /**
195            * Returns the number of resource permissions.
196            *
197            * @return the number of resource permissions
198            * @throws SystemException if a system exception occurred
199            */
200            public int getResourcePermissionsCount()
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return _resourcePermissionLocalService.getResourcePermissionsCount();
203            }
204    
205            /**
206            * Updates the resource permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
207            *
208            * @param resourcePermission the resource permission
209            * @return the resource permission that was updated
210            * @throws SystemException if a system exception occurred
211            */
212            public com.liferay.portal.model.ResourcePermission updateResourcePermission(
213                    com.liferay.portal.model.ResourcePermission resourcePermission)
214                    throws com.liferay.portal.kernel.exception.SystemException {
215                    return _resourcePermissionLocalService.updateResourcePermission(resourcePermission);
216            }
217    
218            /**
219            * Updates the resource permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
220            *
221            * @param resourcePermission the resource permission
222            * @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.
223            * @return the resource permission that was updated
224            * @throws SystemException if a system exception occurred
225            */
226            public com.liferay.portal.model.ResourcePermission updateResourcePermission(
227                    com.liferay.portal.model.ResourcePermission resourcePermission,
228                    boolean merge)
229                    throws com.liferay.portal.kernel.exception.SystemException {
230                    return _resourcePermissionLocalService.updateResourcePermission(resourcePermission,
231                            merge);
232            }
233    
234            /**
235            * Returns the Spring bean ID for this bean.
236            *
237            * @return the Spring bean ID for this bean
238            */
239            public java.lang.String getBeanIdentifier() {
240                    return _resourcePermissionLocalService.getBeanIdentifier();
241            }
242    
243            /**
244            * Sets the Spring bean ID for this bean.
245            *
246            * @param beanIdentifier the Spring bean ID for this bean
247            */
248            public void setBeanIdentifier(java.lang.String beanIdentifier) {
249                    _resourcePermissionLocalService.setBeanIdentifier(beanIdentifier);
250            }
251    
252            /**
253            * Grants the role permission at the scope to perform the action on
254            * resources of the type. Existing actions are retained.
255            *
256            * <p>
257            * This method cannot be used to grant individual scope permissions, but is
258            * only intended for adding permissions at the company, group, and
259            * group-template scopes. For example, this method could be used to grant a
260            * company scope permission to edit message board posts.
261            * </p>
262            *
263            * <p>
264            * If a company scope permission is granted to resources that the role
265            * already had group scope permissions to, the group scope permissions are
266            * deleted. Likewise, if a group scope permission is granted to resources
267            * that the role already had company scope permissions to, the company scope
268            * permissions are deleted. Be aware that this latter behavior can result in
269            * an overall reduction in permissions for the role.
270            * </p>
271            *
272            * <p>
273            * Depending on the scope, the value of <code>primKey</code> will have
274            * different meanings. For more information, see {@link
275            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
276            * </p>
277            *
278            * @param companyId the primary key of the company
279            * @param name the resource's name, which can be either a class name or a
280            portlet ID
281            * @param scope the scope. This method only supports company, group, and
282            group-template scope.
283            * @param primKey the primary key
284            * @param roleId the primary key of the role
285            * @param actionId the action ID
286            * @throws PortalException if scope was set to individual scope or if a role
287            with the primary key or a resource action with the name and
288            action ID could not be found
289            * @throws SystemException if a system exception occurred
290            */
291            public void addResourcePermission(long companyId, java.lang.String name,
292                    int scope, java.lang.String primKey, long roleId,
293                    java.lang.String actionId)
294                    throws com.liferay.portal.kernel.exception.PortalException,
295                            com.liferay.portal.kernel.exception.SystemException {
296                    _resourcePermissionLocalService.addResourcePermission(companyId, name,
297                            scope, primKey, roleId, actionId);
298            }
299    
300            /**
301            * Grants the role permissions at the scope to perform the actions on all
302            * resources of the type. Existing actions are retained.
303            *
304            * <p>
305            * This method should only be used to add default permissions to existing
306            * resources en masse during upgrades or while verifying permissions. For
307            * example, this method could be used to grant site members individual scope
308            * permissions to view all blog posts.
309            * </p>
310            *
311            * @param resourceName the resource's name, which can be either a class
312            name or a portlet ID
313            * @param roleName the role's name
314            * @param scope the scope
315            * @param resourceActionBitwiseValue the bitwise IDs of the actions
316            * @throws SystemException if a system exception occurred
317            */
318            public void addResourcePermissions(java.lang.String resourceName,
319                    java.lang.String roleName, int scope, long resourceActionBitwiseValue)
320                    throws com.liferay.portal.kernel.exception.SystemException {
321                    _resourcePermissionLocalService.addResourcePermissions(resourceName,
322                            roleName, scope, resourceActionBitwiseValue);
323            }
324    
325            /**
326            * Deletes all resource permissions at the scope to resources of the type.
327            * This method should not be confused with any of the
328            * <code>removeResourcePermission</code> methods, as its purpose is very
329            * different. This method should only be used for deleting resource
330            * permissions that refer to a resource when that resource is deleted. For
331            * example this method could be used to delete all individual scope
332            * permissions to a blog post when it is deleted.
333            *
334            * <p>
335            * Depending on the scope, the value of <code>primKey</code> will have
336            * different meanings. For more information, see {@link
337            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
338            * </p>
339            *
340            * @param companyId the primary key of the company
341            * @param name the resource's name, which can be either a class name or a
342            portlet ID
343            * @param scope the scope
344            * @param primKey the primary key
345            * @throws PortalException if a portal exception occurred
346            * @throws SystemException if a system exception occurred
347            */
348            public void deleteResourcePermissions(long companyId,
349                    java.lang.String name, int scope, long primKey)
350                    throws com.liferay.portal.kernel.exception.PortalException,
351                            com.liferay.portal.kernel.exception.SystemException {
352                    _resourcePermissionLocalService.deleteResourcePermissions(companyId,
353                            name, scope, primKey);
354            }
355    
356            /**
357            * Deletes all resource permissions at the scope to resources of the type.
358            * This method should not be confused with any of the
359            * <code>removeResourcePermission</code> methods, as its purpose is very
360            * different. This method should only be used for deleting resource
361            * permissions that refer to a resource when that resource is deleted. For
362            * example this method could be used to delete all individual scope
363            * permissions to a blog post when it is deleted.
364            *
365            * <p>
366            * Depending on the scope, the value of <code>primKey</code> will have
367            * different meanings. For more information, see {@link
368            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
369            * </p>
370            *
371            * @param companyId the primary key of the company
372            * @param name the resource's name, which can be either a class name or a
373            portlet ID
374            * @param scope the scope
375            * @param primKey the primary key
376            * @throws PortalException if a portal exception occurred
377            * @throws SystemException if a system exception occurred
378            */
379            public void deleteResourcePermissions(long companyId,
380                    java.lang.String name, int scope, java.lang.String primKey)
381                    throws com.liferay.portal.kernel.exception.PortalException,
382                            com.liferay.portal.kernel.exception.SystemException {
383                    _resourcePermissionLocalService.deleteResourcePermissions(companyId,
384                            name, scope, primKey);
385            }
386    
387            public java.util.List<java.lang.String> getAvailableResourcePermissionActionIds(
388                    long companyId, java.lang.String name, int scope,
389                    java.lang.String primKey, long roleId,
390                    java.util.List<java.lang.String> actionIds)
391                    throws com.liferay.portal.kernel.exception.PortalException,
392                            com.liferay.portal.kernel.exception.SystemException {
393                    return _resourcePermissionLocalService.getAvailableResourcePermissionActionIds(companyId,
394                            name, scope, primKey, roleId, actionIds);
395            }
396    
397            public com.liferay.portal.model.ResourcePermission getResourcePermission(
398                    long companyId, java.lang.String name, int scope,
399                    java.lang.String primKey, long roleId)
400                    throws com.liferay.portal.kernel.exception.PortalException,
401                            com.liferay.portal.kernel.exception.SystemException {
402                    return _resourcePermissionLocalService.getResourcePermission(companyId,
403                            name, scope, primKey, roleId);
404            }
405    
406            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
407                    long companyId, java.lang.String name, int scope,
408                    java.lang.String primKey)
409                    throws com.liferay.portal.kernel.exception.SystemException {
410                    return _resourcePermissionLocalService.getResourcePermissions(companyId,
411                            name, scope, primKey);
412            }
413    
414            public int getResourcePermissionsCount(long companyId,
415                    java.lang.String name, int scope, java.lang.String primKey)
416                    throws com.liferay.portal.kernel.exception.SystemException {
417                    return _resourcePermissionLocalService.getResourcePermissionsCount(companyId,
418                            name, scope, primKey);
419            }
420    
421            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
422                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
423                    return _resourcePermissionLocalService.getRoleResourcePermissions(roleId);
424            }
425    
426            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
427                    long roleId, int[] scopes, int start, int end)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    return _resourcePermissionLocalService.getRoleResourcePermissions(roleId,
430                            scopes, start, end);
431            }
432    
433            /**
434            * Returns <code>true</code> if the resource permission grants permission to
435            * perform the resource action. Note that this method does not ensure that
436            * the resource permission refers to the same type of resource as the
437            * resource action.
438            *
439            * @param resourcePermission the resource permission
440            * @param resourceAction the resource action
441            * @return <code>true</code> if the resource permission grants permission to
442            perform the resource action
443            */
444            public boolean hasActionId(
445                    com.liferay.portal.model.ResourcePermission resourcePermission,
446                    com.liferay.portal.model.ResourceAction resourceAction) {
447                    return _resourcePermissionLocalService.hasActionId(resourcePermission,
448                            resourceAction);
449            }
450    
451            /**
452            * Returns <code>true</code> if the role has permission at the scope to
453            * perform the action on resources of the type.
454            *
455            * <p>
456            * Depending on the scope, the value of <code>primKey</code> will have
457            * different meanings. For more information, see {@link
458            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
459            * </p>
460            *
461            * @param companyId the primary key of the company
462            * @param name the resource's name, which can be either a class name or a
463            portlet ID
464            * @param scope the scope
465            * @param primKey the primary key
466            * @param roleId the primary key of the role
467            * @param actionId the action ID
468            * @return <code>true</code> if the role has permission to perform the
469            action on the resource; <code>false</code> otherwise
470            * @throws PortalException if a role with the primary key or a resource
471            action with the name and action ID could not be found
472            * @throws SystemException if a system exception occurred
473            */
474            public boolean hasResourcePermission(long companyId, java.lang.String name,
475                    int scope, java.lang.String primKey, long roleId,
476                    java.lang.String actionId)
477                    throws com.liferay.portal.kernel.exception.PortalException,
478                            com.liferay.portal.kernel.exception.SystemException {
479                    return _resourcePermissionLocalService.hasResourcePermission(companyId,
480                            name, scope, primKey, roleId, actionId);
481            }
482    
483            public boolean hasScopeResourcePermission(long companyId,
484                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
485                    throws com.liferay.portal.kernel.exception.PortalException,
486                            com.liferay.portal.kernel.exception.SystemException {
487                    return _resourcePermissionLocalService.hasScopeResourcePermission(companyId,
488                            name, scope, roleId, actionId);
489            }
490    
491            /**
492            * Reassigns all the resource permissions from the source role to the
493            * destination role, and deletes the source role.
494            *
495            * @param fromRoleId the primary key of the source role
496            * @param toRoleId the primary key of the destination role
497            * @throws PortalException if a role with the primary key could not be found
498            * @throws SystemException if a system exception occurred
499            */
500            public void mergePermissions(long fromRoleId, long toRoleId)
501                    throws com.liferay.portal.kernel.exception.PortalException,
502                            com.liferay.portal.kernel.exception.SystemException {
503                    _resourcePermissionLocalService.mergePermissions(fromRoleId, toRoleId);
504            }
505    
506            /**
507            * Grants the role default permissions to all the resources of the type and
508            * at the scope stored in the resource permission, deletes the resource
509            * permission, and deletes the resource permission's role if it has no
510            * permissions remaining.
511            *
512            * @param resourcePermissionId the primary key of the resource permission
513            * @param toRoleId the primary key of the role
514            * @throws PortalException if a resource permission or role with the primary
515            key could not be found
516            * @throws SystemException if a system exception occurred
517            */
518            public void reassignPermissions(long resourcePermissionId, long toRoleId)
519                    throws com.liferay.portal.kernel.exception.PortalException,
520                            com.liferay.portal.kernel.exception.SystemException {
521                    _resourcePermissionLocalService.reassignPermissions(resourcePermissionId,
522                            toRoleId);
523            }
524    
525            /**
526            * Revokes permission at the scope from the role to perform the action on
527            * resources of the type. For example, this method could be used to revoke a
528            * group scope permission to edit blog posts.
529            *
530            * <p>
531            * Depending on the scope, the value of <code>primKey</code> will have
532            * different meanings. For more information, see {@link
533            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
534            * </p>
535            *
536            * @param companyId the primary key of the company
537            * @param name the resource's name, which can be either a class name or a
538            portlet ID
539            * @param scope the scope
540            * @param primKey the primary key
541            * @param roleId the primary key of the role
542            * @param actionId the action ID
543            * @throws PortalException if a role with the primary key or a resource
544            action with the name and action ID could not be found
545            * @throws SystemException if a system exception occurred
546            */
547            public void removeResourcePermission(long companyId, java.lang.String name,
548                    int scope, java.lang.String primKey, long roleId,
549                    java.lang.String actionId)
550                    throws com.liferay.portal.kernel.exception.PortalException,
551                            com.liferay.portal.kernel.exception.SystemException {
552                    _resourcePermissionLocalService.removeResourcePermission(companyId,
553                            name, scope, primKey, roleId, actionId);
554            }
555    
556            /**
557            * Revokes all permissions at the scope from the role to perform the action
558            * on resources of the type. For example, this method could be used to
559            * revoke all individual scope permissions to edit blog posts from site
560            * members.
561            *
562            * @param companyId the primary key of the company
563            * @param name the resource's name, which can be either a class name or a
564            portlet ID
565            * @param scope the scope
566            * @param roleId the primary key of the role
567            * @param actionId the action ID
568            * @throws PortalException if a role with the primary key or a resource
569            action with the name and action ID could not be found
570            * @throws SystemException if a system exception occurred
571            */
572            public void removeResourcePermissions(long companyId,
573                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
574                    throws com.liferay.portal.kernel.exception.PortalException,
575                            com.liferay.portal.kernel.exception.SystemException {
576                    _resourcePermissionLocalService.removeResourcePermissions(companyId,
577                            name, scope, roleId, actionId);
578            }
579    
580            /**
581            * Updates the role's permissions at the scope, setting the actions that can
582            * be performed on resources of the type, also setting the owner of any
583            * newly created resource permissions. Existing actions are replaced.
584            *
585            * <p>
586            * This method can be used to set permissions at any scope, but it is
587            * generally only used at the individual scope. For example, it could be
588            * used to set the guest permissions on a blog post.
589            * </p>
590            *
591            * <p>
592            * Depending on the scope, the value of <code>primKey</code> will have
593            * different meanings. For more information, see {@link
594            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
595            * </p>
596            *
597            * @param companyId the primary key of the company
598            * @param name the resource's name, which can be either a class name or a
599            portlet ID
600            * @param scope the scope
601            * @param primKey the primary key
602            * @param roleId the primary key of the role
603            * @param ownerId the primary key of the owner (generally the user that
604            created the resource)
605            * @param actionIds the action IDs of the actions
606            * @throws PortalException if a role with the primary key or a resource
607            action with the name and action ID could not be found
608            * @throws SystemException if a system exception occurred
609            */
610            public void setOwnerResourcePermissions(long companyId,
611                    java.lang.String name, int scope, java.lang.String primKey,
612                    long roleId, long ownerId, java.lang.String[] actionIds)
613                    throws com.liferay.portal.kernel.exception.PortalException,
614                            com.liferay.portal.kernel.exception.SystemException {
615                    _resourcePermissionLocalService.setOwnerResourcePermissions(companyId,
616                            name, scope, primKey, roleId, ownerId, actionIds);
617            }
618    
619            /**
620            * Updates the role's permissions at the scope, setting the actions that can
621            * be performed on resources of the type. Existing actions are replaced.
622            *
623            * <p>
624            * This method can be used to set permissions at any scope, but it is
625            * generally only used at the individual scope. For example, it could be
626            * used to set the guest permissions on a blog post.
627            * </p>
628            *
629            * <p>
630            * Depending on the scope, the value of <code>primKey</code> will have
631            * different meanings. For more information, see {@link
632            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
633            * </p>
634            *
635            * @param companyId the primary key of the company
636            * @param name the resource's name, which can be either a class name or a
637            portlet ID
638            * @param scope the scope
639            * @param primKey the primary key
640            * @param roleId the primary key of the role
641            * @param actionIds the action IDs of the actions
642            * @throws PortalException if a role with the primary key or a resource
643            action with the name and action ID could not be found
644            * @throws SystemException if a system exception occurred
645            */
646            public void setResourcePermissions(long companyId, java.lang.String name,
647                    int scope, java.lang.String primKey, long roleId,
648                    java.lang.String[] actionIds)
649                    throws com.liferay.portal.kernel.exception.PortalException,
650                            com.liferay.portal.kernel.exception.SystemException {
651                    _resourcePermissionLocalService.setResourcePermissions(companyId, name,
652                            scope, primKey, roleId, actionIds);
653            }
654    
655            public ResourcePermissionLocalService getWrappedResourcePermissionLocalService() {
656                    return _resourcePermissionLocalService;
657            }
658    
659            public void setWrappedResourcePermissionLocalService(
660                    ResourcePermissionLocalService resourcePermissionLocalService) {
661                    _resourcePermissionLocalService = resourcePermissionLocalService;
662            }
663    
664            private ResourcePermissionLocalService _resourcePermissionLocalService;
665    }