1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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  
26  /**
27   * <a href="PermissionLocalService.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This interface defines the service. The default implementation is
36   * <code>com.liferay.portal.service.impl.PermissionLocalServiceImpl</code>.
37   * Modify methods in that class and rerun ServiceBuilder to populate this class
38   * and all other generated classes.
39   * </p>
40   *
41   * <p>
42   * 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.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portal.service.PermissionLocalServiceFactory
48   * @see com.liferay.portal.service.PermissionLocalServiceUtil
49   *
50   */
51  public interface PermissionLocalService {
52      public com.liferay.portal.model.Permission addPermission(
53          com.liferay.portal.model.Permission permission)
54          throws com.liferay.portal.SystemException;
55  
56      public void deletePermission(long permissionId)
57          throws com.liferay.portal.SystemException,
58              com.liferay.portal.PortalException;
59  
60      public void deletePermission(com.liferay.portal.model.Permission permission)
61          throws com.liferay.portal.SystemException,
62              com.liferay.portal.PortalException;
63  
64      public java.util.List<com.liferay.portal.model.Permission> dynamicQuery(
65          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
66          throws com.liferay.portal.SystemException;
67  
68      public java.util.List<com.liferay.portal.model.Permission> dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portal.model.Permission updatePermission(
73          com.liferay.portal.model.Permission permission)
74          throws com.liferay.portal.SystemException;
75  
76      public com.liferay.portal.model.Permission addPermission(long companyId,
77          java.lang.String actionId, long resourceId)
78          throws com.liferay.portal.SystemException,
79              com.liferay.portal.PortalException;
80  
81      public java.util.List<com.liferay.portal.model.Permission> addPermissions(
82          long companyId, java.lang.String name, long resourceId,
83          boolean portletActions)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portal.PortalException;
86  
87      public void addUserPermissions(long userId, java.lang.String[] actionIds,
88          long resourceId)
89          throws com.liferay.portal.SystemException,
90              com.liferay.portal.PortalException;
91  
92      public java.util.List<String> getActions(
93          java.util.List<com.liferay.portal.model.Permission> permissions)
94          throws com.liferay.portal.SystemException;
95  
96      public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
97          long groupId, long resourceId)
98          throws com.liferay.portal.SystemException;
99  
100     public java.util.List<com.liferay.portal.model.Permission> getGroupPermissions(
101         long groupId, long companyId, java.lang.String name, int scope,
102         java.lang.String primKey) throws com.liferay.portal.SystemException;
103 
104     public java.util.List<com.liferay.portal.model.Permission> getOrgGroupPermissions(
105         long organizationId, long groupId, long resourceId)
106         throws com.liferay.portal.SystemException;
107 
108     public long getLatestPermissionId()
109         throws com.liferay.portal.SystemException,
110             com.liferay.portal.PortalException;
111 
112     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
113         long companyId, java.lang.String[] actionIds, long resourceId)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portal.PortalException;
116 
117     public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
118         long roleId)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portal.PortalException;
121 
122     public java.util.List<com.liferay.portal.model.Permission> getRolePermissions(
123         long roleId, long resourceId) throws com.liferay.portal.SystemException;
124 
125     public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
126         long userId, long resourceId) throws com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portal.model.Permission> getUserPermissions(
129         long userId, long companyId, java.lang.String name, int scope,
130         java.lang.String primKey) throws com.liferay.portal.SystemException;
131 
132     public boolean hasGroupPermission(long groupId, java.lang.String actionId,
133         long resourceId)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portal.PortalException;
136 
137     public boolean hasRolePermission(long roleId, long companyId,
138         java.lang.String name, int scope, java.lang.String actionId)
139         throws com.liferay.portal.SystemException,
140             com.liferay.portal.PortalException;
141 
142     public boolean hasRolePermission(long roleId, long companyId,
143         java.lang.String name, int scope, java.lang.String primKey,
144         java.lang.String actionId)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portal.PortalException;
147 
148     public boolean hasUserPermission(long userId, java.lang.String actionId,
149         long resourceId)
150         throws com.liferay.portal.SystemException,
151             com.liferay.portal.PortalException;
152 
153     public boolean hasUserPermissions(long userId, long groupId,
154         java.lang.String actionId, long[] resourceIds,
155         com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portal.PortalException;
158 
159     public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
160         long resourceId)
161         throws com.liferay.portal.SystemException,
162             com.liferay.portal.PortalException;
163 
164     public void setGroupPermissions(java.lang.String className,
165         java.lang.String classPK, long groupId, java.lang.String[] actionIds,
166         long resourceId)
167         throws com.liferay.portal.SystemException,
168             com.liferay.portal.PortalException;
169 
170     public void setOrgGroupPermissions(long organizationId, long groupId,
171         java.lang.String[] actionIds, long resourceId)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portal.PortalException;
174 
175     public void setRolePermission(long roleId, long companyId,
176         java.lang.String name, int scope, java.lang.String primKey,
177         java.lang.String actionId)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portal.PortalException;
180 
181     public void setRolePermissions(long roleId, long companyId,
182         java.lang.String name, int scope, java.lang.String primKey,
183         java.lang.String[] actionIds)
184         throws com.liferay.portal.SystemException,
185             com.liferay.portal.PortalException;
186 
187     public void setRolePermissions(long roleId, java.lang.String[] actionIds,
188         long resourceId)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portal.PortalException;
191 
192     public void setUserPermissions(long userId, java.lang.String[] actionIds,
193         long resourceId)
194         throws com.liferay.portal.SystemException,
195             com.liferay.portal.PortalException;
196 
197     public void unsetRolePermission(long roleId, long permissionId)
198         throws com.liferay.portal.SystemException,
199             com.liferay.portal.PortalException;
200 
201     public void unsetRolePermission(long roleId, long companyId,
202         java.lang.String name, int scope, java.lang.String primKey,
203         java.lang.String actionId)
204         throws com.liferay.portal.SystemException,
205             com.liferay.portal.PortalException;
206 
207     public void unsetRolePermissions(long roleId, long companyId,
208         java.lang.String name, int scope, java.lang.String actionId)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portal.PortalException;
211 
212     public void unsetUserPermissions(long userId, java.lang.String[] actionIds,
213         long resourceId)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portal.PortalException;
216 }