1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.persistence;
24  
25  /**
26   * <a href="PermissionFinder.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface PermissionFinder {
32      public boolean containsPermissions_2(
33          java.util.List<com.liferay.portal.model.Permission> permissions,
34          long userId, java.util.List<com.liferay.portal.model.Group> groups,
35          long groupId) throws com.liferay.portal.SystemException;
36  
37      public boolean containsPermissions_4(
38          java.util.List<com.liferay.portal.model.Permission> permissions,
39          long userId, java.util.List<com.liferay.portal.model.Group> groups,
40          java.util.List<com.liferay.portal.model.Role> roles)
41          throws com.liferay.portal.SystemException;
42  
43      public int countByGroupsPermissions(
44          java.util.List<com.liferay.portal.model.Permission> permissions,
45          java.util.List<com.liferay.portal.model.Group> groups)
46          throws com.liferay.portal.SystemException;
47  
48      public int countByGroupsRoles(
49          java.util.List<com.liferay.portal.model.Permission> permissions,
50          java.util.List<com.liferay.portal.model.Group> groups)
51          throws com.liferay.portal.SystemException;
52  
53      public int countByRolesPermissions(
54          java.util.List<com.liferay.portal.model.Permission> permissions,
55          java.util.List<com.liferay.portal.model.Role> roles)
56          throws com.liferay.portal.SystemException;
57  
58      public int countByUserGroupRole(
59          java.util.List<com.liferay.portal.model.Permission> permissions,
60          long userId, long groupId) throws com.liferay.portal.SystemException;
61  
62      public int countByUsersPermissions(
63          java.util.List<com.liferay.portal.model.Permission> permissions,
64          long userId) throws com.liferay.portal.SystemException;
65  
66      public int countByUsersRoles(
67          java.util.List<com.liferay.portal.model.Permission> permissions,
68          long userId) throws com.liferay.portal.SystemException;
69  
70      public java.util.List<com.liferay.portal.model.Permission> findByA_R(
71          java.lang.String actionId, long[] resourceIds)
72          throws com.liferay.portal.SystemException;
73  
74      public java.util.List<com.liferay.portal.model.Permission> findByG_R(
75          long groupId, long resourceId)
76          throws com.liferay.portal.SystemException;
77  
78      public java.util.List<com.liferay.portal.model.Permission> findByR_R(
79          long roleId, long resourceId) throws com.liferay.portal.SystemException;
80  
81      public java.util.List<com.liferay.portal.model.Permission> findByU_R(
82          long userId, long resourceId) throws com.liferay.portal.SystemException;
83  
84      public java.util.List<com.liferay.portal.model.Permission> findByO_G_R(
85          long organizationId, long groupId, long resourceId)
86          throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portal.model.Permission> findByU_A_R(
89          long userId, java.lang.String[] actionIds, long resourceId)
90          throws com.liferay.portal.SystemException;
91  
92      public java.util.List<com.liferay.portal.model.Permission> findByG_C_N_S_P(
93          long groupId, long companyId, java.lang.String name, int scope,
94          java.lang.String primKey) throws com.liferay.portal.SystemException;
95  
96      public java.util.List<com.liferay.portal.model.Permission> findByU_C_N_S_P(
97          long userId, long companyId, java.lang.String name, int scope,
98          java.lang.String primKey) throws com.liferay.portal.SystemException;
99  }