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.lang.String |
resourceACLs |
protected java.util.TreeSet<java.lang.String> |
rights |
Constructor and Description |
---|
ACL()
Class constructor.
|
ACL(java.lang.String name,
java.util.Collection<java.lang.String> rights,
java.lang.String resourceACLs)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(ACLEntry entry)
Adds an ACL entry to this list.
|
void |
addRight(java.lang.String right)
Adds an rights entry to this list.
|
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.String |
getResourceACLs()
Retrieves the exact string of the resourceACLs
|
java.util.Enumeration<java.lang.String> |
rights()
Returns rights entries.
|
void |
setDescription(java.lang.String description)
Sets the description of the resource governed by this
access control.
|
void |
setName(java.lang.String name)
Sets the name of the resource governed by this
access control.
|
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 resourceACLs
protected java.lang.String name
protected java.lang.String description
public ACL()
public ACL(java.lang.String name, java.util.Collection<java.lang.String> rights, java.lang.String resourceACLs)
name
- resource namerights
- applicable rights defined for this resourceresourceACLs
- the entire ACL specification. For example:
"certServer.log.configuration:read,modify:
allow (read,modify)
group=\"Administrators\":
Allow administrators to read and modify log
configuration"public void setName(java.lang.String name)
name
- name of the resourcepublic java.lang.String getName()
public java.lang.String getResourceACLs()
public void setDescription(java.lang.String description)
description
- Description of the protected resourcepublic java.lang.String getDescription()
getDescription
in interface IACL
public void addEntry(ACLEntry entry)
entry
- the ACLEntry
to be added to this resourcepublic java.util.Enumeration<ACLEntry> entries()
public java.lang.String toString()
toString
in class java.lang.Object
public void addRight(java.lang.String right)
right
- The right to be added for this ACLpublic boolean checkRight(java.lang.String permission)
checkRight
in interface IACL
permission
- permission to be checked