Source code: net/sf/acegisecurity/acl/basic/BasicAclDao.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 net.sf.acegisecurity.acl.basic;
17
18 /**
19 * Represents a data access object that can return the {@link BasicAclEntry}s
20 * applying to a given ACL object identity.
21 *
22 * <P>
23 * <code>BasicAclDao</code> implementations are responsible for interpreting a
24 * given {@link AclObjectIdentity} and being able to lookup and return the
25 * corresponding {@link BasicAclEntry}[]s.
26 * </p>
27 *
28 * <P>
29 * <code>BasicAclDao</code>s many, but are not required to, allow the backend
30 * ACL repository to specify the class of <code>BasicAclEntry</code>
31 * implementations that should be returned.
32 * </p>
33 *
34 * @author Ben Alex
35 * @version $Id: BasicAclDao.java,v 1.1 2004/07/29 07:51:19 benalex Exp $
36 */
37 public interface BasicAclDao {
38 //~ Methods ================================================================
39
40 /**
41 * Obtains the ACLs that apply to the specified domain instance.
42 *
43 * <P>
44 * Does <b>not</b> perform caching, include ACLs from any inheritance
45 * hierarchy or filter returned objects based on effective permissions.
46 * Implementations are solely responsible for returning ACLs found in the
47 * ACL repository for the specified object identity.
48 * </p>
49 *
50 * @param aclObjectIdentity the domain object instance that ACL information
51 * is being requested for (never <code>null</code>)
52 *
53 * @return the ACLs that apply (no <code>null</code>s are permitted in the
54 * array), or <code>null</code> if no ACLs could be found for the
55 * specified ACL object identity
56 */
57 public BasicAclEntry[] getAcls(AclObjectIdentity aclObjectIdentity);
58 }