1   /**
2    * Copyright (c) 2000-2007 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   * <a href="PermissionLocalService.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This interface defines the service. The default implementation is <code>com.liferay.portal.service.impl.PermissionLocalServiceImpl</code>.
35   * Modify methods in that class and rerun ServiceBuilder to populate this class
36   * and all other generated classes.
37   * </p>
38   *
39   * <p>
40   * This is a local service. Methods of this service will not have security checks
41   * based on the propagated JAAS credentials because this service can only be accessed
42   * from within the same VM.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portal.service.PermissionServiceFactory
48   * @see com.liferay.portal.service.PermissionServiceUtil
49   *
50   */
51  public interface PermissionLocalService {
52      public com.liferay.portal.model.Permission addPermission(
53          com.liferay.portal.model.Permission model)
54          throws com.liferay.portal.SystemException;
55  
56      public java.util.List dynamicQuery(
57          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
58          throws com.liferay.portal.SystemException;
59  
60      public java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
62          int begin, int end) throws com.liferay.portal.SystemException;
63  
64      public com.liferay.portal.model.Permission updatePermission(
65          com.liferay.portal.model.Permission model)
66          throws com.liferay.portal.SystemException;
67  
68      public com.liferay.portal.model.Permission addPermission(long companyId,
69          java.lang.String actionId, long resourceId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.PortalException;
72  
73      public java.util.List addPermissions(long companyId, java.lang.String name,
74          long resourceId, boolean portletActions)
75          throws com.liferay.portal.SystemException, 
76              com.liferay.portal.PortalException;
77  
78      public void addUserPermissions(long userId, java.lang.String[] actionIds,
79          long resourceId)
80          throws com.liferay.portal.SystemException, 
81              com.liferay.portal.PortalException;
82  
83      public java.util.List getActions(java.util.List permissions)
84          throws com.liferay.portal.SystemException;
85  
86      public java.util.List getGroupPermissions(long groupId, long resourceId)
87          throws com.liferay.portal.SystemException;
88  
89      public java.util.List getGroupPermissions(long groupId, long companyId,
90          java.lang.String name, int scope, java.lang.String primKey)
91          throws com.liferay.portal.SystemException;
92  
93      public java.util.List getOrgGroupPermissions(long organizationId,
94          long groupId, long resourceId)
95          throws com.liferay.portal.SystemException;
96  
97      public long getLatestPermissionId()
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portal.PortalException;
100 
101     public java.util.List getPermissions(long companyId,
102         java.lang.String[] actionIds, long resourceId)
103         throws com.liferay.portal.SystemException, 
104             com.liferay.portal.PortalException;
105 
106     public java.util.List getRolePermissions(long roleId)
107         throws com.liferay.portal.SystemException, 
108             com.liferay.portal.PortalException;
109 
110     public java.util.List getUserPermissions(long userId, long resourceId)
111         throws com.liferay.portal.SystemException;
112 
113     public java.util.List getUserPermissions(long userId, long companyId,
114         java.lang.String name, int scope, java.lang.String primKey)
115         throws com.liferay.portal.SystemException;
116 
117     public boolean hasGroupPermission(long groupId, java.lang.String actionId,
118         long resourceId)
119         throws com.liferay.portal.SystemException, 
120             com.liferay.portal.PortalException;
121 
122     public boolean hasRolePermission(long roleId, long companyId,
123         java.lang.String name, int scope, java.lang.String actionId)
124         throws com.liferay.portal.SystemException, 
125             com.liferay.portal.PortalException;
126 
127     public boolean hasRolePermission(long roleId, long companyId,
128         java.lang.String name, int scope, java.lang.String primKey,
129         java.lang.String actionId)
130         throws com.liferay.portal.SystemException, 
131             com.liferay.portal.PortalException;
132 
133     public boolean hasUserPermission(long userId, java.lang.String actionId,
134         long resourceId)
135         throws com.liferay.portal.SystemException, 
136             com.liferay.portal.PortalException;
137 
138     public boolean hasUserPermissions(long userId, long groupId,
139         java.lang.String actionId, long[] resourceIds,
140         com.liferay.portal.kernel.security.permission.PermissionCheckerBag permissionCheckerBag)
141         throws com.liferay.portal.SystemException, 
142             com.liferay.portal.PortalException;
143 
144     public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
145         long resourceId)
146         throws com.liferay.portal.SystemException, 
147             com.liferay.portal.PortalException;
148 
149     public void setGroupPermissions(java.lang.String className,
150         java.lang.String classPK, long groupId, java.lang.String[] actionIds,
151         long resourceId)
152         throws com.liferay.portal.SystemException, 
153             com.liferay.portal.PortalException;
154 
155     public void setOrgGroupPermissions(long organizationId, long groupId,
156         java.lang.String[] actionIds, long resourceId)
157         throws com.liferay.portal.SystemException, 
158             com.liferay.portal.PortalException;
159 
160     public void setRolePermission(long roleId, long companyId,
161         java.lang.String name, int scope, java.lang.String primKey,
162         java.lang.String actionId)
163         throws com.liferay.portal.SystemException, 
164             com.liferay.portal.PortalException;
165 
166     public void setRolePermissions(long roleId, long companyId,
167         java.lang.String name, int scope, java.lang.String primKey,
168         java.lang.String[] actionIds)
169         throws com.liferay.portal.SystemException, 
170             com.liferay.portal.PortalException;
171 
172     public void setUserPermissions(long userId, java.lang.String[] actionIds,
173         long resourceId)
174         throws com.liferay.portal.SystemException, 
175             com.liferay.portal.PortalException;
176 
177     public void unsetRolePermission(long roleId, long permissionId)
178         throws com.liferay.portal.SystemException, 
179             com.liferay.portal.PortalException;
180 
181     public void unsetRolePermission(long roleId, long companyId,
182         java.lang.String name, int scope, java.lang.String primKey,
183         java.lang.String actionId)
184         throws com.liferay.portal.SystemException, 
185             com.liferay.portal.PortalException;
186 
187     public void unsetRolePermissions(long roleId, long companyId,
188         java.lang.String name, int scope, java.lang.String actionId)
189         throws com.liferay.portal.SystemException, 
190             com.liferay.portal.PortalException;
191 
192     public void unsetUserPermissions(long userId, java.lang.String[] actionIds,
193         long resourceId)
194         throws com.liferay.portal.SystemException, 
195             com.liferay.portal.PortalException;
196 }