|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement nbi.xmlsec.xacml.profile.rbac.Assignment
This class implements a role assignment rule according to the XACML RBAC
Profile. It assigns subjects to a role. Currently, only subjects with X500
names are supported. The assignment may be represented as a Rule
or parsed from a Rule
representation.
Field Summary | |
static URI |
enableRoleActionId
This identifier MAY be used as the |
(package private) static Logger |
logger
|
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement |
|
Constructor Summary | |
Assignment(Rule rule)
Create an Assigment instance from its Rule representation. |
|
Assignment(String domain,
String label,
RoleValueIdentifier roleId)
Create an Assigment instance. |
|
Assignment(URI assignmentId,
RoleValueIdentifier roleId)
Create an Assigment instance. |
Method Summary | |
boolean |
add(RBACPolicyElement element)
Adds the subjects of another Assignment to the subjects of this assignment. |
boolean |
add(Set subjects)
Adds a set of subjects to this assigment. |
boolean |
add(X500Principal subject)
Adds an X500Principal subject to the subject set. |
private void |
checkTargetActions(List actions)
|
boolean |
equals(Object obj)
Compares the specified object with this assignment. |
URI |
getEnableRoleActionId()
Gets the EnableRoelActionId from the target. |
RoleValueIdentifier |
getRoleIdentifier()
Gets the role identifier of this assignment. |
HashSet |
getSubjects()
Gets the assigned subjects of this this assignment. |
void |
parse(PolicyTreeElement element)
Parses an assignment from its Rule representation. |
private void |
parseTargetResources(List resources)
|
boolean |
remove(RBACPolicyElement element)
Removes the subjects of another Assignment from the subjects of this assignment. |
boolean |
remove(Set subjects)
Removes a set of subjects from this assigment. |
boolean |
remove(X500Principal subject)
Removes an X500Principal subject to the subject set. |
protected void |
setEnableRoleActionId()
Sets the EnableRoelActionId on the target. |
void |
setRoleIdentifier(RoleValueIdentifier roleId)
Sets the role identifier of this assignment. |
void |
setRoleIdentifier(URI roleId)
Sets the role identifier of this assignment. |
PolicyTreeElement |
toPolicyTreeElement()
Returns the Rule representation of the assignment. |
Methods inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement |
getIdentifier, getTarget, hashCode, parse, setIdentifier, setIdentifier, setTarget, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
static Logger logger
public static final URI enableRoleActionId
Constructor Detail |
public Assignment(String domain, String label, RoleValueIdentifier roleId)
domain
- Domain of the assignment identifier.label
- Label of the assignment identifier.roleId
- RolePolicySet for this assignment.public Assignment(URI assignmentId, RoleValueIdentifier roleId) throws ParsingException
assignmentId
- Assignment identifier (domain:assignment:label).roleId
- RolePolicySet for this assignment.public Assignment(Rule rule) throws ParsingException
Rule
representation.
rule
- Rule
representation.Method Detail |
public boolean add(Set subjects)
subjects
- The subjects to add.
true
if the subjects has been added succesfully,
false
otherwise.public boolean remove(Set subjects)
subjects
- The subjects to add.
true
if the subjects has been added succesfully,
false
otherwise.public boolean add(X500Principal subject)
subject
- The subject to add.
true
if the subject has been added succesfully,
false
otherwise.public boolean remove(X500Principal subject)
subject
- The subject to remove.
true
if the subject has been removed succesfully,
false
otherwise.public boolean add(RBACPolicyElement element)
add
in class RBACPolicyElement
element
- The assignment to add.
true
if the assignment has been added succesfully,
false
otherwise.RBACPolicyElement.add(RBACPolicyElement)
public boolean remove(RBACPolicyElement element)
remove
in class RBACPolicyElement
element
- The assignment to remove.
true
if the assignment has been removed succesfully,
false
otherwise.RBACPolicyElement.remove(RBACPolicyElement)
public PolicyTreeElement toPolicyTreeElement()
Rule
representation of the assignment.
toPolicyTreeElement
in class RBACPolicyElement
public void parse(PolicyTreeElement element) throws ParsingException
Rule
representation.
parse
in class RBACPolicyElement
element
- The rule to parse.
ParsingException
- Indicates a malformed Rule
representation.private void parseTargetResources(List resources) throws ParsingException
ParsingException
private void checkTargetActions(List actions) throws ParsingException
ParsingException
public URI getEnableRoleActionId()
protected void setEnableRoleActionId()
public RoleValueIdentifier getRoleIdentifier()
public void setRoleIdentifier(RoleValueIdentifier roleId)
roleId
- The assignment's role identifier.public void setRoleIdentifier(URI roleId) throws ParsingException
roleId
- The assignment's role identifier.
ParsingException
- Indicates a malformed
RoleValueIdentifier
representation.public HashSet getSubjects()
public boolean equals(Object obj)
equals
in class RBACPolicyElement
obj
- Object to be compared for equality with this assignment.
true
if the specified Object is equal to this
assignment.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |