Methods Summary |
---|
public boolean | addEntry(java.security.Principal caller, AclEntry entry)Adds an {@code AclEntry} to this ACL instance.
If the ACL already has an {@code AclEntry} of the same type (
positive or negative) and principal, then the new entry is not added.
|
public boolean | checkPermission(java.security.Principal principal, Permission permission)Checks whether the specified principal is granted the specified
permission.
The list of granted permissions is determined according to the rules
specified by {@code getPermissions}.
|
public java.util.Enumeration | entries()Returns an {@code Enumeration} of the {@code AclEntry} of this
ACL.
|
public java.lang.String | getName()Returns the name of this ACL instance.
|
public java.util.Enumeration | getPermissions(java.security.Principal user)Returns the set of allowed permissions for the specified {@code
Principal}.
If the specified principal has no entry in this ACL, an empty set is
returned.
The allowed permissions are collected according to the following rules:
- The two permission lists (positive and negative) of the
principal's groups ({@link Group}) are collected. The positive (granted)
permissions are the union of all group's positive permissions that the
principal belongs to, the negative (denied) permissions are the union of
all group's negative permissions that the principal belongs to. If a
specific permission is in both the positive and the negative list, it is
removed from both lists.
- The individual permissions (positive and negative) of
the principal override the group permissions. The positive individual
permissions override the group's negative permissions and the negative
individual permissions override the grpup's positive permissions.
|
public boolean | removeEntry(java.security.Principal caller, AclEntry entry)Removes an {@code AclEntry} from this ACL instance.
|
public void | setName(java.security.Principal caller, java.lang.String name)Sets the name of this ACL instance.
|
public java.lang.String | toString()Returns the string representation of this ACL.
|