1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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  }