1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Isolation;
28  import com.liferay.portal.kernel.annotation.Propagation;
29  import com.liferay.portal.kernel.annotation.Transactional;
30  
31  /**
32   * <a href="PermissionLocalService.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This interface defines the service. The default implementation is
41   * {@link
42   * com.liferay.portal.service.impl.PermissionLocalServiceImpl}}.
43   * Modify methods in that class and rerun ServiceBuilder to populate this class
44   * and all other generated classes.
45   * </p>
46   *
47   * <p>
48   * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
49   * </p>
50   *
51   * @author    Brian Wing Shun Chan
52   * @see       PermissionLocalServiceUtil
53   * @generated
54   */
55  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
56      PortalException.class, SystemException.class})
57  public interface PermissionLocalService {
58      public com.liferay.portal.model.Permission addPermission(
59          com.liferay.portal.model.Permission permission)
60          throws com.liferay.portal.SystemException;
61  
62      public com.liferay.portal.model.Permission createPermission(
63          long permissionId);
64  
65      public void deletePermission(long permissionId)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException;
68  
69      public void deletePermission(com.liferay.portal.model.Permission permission)
70          throws com.liferay.portal.SystemException;
71  
72      public java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
74          throws com.liferay.portal.SystemException;
75  
76      public java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public com.liferay.portal.model.Permission getPermission(long permissionId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException;
84  
85      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
86      public java.util.List<com.liferay.portal.model.Permission> getPermissions(
87          int start, int end) throws com.liferay.portal.SystemException;
88  
89      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
90      public int getPermissionsCount() throws com.liferay.portal.SystemException;
91  
92      public com.liferay.portal.model.Permission updatePermission(
93          com.liferay.portal.model.Permission permission)
94          throws com.liferay.portal.SystemException;
95  
96      public com.liferay.portal.model.Permission updatePermission(
97          com.liferay.portal.model.Permission permission, boolean merge)
98          throws com.liferay.portal.SystemException;
99  
100     public com.liferay.portal.model.Permission addPermission(long companyId,
101         java.lang.String actionId, long resourceId)
102         throws com.liferay.portal.SystemException;
103 
104     public java.util.List<com.liferay.portal.model.Permission> addPermissions(
105         long companyId, java.lang.String name, long resourceId,
106         boolean portletActions) throws com.liferay.portal.SystemException;
107 
108     public java.util.List<com.liferay.portal.model.Permission> addPermissions(
109         long companyId, java.util.List<String> actionIds, long resourceId)
110         throws com.liferay.portal.SystemException;
111 
112     public void addUserPermissions(long userId, java.lang.String[] actionIds,
113         long resourceId)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException;
116 
117     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118     public java.util.List<String> getActions(
119         java.util.List<com.liferay.portal.model.Permission> permissions);
120 
121     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122     public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
123         long groupId, long resourceId)
124         throws com.liferay.portal.SystemException;
125 
126     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127     public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
128         long groupId, long companyId, java.lang.String name, int scope,
129         java.lang.String primKey) throws com.liferay.portal.SystemException;
130 
131     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132     public java.util.List<com.liferay.portal.model.Permission> getOrgGroupPermissions(
133         long organizationId, long groupId, long resourceId)
134         throws com.liferay.portal.SystemException;
135 
136     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137     public long getLatestPermissionId()
138         throws com.liferay.portal.SystemException;
139 
140     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
142         long companyId, java.lang.String[] actionIds, long resourceId)
143         throws com.liferay.portal.SystemException;
144 
145     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146     public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
147         long roleId) throws com.liferay.portal.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
151         long roleId, long resourceId) throws com.liferay.portal.SystemException;
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
155         long userId, long resourceId) throws com.liferay.portal.SystemException;
156 
157     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158     public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
159         long userId, long companyId, java.lang.String name, int scope,
160         java.lang.String primKey) throws com.liferay.portal.SystemException;
161 
162     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163     public boolean hasGroupPermission(long groupId, java.lang.String actionId,
164         long resourceId) throws com.liferay.portal.SystemException;
165 
166     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167     public boolean hasRolePermission(long roleId, long companyId,
168         java.lang.String name, int scope, java.lang.String actionId)
169         throws com.liferay.portal.SystemException;
170 
171     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172     public boolean hasRolePermission(long roleId, long companyId,
173         java.lang.String name, int scope, java.lang.String primKey,
174         java.lang.String actionId) throws com.liferay.portal.SystemException;
175 
176     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177     public boolean hasUserPermission(long userId, java.lang.String actionId,
178         long resourceId) throws com.liferay.portal.SystemException;
179 
180     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181     public boolean hasUserPermissions(long userId, long groupId,
182         java.util.List<com.liferay.portal.model.Resource> resources,
183         java.lang.String actionId,
184         com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
185         throws com.liferay.portal.PortalException,
186             com.liferay.portal.SystemException;
187 
188     public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
189         long resourceId)
190         throws com.liferay.portal.PortalException,
191             com.liferay.portal.SystemException;
192 
193     public void setGroupPermissions(java.lang.String className,
194         java.lang.String classPK, long groupId, java.lang.String[] actionIds,
195         long resourceId)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException;
198 
199     public void setOrgGroupPermissions(long organizationId, long groupId,
200         java.lang.String[] actionIds, long resourceId)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException;
203 
204     public void setRolePermission(long roleId, long companyId,
205         java.lang.String name, int scope, java.lang.String primKey,
206         java.lang.String actionId)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException;
209 
210     public void setRolePermissions(long roleId, long companyId,
211         java.lang.String name, int scope, java.lang.String primKey,
212         java.lang.String[] actionIds)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException;
215 
216     public void setRolePermissions(long roleId, java.lang.String[] actionIds,
217         long resourceId)
218         throws com.liferay.portal.PortalException,
219             com.liferay.portal.SystemException;
220 
221     public void setUserPermissions(long userId, java.lang.String[] actionIds,
222         long resourceId)
223         throws com.liferay.portal.PortalException,
224             com.liferay.portal.SystemException;
225 
226     public void unsetRolePermission(long roleId, long permissionId)
227         throws com.liferay.portal.SystemException;
228 
229     public void unsetRolePermission(long roleId, long companyId,
230         java.lang.String name, int scope, java.lang.String primKey,
231         java.lang.String actionId) throws com.liferay.portal.SystemException;
232 
233     public void unsetRolePermissions(long roleId, long companyId,
234         java.lang.String name, int scope, java.lang.String actionId)
235         throws com.liferay.portal.SystemException;
236 
237     public void unsetUserPermissions(long userId, java.lang.String[] actionIds,
238         long resourceId) throws com.liferay.portal.SystemException;
239 }