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 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 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 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) throws com.liferay.portal.SystemException;
67  
68      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
69      public boolean hasUserPermission(long userId, java.lang.String actionId,
70          long resourceId) throws com.liferay.portal.SystemException;
71  
72      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
73      public boolean hasUserPermissions(long userId, long groupId,
74          java.util.List<com.liferay.portal.model.Resource> resources,
75          java.lang.String actionId,
76          com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException;
79  
80      public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
81          long resourceId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException;
84  
85      public void setGroupPermissions(java.lang.String className,
86          java.lang.String classPK, long groupId, java.lang.String[] actionIds,
87          long resourceId)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException;
90  
91      public void setOrgGroupPermissions(long organizationId, long groupId,
92          java.lang.String[] actionIds, long resourceId)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException;
95  
96      public void setRolePermission(long roleId, long groupId,
97          java.lang.String name, int scope, java.lang.String primKey,
98          java.lang.String actionId)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException;
101 
102     public void setRolePermissions(long roleId, long groupId,
103         java.lang.String[] actionIds, long resourceId)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException;
106 
107     public void setUserPermissions(long userId, long groupId,
108         java.lang.String[] actionIds, long resourceId)
109         throws com.liferay.portal.PortalException,
110             com.liferay.portal.SystemException;
111 
112     public void unsetRolePermission(long roleId, long groupId, long permissionId)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException;
115 
116     public void unsetRolePermission(long roleId, long groupId,
117         java.lang.String name, int scope, java.lang.String primKey,
118         java.lang.String actionId)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException;
121 
122     public void unsetRolePermissions(long roleId, long groupId,
123         java.lang.String name, int scope, java.lang.String actionId)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException;
126 
127     public void unsetUserPermissions(long userId, long groupId,
128         java.lang.String[] actionIds, long resourceId)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException;
131 }