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