001    /**
002     * Copyright (c) 2000-present 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.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    /**
020     * Provides a wrapper for {@link ResourcePermissionService}.
021     *
022     * @author Brian Wing Shun Chan
023     * @see ResourcePermissionService
024     * @generated
025     */
026    @ProviderType
027    public class ResourcePermissionServiceWrapper
028            implements ResourcePermissionService,
029                    ServiceWrapper<ResourcePermissionService> {
030            public ResourcePermissionServiceWrapper(
031                    ResourcePermissionService resourcePermissionService) {
032                    _resourcePermissionService = resourcePermissionService;
033            }
034    
035            /**
036            * Returns the OSGi service identifier.
037            *
038            * @return the OSGi service identifier
039            */
040            @Override
041            public java.lang.String getOSGiServiceIdentifier() {
042                    return _resourcePermissionService.getOSGiServiceIdentifier();
043            }
044    
045            /**
046            * Grants the role permission at the scope to perform the action on
047            * resources of the type. Existing actions are retained.
048            *
049            * <p>
050            * This method cannot be used to grant individual scope permissions, but is
051            * only intended for adding permissions at the company, group, and
052            * group-template scopes. For example, this method could be used to grant a
053            * company scope permission to edit message board posts.
054            * </p>
055            *
056            * <p>
057            * If a company scope permission is granted to resources that the role
058            * already had group scope permissions to, the group scope permissions are
059            * deleted. Likewise, if a group scope permission is granted to resources
060            * that the role already had company scope permissions to, the company scope
061            * permissions are deleted. Be aware that this latter behavior can result in
062            * an overall reduction in permissions for the role.
063            * </p>
064            *
065            * <p>
066            * Depending on the scope, the value of <code>primKey</code> will have
067            * different meanings. For more information, see {@link
068            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
069            * </p>
070            *
071            * @param groupId the primary key of the group
072            * @param companyId the primary key of the company
073            * @param name the resource's name, which can be either a class name or a
074            portlet ID
075            * @param scope the scope. This method only supports company, group, and
076            group-template scope.
077            * @param primKey the primary key
078            * @param roleId the primary key of the role
079            * @param actionId the action ID
080            */
081            @Override
082            public void addResourcePermission(long groupId, long companyId,
083                    java.lang.String name, int scope, java.lang.String primKey,
084                    long roleId, java.lang.String actionId)
085                    throws com.liferay.portal.kernel.exception.PortalException {
086                    _resourcePermissionService.addResourcePermission(groupId, companyId,
087                            name, scope, primKey, roleId, actionId);
088            }
089    
090            /**
091            * Revokes permission at the scope from the role to perform the action on
092            * resources of the type. For example, this method could be used to revoke a
093            * group scope permission to edit blog posts.
094            *
095            * <p>
096            * Depending on the scope, the value of <code>primKey</code> will have
097            * different meanings. For more information, see {@link
098            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
099            * </p>
100            *
101            * @param groupId the primary key of the group
102            * @param companyId the primary key of the company
103            * @param name the resource's name, which can be either a class name or a
104            portlet ID
105            * @param scope the scope
106            * @param primKey the primary key
107            * @param roleId the primary key of the role
108            * @param actionId the action ID
109            */
110            @Override
111            public void removeResourcePermission(long groupId, long companyId,
112                    java.lang.String name, int scope, java.lang.String primKey,
113                    long roleId, java.lang.String actionId)
114                    throws com.liferay.portal.kernel.exception.PortalException {
115                    _resourcePermissionService.removeResourcePermission(groupId, companyId,
116                            name, scope, primKey, roleId, actionId);
117            }
118    
119            /**
120            * Revokes all permissions at the scope from the role to perform the action
121            * on resources of the type. For example, this method could be used to
122            * revoke all individual scope permissions to edit blog posts from site
123            * members.
124            *
125            * @param groupId the primary key of the group
126            * @param companyId the primary key of the company
127            * @param name the resource's name, which can be either a class name or a
128            portlet ID
129            * @param scope the scope
130            * @param roleId the primary key of the role
131            * @param actionId the action ID
132            */
133            @Override
134            public void removeResourcePermissions(long groupId, long companyId,
135                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
136                    throws com.liferay.portal.kernel.exception.PortalException {
137                    _resourcePermissionService.removeResourcePermissions(groupId,
138                            companyId, name, scope, roleId, actionId);
139            }
140    
141            /**
142            * Updates the role's permissions at the scope, setting the actions that can
143            * be performed on resources of the type. Existing actions are replaced.
144            *
145            * <p>
146            * This method can be used to set permissions at any scope, but it is
147            * generally only used at the individual scope. For example, it could be
148            * used to set the guest permissions on a blog post.
149            * </p>
150            *
151            * <p>
152            * Depending on the scope, the value of <code>primKey</code> will have
153            * different meanings. For more information, see {@link
154            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
155            * </p>
156            *
157            * @param groupId the primary key of the group
158            * @param companyId the primary key of the company
159            * @param name the resource's name, which can be either a class name or a
160            portlet ID
161            * @param primKey the primary key
162            * @param roleIdsToActionIds a map of role IDs to action IDs of the actions
163            */
164            @Override
165            public void setIndividualResourcePermissions(long groupId, long companyId,
166                    java.lang.String name, java.lang.String primKey,
167                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds)
168                    throws com.liferay.portal.kernel.exception.PortalException {
169                    _resourcePermissionService.setIndividualResourcePermissions(groupId,
170                            companyId, name, primKey, roleIdsToActionIds);
171            }
172    
173            /**
174            * Updates the role's permissions at the scope, setting the actions that can
175            * be performed on resources of the type. Existing actions are replaced.
176            *
177            * <p>
178            * This method can be used to set permissions at any scope, but it is
179            * generally only used at the individual scope. For example, it could be
180            * used to set the guest permissions on a blog post.
181            * </p>
182            *
183            * <p>
184            * Depending on the scope, the value of <code>primKey</code> will have
185            * different meanings. For more information, see {@link
186            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
187            * </p>
188            *
189            * @param groupId the primary key of the group
190            * @param companyId the primary key of the company
191            * @param name the resource's name, which can be either a class name or a
192            portlet ID
193            * @param primKey the primary key
194            * @param roleId the primary key of the role
195            * @param actionIds the action IDs of the actions
196            */
197            @Override
198            public void setIndividualResourcePermissions(long groupId, long companyId,
199                    java.lang.String name, java.lang.String primKey, long roleId,
200                    java.lang.String[] actionIds)
201                    throws com.liferay.portal.kernel.exception.PortalException {
202                    _resourcePermissionService.setIndividualResourcePermissions(groupId,
203                            companyId, name, primKey, roleId, actionIds);
204            }
205    
206            @Override
207            public ResourcePermissionService getWrappedService() {
208                    return _resourcePermissionService;
209            }
210    
211            @Override
212            public void setWrappedService(
213                    ResourcePermissionService resourcePermissionService) {
214                    _resourcePermissionService = resourcePermissionService;
215            }
216    
217            private ResourcePermissionService _resourcePermissionService;
218    }