1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.annotation.Isolation;
18  import com.liferay.portal.kernel.annotation.Propagation;
19  import com.liferay.portal.kernel.annotation.Transactional;
20  import com.liferay.portal.kernel.exception.PortalException;
21  import com.liferay.portal.kernel.exception.SystemException;
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.kernel.exception.PortalException,
52              com.liferay.portal.kernel.exception.SystemException;
53  
54      public void checkPermission(long groupId, java.lang.String name,
55          long primKey)
56          throws com.liferay.portal.kernel.exception.PortalException,
57              com.liferay.portal.kernel.exception.SystemException;
58  
59      public void checkPermission(long groupId, java.lang.String name,
60          java.lang.String primKey)
61          throws com.liferay.portal.kernel.exception.PortalException,
62              com.liferay.portal.kernel.exception.SystemException;
63  
64      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
65      public boolean hasGroupPermission(long groupId, java.lang.String actionId,
66          long resourceId)
67          throws com.liferay.portal.kernel.exception.SystemException;
68  
69      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
70      public boolean hasUserPermission(long userId, java.lang.String actionId,
71          long resourceId)
72          throws com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException,
80              com.liferay.portal.kernel.exception.SystemException;
81  
82      public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
83          long resourceId)
84          throws com.liferay.portal.kernel.exception.PortalException,
85              com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException,
91              com.liferay.portal.kernel.exception.SystemException;
92  
93      public void setOrgGroupPermissions(long organizationId, long groupId,
94          java.lang.String[] actionIds, long resourceId)
95          throws com.liferay.portal.kernel.exception.PortalException,
96              com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException,
102             com.liferay.portal.kernel.exception.SystemException;
103 
104     public void setRolePermissions(long roleId, long groupId,
105         java.lang.String[] actionIds, long resourceId)
106         throws com.liferay.portal.kernel.exception.PortalException,
107             com.liferay.portal.kernel.exception.SystemException;
108 
109     public void setUserPermissions(long userId, long groupId,
110         java.lang.String[] actionIds, long resourceId)
111         throws com.liferay.portal.kernel.exception.PortalException,
112             com.liferay.portal.kernel.exception.SystemException;
113 
114     public void unsetRolePermission(long roleId, long groupId, long permissionId)
115         throws com.liferay.portal.kernel.exception.PortalException,
116             com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException,
122             com.liferay.portal.kernel.exception.SystemException;
123 
124     public void unsetRolePermissions(long roleId, long groupId,
125         java.lang.String name, int scope, java.lang.String actionId)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException;
128 
129     public void unsetUserPermissions(long userId, long groupId,
130         java.lang.String[] actionIds, long resourceId)
131         throws com.liferay.portal.kernel.exception.PortalException,
132             com.liferay.portal.kernel.exception.SystemException;
133 }