Package com.netscape.cms.authorization
Class ACL
java.lang.Object
com.netscape.cms.authorization.ACL
- All Implemented Interfaces:
IACL
,Serializable
A class represents an access control list (ACL). An ACL
is associated with an protected resources. The policy
enforcer can verify the ACLs with the current
context to see if the corresponding resource is accessible.
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
- Version:
- $Revision$, $Date$
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkRight
(String permission) Tells if the permission is one of the defined "rights"entries()
Returns ACL entries.Retrieves the description of the resource governed by this access control.getName()
Retrieves the name of the resource governed by this access control.Retrieve an iterable of strings that were used to produce this ACL.void
Merge the rules of the other ACL into this one.static ACL
Parse ACL resource attributesrights()
Returns rights entries.toString()
Returns the string reprsentation.
-
Field Details
-
entries
-
rights
-
name
-
description
-
resourceACLs
-
-
Method Details
-
merge
Merge the rules of the other ACL into this one.- Throws:
IllegalArgumentException
- if the ACLs do not have the same name.
-
getName
Retrieves the name of the resource governed by this access control. -
getResourceACLs
Retrieve an iterable of strings that were used to produce this ACL.- Returns:
- Iterable of formatted ACLs
-
getDescription
Retrieves the description of the resource governed by this access control.- Specified by:
getDescription
in interfaceIACL
- Returns:
- Description of the protected resource
-
entries
Returns ACL entries. -
toString
Returns the string reprsentation. -
checkRight
Tells if the permission is one of the defined "rights"- Specified by:
checkRight
in interfaceIACL
- Parameters:
permission
- permission to be checked- Returns:
- true if it's one of the "rights"; false otherwise
-
rights
Returns rights entries. -
parseACL
Parse ACL resource attributes- Parameters:
resACLs
- same format as the resourceACLs attribute:- Returns:
- an ACL instance built from the parsed resACLs
- Throws:
EACLsException
- ACL related parsing errors for resACLs
-