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 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 found
332            * @throws SystemException if a system exception occurred
333            */
334            public void addUserPermissions(long userId, java.lang.String[] actionIds,
335                    long resourceId)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException {
338                    _permissionLocalService.addUserPermissions(userId, actionIds, resourceId);
339            }
340    
341            /**
342            * Checks to see if the actions are permitted on the named resource.
343            *
344            * @param name the resource name
345            * @param actionIds the primary keys of the actions
346            * @throws PortalException if the resource company or name could not be
347            found or were invalid
348            * @throws SystemException if a system exception occurred
349            */
350            public void checkPermissions(java.lang.String name,
351                    java.util.List<java.lang.String> actionIds)
352                    throws com.liferay.portal.kernel.exception.PortalException,
353                            com.liferay.portal.kernel.exception.SystemException {
354                    _permissionLocalService.checkPermissions(name, actionIds);
355            }
356    
357            /**
358            * Returns the IDs of all the actions belonging to the permissions.
359            *
360            * @param permissions the permissions
361            * @return the IDs of all the actions belonging to the permissions
362            */
363            public java.util.List<java.lang.String> getActions(
364                    java.util.List<com.liferay.portal.model.Permission> permissions) {
365                    return _permissionLocalService.getActions(permissions);
366            }
367    
368            /**
369            * Returns all the group's permissions on the resource.
370            *
371            * @param groupId the primary key of the group
372            * @param resourceId the primary key of the resource
373            * @return the group's permissions on the resource
374            * @throws SystemException if a system exception occurred
375            */
376            public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
377                    long groupId, long resourceId)
378                    throws com.liferay.portal.kernel.exception.SystemException {
379                    return _permissionLocalService.getGroupPermissions(groupId, resourceId);
380            }
381    
382            /**
383            * Returns all the group's permissions on the named resource with the scope
384            * and primKey.
385            *
386            * @param groupId the primary key of the group
387            * @param companyId the primary key of the company
388            * @param name the resource name
389            * @param scope the resource scope
390            * @param primKey the resource primKey
391            * @return the group's permissions on the named resource with the scope and
392            primKey
393            * @throws SystemException if a system exception occurred
394            */
395            public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
396                    long groupId, long companyId, java.lang.String name, int scope,
397                    java.lang.String primKey)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return _permissionLocalService.getGroupPermissions(groupId, companyId,
400                            name, scope, primKey);
401            }
402    
403            /**
404            * Returns the primary key of the latest permission created.
405            *
406            * @return the primary key of the latest permission created
407            * @throws SystemException if a system exception occurred
408            */
409            public long getLatestPermissionId()
410                    throws com.liferay.portal.kernel.exception.SystemException {
411                    return _permissionLocalService.getLatestPermissionId();
412            }
413    
414            /**
415            * Returns all the permissions of the organization's group with respect to
416            * the resource.
417            *
418            * @param organizationId the primary key of the organization
419            * @param groupId the primary key of the group
420            * @param resourceId the primary key of the resource
421            * @return the permissions of the organization's group with respect to the
422            resource
423            * @throws SystemException if a system exception occurred
424            */
425            public java.util.List<com.liferay.portal.model.Permission> getOrgGroupPermissions(
426                    long organizationId, long groupId, long resourceId)
427                    throws com.liferay.portal.kernel.exception.SystemException {
428                    return _permissionLocalService.getOrgGroupPermissions(organizationId,
429                            groupId, resourceId);
430            }
431    
432            /**
433            * Returns all the permissions to perform the actions on the resource,
434            * creating new permissions for any permissions not found.
435            *
436            * @param companyId the primary key of the company
437            * @param actionIds the primary keys of the actions
438            * @param resourceId the primary key of the resource
439            * @return the permissions to perform the actions on the resource
440            * @throws SystemException if a system exception occurred
441            * @see #addPermission(long, String, long)
442            */
443            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
444                    long companyId, java.lang.String[] actionIds, long resourceId)
445                    throws com.liferay.portal.kernel.exception.SystemException {
446                    return _permissionLocalService.getPermissions(companyId, actionIds,
447                            resourceId);
448            }
449    
450            /**
451            * Returns all the role's permissions.
452            *
453            * @param roleId the primary key of the role
454            * @return the role's permissions
455            * @throws SystemException if a system exception occurred
456            */
457            public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
458                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
459                    return _permissionLocalService.getRolePermissions(roleId);
460            }
461    
462            public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
463                    long roleId, int[] scopes)
464                    throws com.liferay.portal.kernel.exception.SystemException {
465                    return _permissionLocalService.getRolePermissions(roleId, scopes);
466            }
467    
468            /**
469            * Returns all the role's permissions on the resource.
470            *
471            * @param roleId the primary key of the role
472            * @param resourceId the primary key of the resource
473            * @return the role's permissions on the resource
474            * @throws SystemException if a system exception occurred
475            */
476            public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
477                    long roleId, long resourceId)
478                    throws com.liferay.portal.kernel.exception.SystemException {
479                    return _permissionLocalService.getRolePermissions(roleId, resourceId);
480            }
481    
482            /**
483            * Returns all the user's permissions.
484            *
485            * @param userId the primary key of the user
486            * @return the user's permissions
487            * @throws SystemException if a system exception occurred
488            */
489            public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
490                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
491                    return _permissionLocalService.getUserPermissions(userId);
492            }
493    
494            /**
495            * Returns all the user's permissions on the resource.
496            *
497            * @param userId the primary key of the user
498            * @param resourceId the primary key of the resource
499            * @return the user's permissions on the resource
500            * @throws SystemException if a system exception occurred
501            */
502            public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
503                    long userId, long resourceId)
504                    throws com.liferay.portal.kernel.exception.SystemException {
505                    return _permissionLocalService.getUserPermissions(userId, resourceId);
506            }
507    
508            /**
509            * Returns all the user's permissions on the named resource with the scope
510            * and primKey.
511            *
512            * @param userId the primary key of the user
513            * @param companyId the primary key of the company
514            * @param name the resource name
515            * @param scope the resource scope
516            * @param primKey the resource primKey
517            * @return the user permissions of the resource name, scope, and primKey
518            * @throws SystemException if a system exception occurred
519            */
520            public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
521                    long userId, long companyId, java.lang.String name, int scope,
522                    java.lang.String primKey)
523                    throws com.liferay.portal.kernel.exception.SystemException {
524                    return _permissionLocalService.getUserPermissions(userId, companyId,
525                            name, scope, primKey);
526            }
527    
528            /**
529            * Returns <code>true</code> if the group has permission to perform the
530            * action on the resource.
531            *
532            * @param groupId the primary key of the group
533            * @param actionId the action's ID
534            * @param resourceId the primary key of the resource
535            * @return <code>true</code> if the group has permission to perform the
536            action on the resource; <code>false</code> otherwise
537            * @throws SystemException if a system exception occurred
538            */
539            public boolean hasGroupPermission(long groupId, java.lang.String actionId,
540                    long resourceId)
541                    throws com.liferay.portal.kernel.exception.SystemException {
542                    return _permissionLocalService.hasGroupPermission(groupId, actionId,
543                            resourceId);
544            }
545    
546            /**
547            * Returns <code>true</code> if the role has permission to perform the
548            * action on the named resource with the scope.
549            *
550            * @param roleId the primary key of the role
551            * @param companyId the primary key of the company
552            * @param name the resource name
553            * @param scope the resource scope
554            * @param actionId the action's ID
555            * @return <code>true</code> if the role has permission to perform the
556            action on the named resource with the scope; <code>false</code>
557            otherwise
558            * @throws SystemException if a system exception occurred
559            */
560            public boolean hasRolePermission(long roleId, long companyId,
561                    java.lang.String name, int scope, java.lang.String actionId)
562                    throws com.liferay.portal.kernel.exception.SystemException {
563                    return _permissionLocalService.hasRolePermission(roleId, companyId,
564                            name, scope, actionId);
565            }
566    
567            /**
568            * Returns <code>true</code> if the role has permission to perform the
569            * action on the named resource with the scope and primKey.
570            *
571            * @param roleId the primary key of the role
572            * @param companyId the primary key of the company
573            * @param name the resource name
574            * @param scope the resource scope
575            * @param primKey the resource primKey
576            * @param actionId the action's ID
577            * @return <code>true</code> if the role has permission to perform the
578            action on the named resource with the scope and primKey;
579            <code>false</code> otherwise
580            * @throws SystemException if a system exception occurred
581            */
582            public boolean hasRolePermission(long roleId, long companyId,
583                    java.lang.String name, int scope, java.lang.String primKey,
584                    java.lang.String actionId)
585                    throws com.liferay.portal.kernel.exception.SystemException {
586                    return _permissionLocalService.hasRolePermission(roleId, companyId,
587                            name, scope, primKey, actionId);
588            }
589    
590            /**
591            * Returns <code>true</code> if the user has permission to perform the
592            * action on the resource.
593            *
594            * @param userId the primary key of the user
595            * @param actionId the action's ID
596            * @param resourceId the primary key of the resource
597            * @return <code>true</code> if the user has permission to perform the
598            action on the resource; <code>false</code> otherwise
599            * @throws SystemException if a system exception occurred
600            */
601            public boolean hasUserPermission(long userId, java.lang.String actionId,
602                    long resourceId)
603                    throws com.liferay.portal.kernel.exception.SystemException {
604                    return _permissionLocalService.hasUserPermission(userId, actionId,
605                            resourceId);
606            }
607    
608            /**
609            * Returns <code>true</code> if the user has permission to perform the
610            * action on the resources.
611            *
612            * <p>
613            * This method does not support resources managed by the resource block
614            * system.
615            * </p>
616            *
617            * @param userId the primary key of the user
618            * @param groupId the primary key of the group containing the resource
619            * @param resources representations of the resource at each scope level
620            returned by {@link
621            com.liferay.portal.security.permission.AdvancedPermissionChecker#getResources(
622            long, long, String, String, String)}
623            * @param actionId the action's ID
624            * @param permissionCheckerBag the permission checker bag
625            * @return <code>true</code> if the user has permission to perform the
626            action on the resources; <code>false</code> otherwise
627            * @throws PortalException if a resource action based on any one of the
628            resources and the action ID could not be found
629            * @throws SystemException if a system exception occurred
630            */
631            public boolean hasUserPermissions(long userId, long groupId,
632                    java.util.List<com.liferay.portal.model.Resource> resources,
633                    java.lang.String actionId,
634                    com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
635                    throws com.liferay.portal.kernel.exception.PortalException,
636                            com.liferay.portal.kernel.exception.SystemException {
637                    return _permissionLocalService.hasUserPermissions(userId, groupId,
638                            resources, actionId, permissionCheckerBag);
639            }
640    
641            /**
642            * Sets the container wide permissions of either the role or the default
643            * user of each company to perform the actions on the named resource.
644            *
645            * @param name the resource name
646            * @param roleName the role name. Supported role names include {@link
647            com.liferay.portal.model.RoleConstants#ORGANIZATION_USER}, {@link
648            com.liferay.portal.model.RoleConstants#OWNER}, and {@link
649            com.liferay.portal.model.RoleConstants#SITE_MEMBER}.
650            * @param actionId the action's ID
651            * @throws PortalException if a matching role could not be found or if a
652            default user for the company could not be found
653            * @throws SystemException if a system exception occurred
654            */
655            public void setContainerResourcePermissions(java.lang.String name,
656                    java.lang.String roleName, java.lang.String actionId)
657                    throws com.liferay.portal.kernel.exception.PortalException,
658                            com.liferay.portal.kernel.exception.SystemException {
659                    _permissionLocalService.setContainerResourcePermissions(name, roleName,
660                            actionId);
661            }
662    
663            /**
664            * Sets the group's permissions to perform the actions on the resource,
665            * replacing the group's existing permissions on the resource.
666            *
667            * @param groupId the primary key of the group
668            * @param actionIds the primary keys of the actions
669            * @param resourceId the primary key of the resource
670            * @throws PortalException if a group with the primary key could not be
671            found
672            * @throws SystemException if a system exception occurred
673            */
674            public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
675                    long resourceId)
676                    throws com.liferay.portal.kernel.exception.PortalException,
677                            com.liferay.portal.kernel.exception.SystemException {
678                    _permissionLocalService.setGroupPermissions(groupId, actionIds,
679                            resourceId);
680            }
681    
682            /**
683            * Sets the entity's group permissions to perform the actions on the
684            * resource, replacing the entity's existing group permissions on the
685            * resource. Only {@link com.liferay.portal.model.Organization} and {@link
686            * com.liferay.portal.model.UserGroup} class entities are supported.
687            *
688            * @param className the class name of an organization or user group
689            * @param classPK the primary key of the class
690            * @param groupId the primary key of the group
691            * @param actionIds the primary keys of the actions
692            * @param resourceId the primary key of the resource
693            * @throws PortalException if an entity with the class name and primary key
694            could not be found or if the entity's associated group could not
695            be found
696            * @throws SystemException if a system exception occurred
697            */
698            public void setGroupPermissions(java.lang.String className,
699                    java.lang.String classPK, long groupId, java.lang.String[] actionIds,
700                    long resourceId)
701                    throws com.liferay.portal.kernel.exception.PortalException,
702                            com.liferay.portal.kernel.exception.SystemException {
703                    _permissionLocalService.setGroupPermissions(className, classPK,
704                            groupId, actionIds, resourceId);
705            }
706    
707            /**
708            * Sets the organization's group permissions to perform the actions on the
709            * resource, replacing the organization's existing group permissions on the
710            * resource.
711            *
712            * @param organizationId the primary key of the organization
713            * @param groupId the primary key of the group in which to scope the
714            permissions
715            * @param actionIds the primary keys of the actions
716            * @param resourceId the primary key of the resource
717            * @throws PortalException if an organization with the primary key could not
718            be found
719            * @throws SystemException if a system exception occurred
720            */
721            public void setOrgGroupPermissions(long organizationId, long groupId,
722                    java.lang.String[] actionIds, long resourceId)
723                    throws com.liferay.portal.kernel.exception.PortalException,
724                            com.liferay.portal.kernel.exception.SystemException {
725                    _permissionLocalService.setOrgGroupPermissions(organizationId, groupId,
726                            actionIds, resourceId);
727            }
728    
729            /**
730            * Sets the role's permissions to perform the action on the named resource,
731            * replacing the role's existing permissions on the resource.
732            *
733            * @param roleId the primary key of the role
734            * @param companyId the primary key of the company
735            * @param name the resource name
736            * @param scope the resource scope
737            * @param primKey the resource primKey
738            * @param actionId the action's ID
739            * @throws PortalException if the scope was {@link
740            com.liferay.portal.model.ResourceConstants#SCOPE_INDIVIDUAL}
741            * @throws SystemException if a system exception occurred
742            */
743            public void setRolePermission(long roleId, long companyId,
744                    java.lang.String name, int scope, java.lang.String primKey,
745                    java.lang.String actionId)
746                    throws com.liferay.portal.kernel.exception.PortalException,
747                            com.liferay.portal.kernel.exception.SystemException {
748                    _permissionLocalService.setRolePermission(roleId, companyId, name,
749                            scope, primKey, actionId);
750            }
751    
752            /**
753            * Sets the role's permissions to perform the actions on the named resource,
754            * replacing the role's existing permission for each of these actions on the
755            * resource.
756            *
757            * @param roleId the primary key of the role
758            * @param companyId the primary key of the company
759            * @param name the resource name
760            * @param scope the resource scope
761            * @param primKey the resource primKey
762            * @param actionIds the primary keys of the actions
763            * @throws PortalException if the scope was {@link
764            com.liferay.portal.model.ResourceConstants#SCOPE_INDIVIDUAL}
765            * @throws SystemException if a system exception occurred
766            */
767            public void setRolePermissions(long roleId, long companyId,
768                    java.lang.String name, int scope, java.lang.String primKey,
769                    java.lang.String[] actionIds)
770                    throws com.liferay.portal.kernel.exception.PortalException,
771                            com.liferay.portal.kernel.exception.SystemException {
772                    _permissionLocalService.setRolePermissions(roleId, companyId, name,
773                            scope, primKey, actionIds);
774            }
775    
776            /**
777            * Sets the role's permissions to perform the actions on the resource,
778            * replacing the role's existing permissions on the resource.
779            *
780            * @param roleId the primary key of the role
781            * @param actionIds the primary keys of the actions
782            * @param resourceId the primary key of the resource
783            * @throws PortalException if a role with the primary key could not be found
784            * @throws SystemException if a system exception occurred
785            */
786            public void setRolePermissions(long roleId, java.lang.String[] actionIds,
787                    long resourceId)
788                    throws com.liferay.portal.kernel.exception.PortalException,
789                            com.liferay.portal.kernel.exception.SystemException {
790                    _permissionLocalService.setRolePermissions(roleId, actionIds, resourceId);
791            }
792    
793            /**
794            * Sets the permissions of each role to perform respective actions on the
795            * resource, replacing the existing permissions of each role on the
796            * resource.
797            *
798            * @param companyId the primary key of the company
799            * @param roleIdsToActionIds the map of roles to their new actions on the
800            resource
801            * @param resourceId the primary key of the resource
802            * @throws SystemException if a system exception occurred
803            */
804            public void setRolesPermissions(long companyId,
805                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds,
806                    long resourceId)
807                    throws com.liferay.portal.kernel.exception.SystemException {
808                    _permissionLocalService.setRolesPermissions(companyId,
809                            roleIdsToActionIds, resourceId);
810            }
811    
812            /**
813            * Sets the permissions of each role to perform respective actions on the
814            * named resource, replacing the existing permissions of each role on the
815            * resource.
816            *
817            * @param companyId the primary key of the company
818            * @param roleIdsToActionIds the map of roles to their new actions on the
819            resource
820            * @param name the resource name
821            * @param scope the resource scope
822            * @param primKey the resource primKey
823            * @throws SystemException if a system exception occurred
824            */
825            public void setRolesPermissions(long companyId,
826                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds,
827                    java.lang.String name, int scope, java.lang.String primKey)
828                    throws com.liferay.portal.kernel.exception.SystemException {
829                    _permissionLocalService.setRolesPermissions(companyId,
830                            roleIdsToActionIds, name, scope, primKey);
831            }
832    
833            /**
834            * Sets the user's permissions to perform the actions on the resource,
835            * replacing the user's existing permissions on the resource.
836            *
837            * @param userId the primary key of the user
838            * @param actionIds the primary keys of the actions
839            * @param resourceId the primary key of the resource
840            * @throws PortalException if a user with the primary key could not be found
841            * @throws SystemException if a system exception occurred
842            */
843            public void setUserPermissions(long userId, java.lang.String[] actionIds,
844                    long resourceId)
845                    throws com.liferay.portal.kernel.exception.PortalException,
846                            com.liferay.portal.kernel.exception.SystemException {
847                    _permissionLocalService.setUserPermissions(userId, actionIds, resourceId);
848            }
849    
850            /**
851            * Removes the permission from the role.
852            *
853            * @param roleId the primary key of the role
854            * @param permissionId the primary key of the permission
855            * @throws SystemException if a system exception occurred
856            */
857            public void unsetRolePermission(long roleId, long permissionId)
858                    throws com.liferay.portal.kernel.exception.SystemException {
859                    _permissionLocalService.unsetRolePermission(roleId, permissionId);
860            }
861    
862            /**
863            * Removes the role's permissions to perform the action on the named
864            * resource with the scope and primKey.
865            *
866            * @param roleId the primary key of the role
867            * @param companyId the primary key of the company
868            * @param name the resource name
869            * @param scope the resource scope
870            * @param primKey the resource primKey
871            * @param actionId the action's ID
872            * @throws SystemException if a system exception occurred
873            */
874            public void unsetRolePermission(long roleId, long companyId,
875                    java.lang.String name, int scope, java.lang.String primKey,
876                    java.lang.String actionId)
877                    throws com.liferay.portal.kernel.exception.SystemException {
878                    _permissionLocalService.unsetRolePermission(roleId, companyId, name,
879                            scope, primKey, actionId);
880            }
881    
882            /**
883            * Removes the role's permissions to perform the action on the named
884            * resource.
885            *
886            * @param roleId the primary key of the role
887            * @param companyId the primary key of the company
888            * @param name the resource name
889            * @param scope the resource scope
890            * @param actionId the action's ID
891            * @throws SystemException if a system exception occurred
892            */
893            public void unsetRolePermissions(long roleId, long companyId,
894                    java.lang.String name, int scope, java.lang.String actionId)
895                    throws com.liferay.portal.kernel.exception.SystemException {
896                    _permissionLocalService.unsetRolePermissions(roleId, companyId, name,
897                            scope, actionId);
898            }
899    
900            /**
901            * Removes the user's permissions to perform the actions on the resource.
902            *
903            * @param userId the primary key of the user
904            * @param actionIds the primary keys of the actions
905            * @param resourceId the primary key of the resource
906            * @throws SystemException if a system exception occurred
907            */
908            public void unsetUserPermissions(long userId, java.lang.String[] actionIds,
909                    long resourceId)
910                    throws com.liferay.portal.kernel.exception.SystemException {
911                    _permissionLocalService.unsetUserPermissions(userId, actionIds,
912                            resourceId);
913            }
914    
915            /**
916             * @deprecated Renamed to {@link #getWrappedService}
917             */
918            public PermissionLocalService getWrappedPermissionLocalService() {
919                    return _permissionLocalService;
920            }
921    
922            /**
923             * @deprecated Renamed to {@link #setWrappedService}
924             */
925            public void setWrappedPermissionLocalService(
926                    PermissionLocalService permissionLocalService) {
927                    _permissionLocalService = permissionLocalService;
928            }
929    
930            public PermissionLocalService getWrappedService() {
931                    return _permissionLocalService;
932            }
933    
934            public void setWrappedService(PermissionLocalService permissionLocalService) {
935                    _permissionLocalService = permissionLocalService;
936            }
937    
938            private PermissionLocalService _permissionLocalService;
939    }