public class ACL extends java.lang.Object implements IACL, java.io.Serializable
An ACL
may contain one or more ACLEntry
. However, in case of multiple ACLEntry
, a subject must pass ALL of the ACLEntry
evaluation for permission to be granted
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
description |
protected java.util.Vector<ACLEntry> |
entries |
protected java.lang.String |
name |
protected java.util.TreeSet<java.lang.String> |
resourceACLs |
protected java.util.TreeSet<java.lang.String> |
rights |
Modifier and Type | Method and Description |
---|---|
boolean |
checkRight(java.lang.String permission)
Tells if the permission is one of the defined "rights"
|
java.util.Enumeration<ACLEntry> |
entries()
Returns ACL entries.
|
java.lang.String |
getDescription()
Retrieves the description of the resource governed by
this access control.
|
java.lang.String |
getName()
Retrieves the name of the resource governed by
this access control.
|
java.lang.Iterable<java.lang.String> |
getResourceACLs()
Retrieve an iterable of strings that were used to produce this ACL.
|
void |
merge(ACL other)
Merge the rules of the other ACL into this one.
|
static ACL |
parseACL(java.lang.String resACLs)
Parse ACL resource attributes
|
java.util.Enumeration<java.lang.String> |
rights()
Returns rights entries.
|
java.lang.String |
toString()
Returns the string reprsentation.
|
protected java.util.Vector<ACLEntry> entries
protected java.util.TreeSet<java.lang.String> rights
protected java.lang.String name
protected java.lang.String description
protected java.util.TreeSet<java.lang.String> resourceACLs
public void merge(ACL other)
java.lang.IllegalArgumentException
- if the ACLs do not have the same name.public java.lang.String getName()
public java.lang.Iterable<java.lang.String> getResourceACLs()
public java.lang.String getDescription()
getDescription
in interface IACL
public java.util.Enumeration<ACLEntry> entries()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean checkRight(java.lang.String permission)
checkRight
in interface IACL
permission
- permission to be checkedpublic java.util.Enumeration<java.lang.String> rights()
public static ACL parseACL(java.lang.String resACLs) throws EACLsException
resACLs
- same format as the resourceACLs attribute:
: : ( )
EACLsException
- ACL related parsing errors for resACLs