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  public interface PermissionFinder {
31      public boolean containsPermissions_2(
32          java.util.List<com.liferay.portal.model.Permission> permissions,
33          long userId, java.util.List<com.liferay.portal.model.Group> groups,
34          long groupId) throws com.liferay.portal.SystemException;
35  
36      public boolean containsPermissions_4(
37          java.util.List<com.liferay.portal.model.Permission> permissions,
38          long userId, java.util.List<com.liferay.portal.model.Group> groups,
39          java.util.List<com.liferay.portal.model.Role> roles)
40          throws com.liferay.portal.SystemException;
41  
42      public int countByGroupsPermissions(
43          java.util.List<com.liferay.portal.model.Permission> permissions,
44          java.util.List<com.liferay.portal.model.Group> groups)
45          throws com.liferay.portal.SystemException;
46  
47      public int countByGroupsRoles(
48          java.util.List<com.liferay.portal.model.Permission> permissions,
49          java.util.List<com.liferay.portal.model.Group> groups)
50          throws com.liferay.portal.SystemException;
51  
52      public int countByRolesPermissions(
53          java.util.List<com.liferay.portal.model.Permission> permissions,
54          java.util.List<com.liferay.portal.model.Role> roles)
55          throws com.liferay.portal.SystemException;
56  
57      public int countByUserGroupRole(
58          java.util.List<com.liferay.portal.model.Permission> permissions,
59          long userId, long groupId) throws com.liferay.portal.SystemException;
60  
61      public int countByUsersPermissions(
62          java.util.List<com.liferay.portal.model.Permission> permissions,
63          long userId) throws com.liferay.portal.SystemException;
64  
65      public int countByUsersRoles(
66          java.util.List<com.liferay.portal.model.Permission> permissions,
67          long userId) throws com.liferay.portal.SystemException;
68  
69      public java.util.List<com.liferay.portal.model.Permission> findByA_R(
70          java.lang.String actionId, long[] resourceIds)
71          throws com.liferay.portal.SystemException;
72  
73      public java.util.List<com.liferay.portal.model.Permission> findByG_R(
74          long groupId, long resourceId)
75          throws com.liferay.portal.SystemException;
76  
77      public java.util.List<com.liferay.portal.model.Permission> findByR_R(
78          long roleId, long resourceId) throws com.liferay.portal.SystemException;
79  
80      public java.util.List<com.liferay.portal.model.Permission> findByU_R(
81          long userId, long resourceId) throws com.liferay.portal.SystemException;
82  
83      public java.util.List<com.liferay.portal.model.Permission> findByO_G_R(
84          long organizationId, long groupId, long resourceId)
85          throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portal.model.Permission> findByU_A_R(
88          long userId, java.lang.String[] actionIds, long resourceId)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portal.model.Permission> findByG_C_N_S_P(
92          long groupId, long companyId, java.lang.String name, int scope,
93          java.lang.String primKey) throws com.liferay.portal.SystemException;
94  
95      public java.util.List<com.liferay.portal.model.Permission> findByU_C_N_S_P(
96          long userId, long companyId, java.lang.String name, int scope,
97          java.lang.String primKey) throws com.liferay.portal.SystemException;
98  }