public interface AclEntry extends Cloneable
An AclEntry is a list of the Permissions that are
granted (positive) or denied (negative) to a Principal.
| Modifier and Type | Method and Description |
|---|---|
boolean |
addPermission(Permission permission)
Adds the specified permission to this ACL entry.
|
boolean |
checkPermission(Permission permission)
Checks whether the specified permission is in this ACL entry.
|
Object |
clone()
Clones this ACL entry instance.
|
Principal |
getPrincipal()
Returns the principal of this ACL entry.
|
boolean |
isNegative()
Returns whether this ACL entry is negative.
|
Enumeration<Permission> |
permissions()
Returns the list of permissions of this ACL entry.
|
boolean |
removePermission(Permission permission)
Removes the specified permission from this ACL entry.
|
void |
setNegativePermissions()
Sets this ACL entry to be negative.
|
boolean |
setPrincipal(Principal user)
Set the principal for this ACL entry.
|
String |
toString()
Returns the string representation of this ACL entry.
|
boolean setPrincipal(Principal user)
The principal for an ACL entry can only be set once.
user - the principal for this ACL entry.true on success, false if there is a principal already set for
this entry.Principal getPrincipal()
void setNegativePermissions()
The permissions in this ACL entry will be denied to the principal associated with this entry.
Note: An ACL entry is positive by default and can only become negative by calling this method.
boolean isNegative()
true if this ACL entry is negative, false if it's positive.boolean addPermission(Permission permission)
permission - the permission to be added.true if the specified permission is added, false if the
permission was already in this entry.boolean removePermission(Permission permission)
permission - the permission to be removed.true if the permission is removed, false if the permission was
not in this entry.boolean checkPermission(Permission permission)
permission - the permission to check.true if the permission is in this entry, otherwise false.Enumeration<Permission> permissions()
String toString()
Object clone()