01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * 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: package org.acegisecurity.acls;
16:
17: import org.acegisecurity.acls.sid.Sid;
18:
19: import java.io.Serializable;
20:
21: /**
22: * Represents an individual permission assignment within an {@link Acl}.
23: *
24: * <p>
25: * Instances MUST be immutable, as they are returned by <code>Acl</code>
26: * and should not allow client modification.
27: * </p>
28: *
29: * @author Ben Alex
30: * @version $Id: AccessControlEntry.java 1784 2007-02-24 21:00:24Z luke_t $
31: *
32: */
33: public interface AccessControlEntry {
34: //~ Methods ========================================================================================================
35:
36: Acl getAcl();
37:
38: /**
39: * Obtains an identifier that represents this ACE.
40: *
41: * @return the identifier, or <code>null</code> if unsaved
42: */
43: Serializable getId();
44:
45: Permission getPermission();
46:
47: Sid getSid();
48:
49: /**
50: * Indicates the a Permission is being granted to the relevant Sid. If false, indicates the permission is
51: * being revoked/blocked.
52: *
53: * @return true if being granted, false otherwise
54: */
55: boolean isGranting();
56: }
|