1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.service.persistence;
21  
22  /**
23   * <a href="PermissionFinder.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public interface PermissionFinder {
29      public boolean containsPermissions_2(
30          java.util.List<com.liferay.portal.model.Permission> permissions,
31          long userId, java.util.List<com.liferay.portal.model.Group> groups,
32          long groupId) throws com.liferay.portal.SystemException;
33  
34      public boolean containsPermissions_4(
35          java.util.List<com.liferay.portal.model.Permission> permissions,
36          long userId, java.util.List<com.liferay.portal.model.Group> groups,
37          java.util.List<com.liferay.portal.model.Role> roles)
38          throws com.liferay.portal.SystemException;
39  
40      public int countByGroupsPermissions(
41          java.util.List<com.liferay.portal.model.Permission> permissions,
42          java.util.List<com.liferay.portal.model.Group> groups)
43          throws com.liferay.portal.SystemException;
44  
45      public int countByGroupsRoles(
46          java.util.List<com.liferay.portal.model.Permission> permissions,
47          java.util.List<com.liferay.portal.model.Group> groups)
48          throws com.liferay.portal.SystemException;
49  
50      public int countByRolesPermissions(
51          java.util.List<com.liferay.portal.model.Permission> permissions,
52          java.util.List<com.liferay.portal.model.Role> roles)
53          throws com.liferay.portal.SystemException;
54  
55      public int countByUserGroupRole(
56          java.util.List<com.liferay.portal.model.Permission> permissions,
57          long userId, long groupId) throws com.liferay.portal.SystemException;
58  
59      public int countByUsersPermissions(
60          java.util.List<com.liferay.portal.model.Permission> permissions,
61          long userId) throws com.liferay.portal.SystemException;
62  
63      public int countByUsersRoles(
64          java.util.List<com.liferay.portal.model.Permission> permissions,
65          long userId) throws com.liferay.portal.SystemException;
66  
67      public java.util.List<com.liferay.portal.model.Permission> findByA_R(
68          java.lang.String actionId, long[] resourceIds)
69          throws com.liferay.portal.SystemException;
70  
71      public java.util.List<com.liferay.portal.model.Permission> findByG_R(
72          long groupId, long resourceId)
73          throws com.liferay.portal.SystemException;
74  
75      public java.util.List<com.liferay.portal.model.Permission> findByR_R(
76          long roleId, long resourceId) throws com.liferay.portal.SystemException;
77  
78      public java.util.List<com.liferay.portal.model.Permission> findByU_R(
79          long userId, long resourceId) throws com.liferay.portal.SystemException;
80  
81      public java.util.List<com.liferay.portal.model.Permission> findByO_G_R(
82          long organizationId, long groupId, long resourceId)
83          throws com.liferay.portal.SystemException;
84  
85      public java.util.List<com.liferay.portal.model.Permission> findByU_A_R(
86          long userId, java.lang.String[] actionIds, long resourceId)
87          throws com.liferay.portal.SystemException;
88  
89      public java.util.List<com.liferay.portal.model.Permission> findByG_C_N_S_P(
90          long groupId, long companyId, java.lang.String name, int scope,
91          java.lang.String primKey) throws com.liferay.portal.SystemException;
92  
93      public java.util.List<com.liferay.portal.model.Permission> findByU_C_N_S_P(
94          long userId, long companyId, java.lang.String name, int scope,
95          java.lang.String primKey) throws com.liferay.portal.SystemException;
96  }