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 PermissionLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       PermissionLocalService
024     * @generated
025     */
026    public class PermissionLocalServiceWrapper implements PermissionLocalService,
027            ServiceWrapper<PermissionLocalService> {
028            public PermissionLocalServiceWrapper(
029                    PermissionLocalService permissionLocalService) {
030                    _permissionLocalService = permissionLocalService;
031            }
032    
033            /**
034            * Adds the permission to the database. Also notifies the appropriate model listeners.
035            *
036            * @param permission the permission
037            * @return the permission that was added
038            * @throws SystemException if a system exception occurred
039            */
040            public com.liferay.portal.model.Permission addPermission(
041                    com.liferay.portal.model.Permission permission)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return _permissionLocalService.addPermission(permission);
044            }
045    
046            /**
047            * Creates a new permission with the primary key. Does not add the permission to the database.
048            *
049            * @param permissionId the primary key for the new permission
050            * @return the new permission
051            */
052            public com.liferay.portal.model.Permission createPermission(
053                    long permissionId) {
054                    return _permissionLocalService.createPermission(permissionId);
055            }
056    
057            /**
058            * Deletes the permission with the primary key from the database. Also notifies the appropriate model listeners.
059            *
060            * @param permissionId the primary key of the permission
061            * @throws PortalException if a permission with the primary key could not be found
062            * @throws SystemException if a system exception occurred
063            */
064            public void deletePermission(long permissionId)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    _permissionLocalService.deletePermission(permissionId);
068            }
069    
070            /**
071            * Deletes the permission from the database. Also notifies the appropriate model listeners.
072            *
073            * @param permission the permission
074            * @throws SystemException if a system exception occurred
075            */
076            public void deletePermission(com.liferay.portal.model.Permission permission)
077                    throws com.liferay.portal.kernel.exception.SystemException {
078                    _permissionLocalService.deletePermission(permission);
079            }
080    
081            /**
082            * Performs a dynamic query on the database and returns the matching rows.
083            *
084            * @param dynamicQuery the dynamic query
085            * @return the matching rows
086            * @throws SystemException if a system exception occurred
087            */
088            @SuppressWarnings("rawtypes")
089            public java.util.List dynamicQuery(
090                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
091                    throws com.liferay.portal.kernel.exception.SystemException {
092                    return _permissionLocalService.dynamicQuery(dynamicQuery);
093            }
094    
095            /**
096            * Performs a dynamic query on the database and returns a range of the matching rows.
097            *
098            * <p>
099            * 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.
100            * </p>
101            *
102            * @param dynamicQuery the dynamic query
103            * @param start the lower bound of the range of model instances
104            * @param end the upper bound of the range of model instances (not inclusive)
105            * @return the range of matching rows
106            * @throws SystemException if a system exception occurred
107            */
108            @SuppressWarnings("rawtypes")
109            public java.util.List dynamicQuery(
110                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
111                    int end) throws com.liferay.portal.kernel.exception.SystemException {
112                    return _permissionLocalService.dynamicQuery(dynamicQuery, start, end);
113            }
114    
115            /**
116            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
117            *
118            * <p>
119            * 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.
120            * </p>
121            *
122            * @param dynamicQuery the dynamic query
123            * @param start the lower bound of the range of model instances
124            * @param end the upper bound of the range of model instances (not inclusive)
125            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
126            * @return the ordered range of matching rows
127            * @throws SystemException if a system exception occurred
128            */
129            @SuppressWarnings("rawtypes")
130            public java.util.List dynamicQuery(
131                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132                    int end,
133                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
134                    throws com.liferay.portal.kernel.exception.SystemException {
135                    return _permissionLocalService.dynamicQuery(dynamicQuery, start, end,
136                            orderByComparator);
137            }
138    
139            /**
140            * Returns the number of rows that match the dynamic query.
141            *
142            * @param dynamicQuery the dynamic query
143            * @return the number of rows that match the dynamic query
144            * @throws SystemException if a system exception occurred
145            */
146            public long dynamicQueryCount(
147                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
148                    throws com.liferay.portal.kernel.exception.SystemException {
149                    return _permissionLocalService.dynamicQueryCount(dynamicQuery);
150            }
151    
152            public com.liferay.portal.model.Permission fetchPermission(
153                    long permissionId)
154                    throws com.liferay.portal.kernel.exception.SystemException {
155                    return _permissionLocalService.fetchPermission(permissionId);
156            }
157    
158            /**
159            * Returns the permission with the primary key.
160            *
161            * @param permissionId the primary key of the permission
162            * @return the permission
163            * @throws PortalException if a permission with the primary key could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portal.model.Permission getPermission(long permissionId)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    return _permissionLocalService.getPermission(permissionId);
170            }
171    
172            public com.liferay.portal.model.PersistedModel getPersistedModel(
173                    java.io.Serializable primaryKeyObj)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return _permissionLocalService.getPersistedModel(primaryKeyObj);
177            }
178    
179            /**
180            * Returns a range of all the permissions.
181            *
182            * <p>
183            * 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.
184            * </p>
185            *
186            * @param start the lower bound of the range of permissions
187            * @param end the upper bound of the range of permissions (not inclusive)
188            * @return the range of permissions
189            * @throws SystemException if a system exception occurred
190            */
191            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
192                    int start, int end)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return _permissionLocalService.getPermissions(start, end);
195            }
196    
197            /**
198            * Returns the number of permissions.
199            *
200            * @return the number of permissions
201            * @throws SystemException if a system exception occurred
202            */
203            public int getPermissionsCount()
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return _permissionLocalService.getPermissionsCount();
206            }
207    
208            /**
209            * Updates the permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
210            *
211            * @param permission the permission
212            * @return the permission that was updated
213            * @throws SystemException if a system exception occurred
214            */
215            public com.liferay.portal.model.Permission updatePermission(
216                    com.liferay.portal.model.Permission permission)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return _permissionLocalService.updatePermission(permission);
219            }
220    
221            /**
222            * Updates the permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
223            *
224            * @param permission the permission
225            * @param merge whether to merge the 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.
226            * @return the permission that was updated
227            * @throws SystemException if a system exception occurred
228            */
229            public com.liferay.portal.model.Permission updatePermission(
230                    com.liferay.portal.model.Permission permission, boolean merge)
231                    throws com.liferay.portal.kernel.exception.SystemException {
232                    return _permissionLocalService.updatePermission(permission, merge);
233            }
234    
235            /**
236            * Returns the Spring bean ID for this bean.
237            *
238            * @return the Spring bean ID for this bean
239            */
240            public java.lang.String getBeanIdentifier() {
241                    return _permissionLocalService.getBeanIdentifier();
242            }
243    
244            /**
245            * Sets the Spring bean ID for this bean.
246            *
247            * @param beanIdentifier the Spring bean ID for this bean
248            */
249            public void setBeanIdentifier(java.lang.String beanIdentifier) {
250                    _permissionLocalService.setBeanIdentifier(beanIdentifier);
251            }
252    
253            /**
254            * Adds a permission to perform the action on the resource.
255            *
256            * <p>
257            * This method will retrieve the permission of the company, action, and
258            * resource with the primary keys. The method creates the permission if it
259            * fails to retrieve it.
260            * </p>
261            *
262            * @param companyId the primary key of the company
263            * @param actionId the action's ID
264            * @param resourceId the primary key of the resource
265            * @return the permission of the company, action, and resource with the
266            primary keys
267            * @throws SystemException if a system exception occurred
268            */
269            public com.liferay.portal.model.Permission addPermission(long companyId,
270                    java.lang.String actionId, long resourceId)
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    return _permissionLocalService.addPermission(companyId, actionId,
273                            resourceId);
274            }
275    
276            /**
277            * Adds permissions to perform the actions on the resource.
278            *
279            * <p>
280            * This method will retrieve the permissions of the company, actions, and
281            * resource with the primary keys. The method creates any permissions it
282            * fails to retrieve.
283            * </p>
284            *
285            * @param companyId the primary key of the company
286            * @param actionIds the primary keys of the actions
287            * @param resourceId the primary key of the resource
288            * @return the permissions to perform the actions on the resource
289            * @throws SystemException if a system exception occurred
290            */
291            public java.util.List<com.liferay.portal.model.Permission> addPermissions(
292                    long companyId, java.util.List<java.lang.String> actionIds,
293                    long resourceId)
294                    throws com.liferay.portal.kernel.exception.SystemException {
295                    return _permissionLocalService.addPermissions(companyId, actionIds,
296                            resourceId);
297            }
298    
299            /**
300            * Adds permissions to perform either the portlet resource actions or model
301            * resource actions on the resource.
302            *
303            * <p>
304            * This method will retrieve the permissions of the company, actions, and
305            * resource with the primary keys. The method creates any permissions it
306            * fails to retrieve.
307            * </p>
308            *
309            * @param companyId the primary key of the company
310            * @param name the resource name
311            * @param resourceId the primary key of the resource
312            * @param portletActions whether to retrieve the action primary keys from
313            the portlet or the model resource
314            * @return the permissions to perform the actions on the resource
315            * @throws SystemException if a system exception occurred
316            */
317            public java.util.List<com.liferay.portal.model.Permission> addPermissions(
318                    long companyId, java.lang.String name, long resourceId,
319                    boolean portletActions)
320                    throws com.liferay.portal.kernel.exception.SystemException {
321                    return _permissionLocalService.addPermissions(companyId, name,
322                            resourceId, portletActions);
323            }
324    
325            /**
326            * Adds user permissions to perform the actions on the resource.
327            *
328            * @param userId the primary key of the user
329            * @param actionIds the primary keys of the actions
330            * @param resourceId the primary key of the resource
331            * @throws PortalException if a user with the primary key could not be
332            found
333            * @throws SystemException if a system exception occurred
334            */
335            public void addUserPermissions(long userId, java.lang.String[] actionIds,
336                    long resourceId)
337                    throws com.liferay.portal.kernel.exception.PortalException,
338                            com.liferay.portal.kernel.exception.SystemException {
339                    _permissionLocalService.addUserPermissions(userId, actionIds, resourceId);
340            }
341    
342            /**
343            * Checks to see if the actions are permitted on the named resource.
344            *
345            * @param name the resource name
346            * @param actionIds the primary keys of the actions
347            * @throws PortalException if the resource company or name could not be
348            found or were invalid
349            * @throws SystemException if a system exception occurred
350            */
351            public void checkPermissions(java.lang.String name,
352                    java.util.List<java.lang.String> actionIds)
353                    throws com.liferay.portal.kernel.exception.PortalException,
354                            com.liferay.portal.kernel.exception.SystemException {
355                    _permissionLocalService.checkPermissions(name, actionIds);
356            }
357    
358            /**
359            * Returns the IDs of all the actions belonging to the permissions.
360            *
361            * @param permissions the permissions
362            * @return the IDs of all the actions belonging to the permissions
363            */
364            public java.util.List<java.lang.String> getActions(
365                    java.util.List<com.liferay.portal.model.Permission> permissions) {
366                    return _permissionLocalService.getActions(permissions);
367            }
368    
369            /**
370            * Returns all the group's permissions on the resource.
371            *
372            * @param groupId the primary key of the group
373            * @param resourceId the primary key of the resource
374            * @return the group's permissions on the resource
375            * @throws SystemException if a system exception occurred
376            */
377            public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
378                    long groupId, long resourceId)
379                    throws com.liferay.portal.kernel.exception.SystemException {
380                    return _permissionLocalService.getGroupPermissions(groupId, resourceId);
381            }
382    
383            /**
384            * Returns all the group's permissions on the named resource with the scope
385            * and primKey.
386            *
387            * @param groupId the primary key of the group
388            * @param companyId the primary key of the company
389            * @param name the resource name
390            * @param scope the resource scope
391            * @param primKey the resource primKey
392            * @return the group's permissions on the named resource with the scope and
393            primKey
394            * @throws SystemException if a system exception occurred
395            */
396            public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
397                    long groupId, long companyId, java.lang.String name, int scope,
398                    java.lang.String primKey)
399                    throws com.liferay.portal.kernel.exception.SystemException {
400                    return _permissionLocalService.getGroupPermissions(groupId, companyId,
401                            name, scope, primKey);
402            }
403    
404            /**
405            * Returns the primary key of the latest permission created.
406            *
407            * @return the primary key of the latest permission created
408            * @throws SystemException if a system exception occurred
409            */
410            public long getLatestPermissionId()
411                    throws com.liferay.portal.kernel.exception.SystemException {
412                    return _permissionLocalService.getLatestPermissionId();
413            }
414    
415            /**
416            * Returns all the permissions of the organization's group with respect to
417            * the resource.
418            *
419            * @param organizationId the primary key of the organization
420            * @param groupId the primary key of the group
421            * @param resourceId the primary key of the resource
422            * @return the permissions of the organization's group with respect to the
423            resource
424            * @throws SystemException if a system exception occurred
425            */
426            public java.util.List<com.liferay.portal.model.Permission> getOrgGroupPermissions(
427                    long organizationId, long groupId, long resourceId)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    return _permissionLocalService.getOrgGroupPermissions(organizationId,
430                            groupId, resourceId);
431            }
432    
433            /**
434            * Returns all the permissions to perform the actions on the resource,
435            * creating new permissions for any permissions not found.
436            *
437            * @param companyId the primary key of the company
438            * @param actionIds the primary keys of the actions
439            * @param resourceId the primary key of the resource
440            * @return the permissions to perform the actions on the resource
441            * @throws SystemException if a system exception occurred
442            * @see #addPermission(long, String, long)
443            */
444            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
445                    long companyId, java.lang.String[] actionIds, long resourceId)
446                    throws com.liferay.portal.kernel.exception.SystemException {
447                    return _permissionLocalService.getPermissions(companyId, actionIds,
448                            resourceId);
449            }
450    
451            /**
452            * Returns all the role's permissions.
453            *
454            * @param roleId the primary key of the role
455            * @return the role's permissions
456            * @throws SystemException if a system exception occurred
457            */
458            public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
459                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
460                    return _permissionLocalService.getRolePermissions(roleId);
461            }
462    
463            public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
464                    long roleId, int[] scopes)
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    return _permissionLocalService.getRolePermissions(roleId, scopes);
467            }
468    
469            /**
470            * Returns all the role's permissions on the resource.
471            *
472            * @param roleId the primary key of the role
473            * @param resourceId the primary key of the resource
474            * @return the role's permissions on the resource
475            * @throws SystemException if a system exception occurred
476            */
477            public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
478                    long roleId, long resourceId)
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    return _permissionLocalService.getRolePermissions(roleId, resourceId);
481            }
482    
483            /**
484            * Returns all the user's permissions.
485            *
486            * @param userId the primary key of the user
487            * @return the user's permissions
488            * @throws SystemException if a system exception occurred
489            */
490            public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
491                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
492                    return _permissionLocalService.getUserPermissions(userId);
493            }
494    
495            /**
496            * Returns all the user's permissions on the resource.
497            *
498            * @param userId the primary key of the user
499            * @param resourceId the primary key of the resource
500            * @return the user's permissions on the resource
501            * @throws SystemException if a system exception occurred
502            */
503            public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
504                    long userId, long resourceId)
505                    throws com.liferay.portal.kernel.exception.SystemException {
506                    return _permissionLocalService.getUserPermissions(userId, resourceId);
507            }
508    
509            /**
510            * Returns all the user's permissions on the named resource with the scope
511            * and primKey.
512            *
513            * @param userId the primary key of the user
514            * @param companyId the primary key of the company
515            * @param name the resource name
516            * @param scope the resource scope
517            * @param primKey the resource primKey
518            * @return the user permissions of the resource name, scope, and primKey
519            * @throws SystemException if a system exception occurred
520            */
521            public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
522                    long userId, long companyId, java.lang.String name, int scope,
523                    java.lang.String primKey)
524                    throws com.liferay.portal.kernel.exception.SystemException {
525                    return _permissionLocalService.getUserPermissions(userId, companyId,
526                            name, scope, primKey);
527            }
528    
529            /**
530            * Returns <code>true</code> if the group has permission to perform the
531            * action on the resource.
532            *
533            * @param groupId the primary key of the group
534            * @param actionId the action's ID
535            * @param resourceId the primary key of the resource
536            * @return <code>true</code> if the group has permission to perform the
537            action on the resource; <code>false</code> otherwise
538            * @throws SystemException if a system exception occurred
539            */
540            public boolean hasGroupPermission(long groupId, java.lang.String actionId,
541                    long resourceId)
542                    throws com.liferay.portal.kernel.exception.SystemException {
543                    return _permissionLocalService.hasGroupPermission(groupId, actionId,
544                            resourceId);
545            }
546    
547            /**
548            * Returns <code>true</code> if the role has permission to perform the
549            * action on the named resource with the scope.
550            *
551            * @param roleId the primary key of the role
552            * @param companyId the primary key of the company
553            * @param name the resource name
554            * @param scope the resource scope
555            * @param actionId the action's ID
556            * @return <code>true</code> if the role has permission to perform the
557            action on the named resource with the scope; <code>false</code>
558            otherwise
559            * @throws SystemException if a system exception occurred
560            */
561            public boolean hasRolePermission(long roleId, long companyId,
562                    java.lang.String name, int scope, java.lang.String actionId)
563                    throws com.liferay.portal.kernel.exception.SystemException {
564                    return _permissionLocalService.hasRolePermission(roleId, companyId,
565                            name, scope, actionId);
566            }
567    
568            /**
569            * Returns <code>true</code> if the role has permission to perform the
570            * action on the named resource with the scope and primKey.
571            *
572            * @param roleId the primary key of the role
573            * @param companyId the primary key of the company
574            * @param name the resource name
575            * @param scope the resource scope
576            * @param primKey the resource primKey
577            * @param actionId the action's ID
578            * @return <code>true</code> if the role has permission to perform the
579            action on the named resource with the scope and primKey;
580            <code>false</code> otherwise
581            * @throws SystemException if a system exception occurred
582            */
583            public boolean hasRolePermission(long roleId, long companyId,
584                    java.lang.String name, int scope, java.lang.String primKey,
585                    java.lang.String actionId)
586                    throws com.liferay.portal.kernel.exception.SystemException {
587                    return _permissionLocalService.hasRolePermission(roleId, companyId,
588                            name, scope, primKey, actionId);
589            }
590    
591            /**
592            * Returns <code>true</code> if the user has permission to perform the
593            * action on the resource.
594            *
595            * @param userId the primary key of the user
596            * @param actionId the action's ID
597            * @param resourceId the primary key of the resource
598            * @return <code>true</code> if the user has permission to perform the
599            action on the resource; <code>false</code> otherwise
600            * @throws SystemException if a system exception occurred
601            */
602            public boolean hasUserPermission(long userId, java.lang.String actionId,
603                    long resourceId)
604                    throws com.liferay.portal.kernel.exception.SystemException {
605                    return _permissionLocalService.hasUserPermission(userId, actionId,
606                            resourceId);
607            }
608    
609            /**
610            * Returns <code>true</code> if the user has permission to perform the
611            * action on the resources.
612            *
613            * <p>
614            * This method does not support resources managed by the resource block
615            * system.
616            * </p>
617            *
618            * @param userId the primary key of the user
619            * @param groupId the primary key of the group containing the resource
620            * @param resources representations of the resource at each scope level
621            returned by {@link
622            com.liferay.portal.security.permission.AdvancedPermissionChecker#getResources(
623            long, long, String, String, String)}
624            * @param actionId the action's ID
625            * @param permissionCheckerBag the permission checker bag
626            * @return <code>true</code> if the user has permission to perform the
627            action on the resources; <code>false</code> otherwise
628            * @throws PortalException if a resource action based on any one of the
629            resources and the action ID could not be found
630            * @throws SystemException if a system exception occurred
631            */
632            public boolean hasUserPermissions(long userId, long groupId,
633                    java.util.List<com.liferay.portal.model.Resource> resources,
634                    java.lang.String actionId,
635                    com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
636                    throws com.liferay.portal.kernel.exception.PortalException,
637                            com.liferay.portal.kernel.exception.SystemException {
638                    return _permissionLocalService.hasUserPermissions(userId, groupId,
639                            resources, actionId, permissionCheckerBag);
640            }
641    
642            /**
643            * Sets the container wide permissions of either the role or the default
644            * user of each company to perform the actions on the named resource.
645            *
646            * @param name the resource name
647            * @param roleName the role name. Supported role names include {@link
648            com.liferay.portal.model.RoleConstants#ORGANIZATION_USER},
649            {@link com.liferay.portal.model.RoleConstants#OWNER}, and {@link
650            com.liferay.portal.model.RoleConstants#SITE_MEMBER}.
651            * @param actionId the action's ID
652            * @throws PortalException if a matching role could not be found or if a
653            default user for the company could not be found
654            * @throws SystemException if a system exception occurred
655            */
656            public void setContainerResourcePermissions(java.lang.String name,
657                    java.lang.String roleName, java.lang.String actionId)
658                    throws com.liferay.portal.kernel.exception.PortalException,
659                            com.liferay.portal.kernel.exception.SystemException {
660                    _permissionLocalService.setContainerResourcePermissions(name, roleName,
661                            actionId);
662            }
663    
664            /**
665            * Sets the group's permissions to perform the actions on the resource,
666            * replacing the group's existing permissions on the resource.
667            *
668            * @param groupId the primary key of the group
669            * @param actionIds the primary keys of the actions
670            * @param resourceId the primary key of the resource
671            * @throws PortalException if a group with the primary key could not be
672            found
673            * @throws SystemException if a system exception occurred
674            */
675            public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
676                    long resourceId)
677                    throws com.liferay.portal.kernel.exception.PortalException,
678                            com.liferay.portal.kernel.exception.SystemException {
679                    _permissionLocalService.setGroupPermissions(groupId, actionIds,
680                            resourceId);
681            }
682    
683            /**
684            * Sets the entity's group permissions to perform the actions on the
685            * resource, replacing the entity's existing group permissions on the
686            * resource. Only {@link com.liferay.portal.model.Organization} and {@link
687            * com.liferay.portal.model.UserGroup} class entities are supported.
688            *
689            * @param className the class name of an organization or user group
690            * @param classPK the primary key of the class
691            * @param groupId the primary key of the group
692            * @param actionIds the primary keys of the actions
693            * @param resourceId the primary key of the resource
694            * @throws PortalException if an entity with the class name and primary key
695            could not be found or if the entity's associated group could not
696            be found
697            * @throws SystemException if a system exception occurred
698            */
699            public void setGroupPermissions(java.lang.String className,
700                    java.lang.String classPK, long groupId, java.lang.String[] actionIds,
701                    long resourceId)
702                    throws com.liferay.portal.kernel.exception.PortalException,
703                            com.liferay.portal.kernel.exception.SystemException {
704                    _permissionLocalService.setGroupPermissions(className, classPK,
705                            groupId, actionIds, resourceId);
706            }
707    
708            /**
709            * Sets the organization's group permissions to perform the actions on the
710            * resource, replacing the organization's existing group permissions on the
711            * resource.
712            *
713            * @param organizationId the primary key of the organization
714            * @param groupId the primary key of the group in which to scope the
715            permissions
716            * @param actionIds the primary keys of the actions
717            * @param resourceId the primary key of the resource
718            * @throws PortalException if an organization with the primary key could
719            not be found
720            * @throws SystemException if a system exception occurred
721            */
722            public void setOrgGroupPermissions(long organizationId, long groupId,
723                    java.lang.String[] actionIds, long resourceId)
724                    throws com.liferay.portal.kernel.exception.PortalException,
725                            com.liferay.portal.kernel.exception.SystemException {
726                    _permissionLocalService.setOrgGroupPermissions(organizationId, groupId,
727                            actionIds, resourceId);
728            }
729    
730            /**
731            * Sets the role's permissions to perform the action on the named resource,
732            * replacing the role's existing permissions on the resource.
733            *
734            * @param roleId the primary key of the role
735            * @param companyId the primary key of the company
736            * @param name the resource name
737            * @param scope the resource scope
738            * @param primKey the resource primKey
739            * @param actionId the action's ID
740            * @throws PortalException if the scope was {@link
741            com.liferay.portal.model.ResourceConstants#SCOPE_INDIVIDUAL}
742            * @throws SystemException if a system exception occurred
743            */
744            public void setRolePermission(long roleId, long companyId,
745                    java.lang.String name, int scope, java.lang.String primKey,
746                    java.lang.String actionId)
747                    throws com.liferay.portal.kernel.exception.PortalException,
748                            com.liferay.portal.kernel.exception.SystemException {
749                    _permissionLocalService.setRolePermission(roleId, companyId, name,
750                            scope, primKey, actionId);
751            }
752    
753            /**
754            * Sets the role's permissions to perform the actions on the named
755            * resource, replacing the role's existing permission for each of these
756            * actions on the resource.
757            *
758            * @param roleId the primary key of the role
759            * @param companyId the primary key of the company
760            * @param name the resource name
761            * @param scope the resource scope
762            * @param primKey the resource primKey
763            * @param actionIds the primary keys of the actions
764            * @throws PortalException if the scope was {@link
765            com.liferay.portal.model.ResourceConstants#SCOPE_INDIVIDUAL}
766            * @throws SystemException if a system exception occurred
767            */
768            public void setRolePermissions(long roleId, long companyId,
769                    java.lang.String name, int scope, java.lang.String primKey,
770                    java.lang.String[] actionIds)
771                    throws com.liferay.portal.kernel.exception.PortalException,
772                            com.liferay.portal.kernel.exception.SystemException {
773                    _permissionLocalService.setRolePermissions(roleId, companyId, name,
774                            scope, primKey, actionIds);
775            }
776    
777            /**
778            * Sets the role's permissions to perform the actions on the resource,
779            * replacing the role's existing permissions on the resource.
780            *
781            * @param roleId the primary key of the role
782            * @param actionIds the primary keys of the actions
783            * @param resourceId the primary key of the resource
784            * @throws PortalException if a role with the primary key could not be
785            found
786            * @throws SystemException if a system exception occurred
787            */
788            public void setRolePermissions(long roleId, java.lang.String[] actionIds,
789                    long resourceId)
790                    throws com.liferay.portal.kernel.exception.PortalException,
791                            com.liferay.portal.kernel.exception.SystemException {
792                    _permissionLocalService.setRolePermissions(roleId, actionIds, resourceId);
793            }
794    
795            /**
796            * Sets the permissions of each role to perform respective actions on the
797            * resource, replacing the existing permissions of each role on the
798            * resource.
799            *
800            * @param companyId the primary key of the company
801            * @param roleIdsToActionIds the map of roles to their new actions on the
802            resource
803            * @param resourceId the primary key of the resource
804            * @throws SystemException if a system exception occurred
805            */
806            public void setRolesPermissions(long companyId,
807                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds,
808                    long resourceId)
809                    throws com.liferay.portal.kernel.exception.SystemException {
810                    _permissionLocalService.setRolesPermissions(companyId,
811                            roleIdsToActionIds, resourceId);
812            }
813    
814            /**
815            * Sets the permissions of each role to perform respective actions on the
816            * named resource, replacing the existing permissions of each role on the
817            * resource.
818            *
819            * @param companyId the primary key of the company
820            * @param roleIdsToActionIds the map of roles to their new actions on the
821            resource
822            * @param name the resource name
823            * @param scope the resource scope
824            * @param primKey the resource primKey
825            * @throws SystemException if a system exception occurred
826            */
827            public void setRolesPermissions(long companyId,
828                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds,
829                    java.lang.String name, int scope, java.lang.String primKey)
830                    throws com.liferay.portal.kernel.exception.SystemException {
831                    _permissionLocalService.setRolesPermissions(companyId,
832                            roleIdsToActionIds, name, scope, primKey);
833            }
834    
835            /**
836            * Sets the user's permissions to perform the actions on the resource,
837            * replacing the user's existing permissions on the resource.
838            *
839            * @param userId the primary key of the user
840            * @param actionIds the primary keys of the actions
841            * @param resourceId the primary key of the resource
842            * @throws PortalException if a user with the primary key could not be
843            found
844            * @throws SystemException if a system exception occurred
845            */
846            public void setUserPermissions(long userId, java.lang.String[] actionIds,
847                    long resourceId)
848                    throws com.liferay.portal.kernel.exception.PortalException,
849                            com.liferay.portal.kernel.exception.SystemException {
850                    _permissionLocalService.setUserPermissions(userId, actionIds, resourceId);
851            }
852    
853            /**
854            * Removes the permission from the role.
855            *
856            * @param roleId the primary key of the role
857            * @param permissionId the primary key of the permission
858            * @throws SystemException if a system exception occurred
859            */
860            public void unsetRolePermission(long roleId, long permissionId)
861                    throws com.liferay.portal.kernel.exception.SystemException {
862                    _permissionLocalService.unsetRolePermission(roleId, permissionId);
863            }
864    
865            /**
866            * Removes the role's permissions to perform the action on the named
867            * resource with the scope and primKey.
868            *
869            * @param roleId the primary key of the role
870            * @param companyId the primary key of the company
871            * @param name the resource name
872            * @param scope the resource scope
873            * @param primKey the resource primKey
874            * @param actionId the action's ID
875            * @throws SystemException if a system exception occurred
876            */
877            public void unsetRolePermission(long roleId, long companyId,
878                    java.lang.String name, int scope, java.lang.String primKey,
879                    java.lang.String actionId)
880                    throws com.liferay.portal.kernel.exception.SystemException {
881                    _permissionLocalService.unsetRolePermission(roleId, companyId, name,
882                            scope, primKey, actionId);
883            }
884    
885            /**
886            * Removes the role's permissions to perform the action on the named
887            * resource.
888            *
889            * @param roleId the primary key of the role
890            * @param companyId the primary key of the company
891            * @param name the resource name
892            * @param scope the resource scope
893            * @param actionId the action's ID
894            * @throws SystemException if a system exception occurred
895            */
896            public void unsetRolePermissions(long roleId, long companyId,
897                    java.lang.String name, int scope, java.lang.String actionId)
898                    throws com.liferay.portal.kernel.exception.SystemException {
899                    _permissionLocalService.unsetRolePermissions(roleId, companyId, name,
900                            scope, actionId);
901            }
902    
903            /**
904            * Removes the user's permissions to perform the actions on the resource.
905            *
906            * @param userId the primary key of the user
907            * @param actionIds the primary keys of the actions
908            * @param resourceId the primary key of the resource
909            * @throws SystemException if a system exception occurred
910            */
911            public void unsetUserPermissions(long userId, java.lang.String[] actionIds,
912                    long resourceId)
913                    throws com.liferay.portal.kernel.exception.SystemException {
914                    _permissionLocalService.unsetUserPermissions(userId, actionIds,
915                            resourceId);
916            }
917    
918            /**
919             * @deprecated Renamed to {@link #getWrappedService}
920             */
921            public PermissionLocalService getWrappedPermissionLocalService() {
922                    return _permissionLocalService;
923            }
924    
925            /**
926             * @deprecated Renamed to {@link #setWrappedService}
927             */
928            public void setWrappedPermissionLocalService(
929                    PermissionLocalService permissionLocalService) {
930                    _permissionLocalService = permissionLocalService;
931            }
932    
933            public PermissionLocalService getWrappedService() {
934                    return _permissionLocalService;
935            }
936    
937            public void setWrappedService(PermissionLocalService permissionLocalService) {
938                    _permissionLocalService = permissionLocalService;
939            }
940    
941            private PermissionLocalService _permissionLocalService;
942    }