Source code: org/acegisecurity/acl/AclManager.java
1 /* Copyright 2004 Acegi Technology Pty Limited
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package org.acegisecurity.acl;
17
18 import org.acegisecurity.Authentication;
19
20
21 /**
22 * Obtains the <code>AclEntry</code> instances that apply to a particular
23 * domain object instance.
24 *
25 * @author Ben Alex
26 * @version $Id: AclManager.java,v 1.2 2005/11/17 00:55:51 benalex Exp $
27 */
28 public interface AclManager {
29 //~ Methods ================================================================
30
31 /**
32 * Obtains the ACLs that apply to the specified domain instance.
33 *
34 * @param domainInstance the instance for which ACL information is required
35 * (never <code>null</code>)
36 *
37 * @return the ACLs that apply, or <code>null</code> if no ACLs apply to
38 * the specified domain instance
39 */
40 public AclEntry[] getAcls(Object domainInstance);
41
42 /**
43 * Obtains the ACLs that apply to the specified domain instance, but only
44 * including those ACLs which have been granted to the presented
45 * <code>Authentication</code> object
46 *
47 * @param domainInstance the instance for which ACL information is required
48 * (never <code>null</code>)
49 * @param authentication the prncipal for which ACL information should be
50 * filtered (never <code>null</code>)
51 *
52 * @return only those ACLs applying to the domain instance that have been
53 * granted to the principal (or <code>null</code>) if no such ACLs
54 * are found
55 */
56 public AclEntry[] getAcls(Object domainInstance,
57 Authentication authentication);
58 }