1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.service;
21  
22  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Transactional;
25  
26  /**
27   * <a href="PermissionService.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.PermissionServiceImpl</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 remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portal.service.PermissionServiceUtil
48   *
49   */
50  @Transactional(rollbackFor =  {
51      PortalException.class, SystemException.class})
52  public interface PermissionService {
53      public void checkPermission(long groupId, java.lang.String name,
54          java.lang.String primKey)
55          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException;
57  
58      public boolean hasGroupPermission(long groupId, java.lang.String actionId,
59          long resourceId)
60          throws java.rmi.RemoteException, com.liferay.portal.SystemException;
61  
62      public boolean hasUserPermission(long userId, java.lang.String actionId,
63          long resourceId)
64          throws java.rmi.RemoteException, com.liferay.portal.SystemException;
65  
66      public boolean hasUserPermissions(long userId, long groupId,
67          java.lang.String actionId, long[] resourceIds,
68          com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
69          throws java.rmi.RemoteException, com.liferay.portal.SystemException;
70  
71      public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
72          long resourceId)
73          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
74              com.liferay.portal.SystemException;
75  
76      public void setGroupPermissions(java.lang.String className,
77          java.lang.String classPK, long groupId, java.lang.String[] actionIds,
78          long resourceId)
79          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException;
81  
82      public void setOrgGroupPermissions(long organizationId, long groupId,
83          java.lang.String[] actionIds, long resourceId)
84          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException;
86  
87      public void setRolePermission(long roleId, long groupId,
88          java.lang.String name, int scope, java.lang.String primKey,
89          java.lang.String actionId)
90          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException;
92  
93      public void setRolePermissions(long roleId, long groupId,
94          java.lang.String[] actionIds, long resourceId)
95          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
96              com.liferay.portal.SystemException;
97  
98      public void setUserPermissions(long userId, long groupId,
99          java.lang.String[] actionIds, long resourceId)
100         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException;
102 
103     public void unsetRolePermission(long roleId, long groupId, long permissionId)
104         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException;
106 
107     public void unsetRolePermission(long roleId, long groupId,
108         java.lang.String name, int scope, java.lang.String primKey,
109         java.lang.String actionId)
110         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException;
112 
113     public void unsetRolePermissions(long roleId, long groupId,
114         java.lang.String name, int scope, java.lang.String actionId)
115         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException;
117 
118     public void unsetUserPermissions(long userId, long groupId,
119         java.lang.String[] actionIds, long resourceId)
120         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException;
122 }