1   /**
2    * Copyright (c) 2000-2008 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(java.util.List permissions,
33          long userId, java.util.List groups, long groupId)
34          throws com.liferay.portal.SystemException;
35  
36      public boolean containsPermissions_4(java.util.List permissions,
37          long userId, java.util.List groups, java.util.List roles)
38          throws com.liferay.portal.SystemException;
39  
40      public int countByGroupsPermissions(java.util.List permissions,
41          java.util.List groups) throws com.liferay.portal.SystemException;
42  
43      public int countByGroupsRoles(java.util.List permissions,
44          java.util.List groups) throws com.liferay.portal.SystemException;
45  
46      public int countByRolesPermissions(java.util.List permissions,
47          java.util.List roles) throws com.liferay.portal.SystemException;
48  
49      public int countByUserGroupRole(java.util.List permissions, long userId,
50          long groupId) throws com.liferay.portal.SystemException;
51  
52      public int countByUsersPermissions(java.util.List permissions, long userId)
53          throws com.liferay.portal.SystemException;
54  
55      public int countByUsersRoles(java.util.List permissions, long userId)
56          throws com.liferay.portal.SystemException;
57  
58      public java.util.List findByA_R(java.lang.String actionId,
59          long[] resourceIds) throws com.liferay.portal.SystemException;
60  
61      public java.util.List findByG_R(long groupId, long resourceId)
62          throws com.liferay.portal.SystemException;
63  
64      public java.util.List findByR_R(long roleId, long resourceId)
65          throws com.liferay.portal.SystemException;
66  
67      public java.util.List findByU_R(long userId, long resourceId)
68          throws com.liferay.portal.SystemException;
69  
70      public java.util.List findByO_G_R(long organizationId, long groupId,
71          long resourceId) throws com.liferay.portal.SystemException;
72  
73      public java.util.List findByU_A_R(long userId,
74          java.lang.String[] actionIds, long resourceId)
75          throws com.liferay.portal.SystemException;
76  
77      public java.util.List findByG_C_N_S_P(long groupId, long companyId,
78          java.lang.String name, int scope, java.lang.String primKey)
79          throws com.liferay.portal.SystemException;
80  
81      public java.util.List findByU_C_N_S_P(long userId, long companyId,
82          java.lang.String name, int scope, java.lang.String primKey)
83          throws com.liferay.portal.SystemException;
84  }