1   /**
2    * Copyright (c) 2000-2010 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   *
12   * 
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.PortalException;
18  import com.liferay.portal.SystemException;
19  import com.liferay.portal.kernel.annotation.Isolation;
20  import com.liferay.portal.kernel.annotation.Propagation;
21  import com.liferay.portal.kernel.annotation.Transactional;
22  
23  /**
24   * <a href="PermissionService.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This interface defines the service. The default implementation is
33   * {@link
34   * com.liferay.portal.service.impl.PermissionServiceImpl}}.
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 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.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       PermissionServiceUtil
45   * @generated
46   */
47  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
48      PortalException.class, SystemException.class})
49  public interface PermissionService {
50      public void checkPermission(long groupId, long resourceId)
51          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
52              com.liferay.portal.SystemException;
53  
54      public void checkPermission(long groupId, java.lang.String name,
55          long primKey)
56          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
57              com.liferay.portal.SystemException;
58  
59      public void checkPermission(long groupId, java.lang.String name,
60          java.lang.String primKey)
61          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
62              com.liferay.portal.SystemException;
63  
64      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
65      public boolean hasGroupPermission(long groupId, java.lang.String actionId,
66          long resourceId)
67          throws java.rmi.RemoteException, com.liferay.portal.SystemException;
68  
69      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
70      public boolean hasUserPermission(long userId, java.lang.String actionId,
71          long resourceId)
72          throws java.rmi.RemoteException, com.liferay.portal.SystemException;
73  
74      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
75      public boolean hasUserPermissions(long userId, long groupId,
76          java.util.List<com.liferay.portal.model.Resource> resources,
77          java.lang.String actionId,
78          com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
79          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException;
81  
82      public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
83          long resourceId)
84          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException;
86  
87      public void setGroupPermissions(java.lang.String className,
88          java.lang.String classPK, long groupId, java.lang.String[] actionIds,
89          long resourceId)
90          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException;
92  
93      public void setOrgGroupPermissions(long organizationId, 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 setRolePermission(long roleId, long groupId,
99          java.lang.String name, int scope, java.lang.String primKey,
100         java.lang.String actionId)
101         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
102             com.liferay.portal.SystemException;
103 
104     public void setRolePermissions(long roleId, long groupId,
105         java.lang.String[] actionIds, long resourceId)
106         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException;
108 
109     public void setUserPermissions(long userId, long groupId,
110         java.lang.String[] actionIds, long resourceId)
111         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException;
113 
114     public void unsetRolePermission(long roleId, long groupId, long permissionId)
115         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException;
117 
118     public void unsetRolePermission(long roleId, long groupId,
119         java.lang.String name, int scope, java.lang.String primKey,
120         java.lang.String actionId)
121         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException;
123 
124     public void unsetRolePermissions(long roleId, long groupId,
125         java.lang.String name, int scope, java.lang.String actionId)
126         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException;
128 
129     public void unsetUserPermissions(long userId, long groupId,
130         java.lang.String[] actionIds, long resourceId)
131         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException;
133 }