nbi.xmlsec.xacml.profile.rbac
Class RoleAssignmentPolicy

java.lang.Object
  extended bynbi.xmlsec.xacml.profile.rbac.RBACPolicyElement
      extended bynbi.xmlsec.xacml.profile.rbac.RBACPolicy
          extended bynbi.xmlsec.xacml.profile.rbac.RoleAssignmentPolicy

public class RoleAssignmentPolicy
extends RBACPolicy

This class implements a role assignment policy according to the XACML RBAC Profile. It administers subject-to-role assigments, which may be represented as a Policyor parsed from a Policy representation.

Since:
Version:
$Revision: 1.8 $
Author:
Lutz Suhrbier

Field Summary
(package private) static Logger logger
           
 
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicy
elements, permitRule
 
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement
 
Constructor Summary
RoleAssignmentPolicy(Policy policy)
          Create an Assigment instance from its Policy representation.
RoleAssignmentPolicy(PolicyReference policy)
          Create an Assigment instance from its Policy representation.
RoleAssignmentPolicy(String domain, String label)
          Creates role assigment policy with its identifier.
RoleAssignmentPolicy(URI id)
          Creates role assigment policy with its identifier.
 
Method Summary
 boolean add(RBACPolicyElement element)
          If the element is an Assignment, the element is added to the set of elements.
 Set getAssignments()
          Gets the assignments of this role.
 void parse(PolicyTreeElement element)
          Parses a role assignment policy from its Policy representation.
 boolean remove(RBACPolicyElement element)
          If the element is an Assignment, the element is removed from the set of elements.
 PolicyReference toPolicyReference()
          Returns the PolicyRefence to this the role assignment policy.
 PolicyTreeElement toPolicyTreeElement()
          Returns the Policy representation of the role assignment policy.
 
Methods inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicy
encode, encode, equals, getElements, isPermitRule, parse, search, search, setPermitRule, toPolicyRerence, toPolicyRerence, toPolicyTreeElement
 
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

logger

static Logger logger
Constructor Detail

RoleAssignmentPolicy

public RoleAssignmentPolicy(String domain,
                            String label)
Creates role assigment policy with its identifier.

Parameters:
domain - Identifier's domain.
label - Identifier's label.

RoleAssignmentPolicy

public RoleAssignmentPolicy(URI id)
                     throws ParsingException
Creates role assigment policy with its identifier.

Parameters:
id - Identifier's URI representation.

RoleAssignmentPolicy

public RoleAssignmentPolicy(Policy policy)
                     throws ParsingException
Create an Assigment instance from its Policy representation.

Parameters:
policy - Policyrepresentation.

RoleAssignmentPolicy

public RoleAssignmentPolicy(PolicyReference policy)
                     throws ParsingException
Create an Assigment instance from its Policy representation.

Parameters:
policy - Policyrepresentation.
Method Detail

parse

public void parse(PolicyTreeElement element)
           throws ParsingException
Parses a role assignment policy from its Policy representation.

Overrides:
parse in class RBACPolicy
Parameters:
element - The policy to parse.
Throws:
ParsingException - Indicates a malformed Policyrepresentation.

toPolicyTreeElement

public PolicyTreeElement toPolicyTreeElement()
Returns the Policy representation of the role assignment policy.

Overrides:
toPolicyTreeElement in class RBACPolicy
Returns:
The Policy representation.
See Also:
RBACPolicyElement.toPolicyTreeElement()

toPolicyReference

public PolicyReference toPolicyReference()
Returns the PolicyRefence to this the role assignment policy.

Returns:
The PolicyReference.

add

public boolean add(RBACPolicyElement element)
If the element is an Assignment, the element is added to the set of elements.

Overrides:
add in class RBACPolicy
Parameters:
element - The element to be added.
Returns:
true, if an assigment was succesfully added, false otherwise.
See Also:
RBACPolicyElement.add(RBACPolicyElement)

remove

public boolean remove(RBACPolicyElement element)
If the element is an Assignment, the element is removed from the set of elements.

Overrides:
remove in class RBACPolicy
Parameters:
element - The element to remove.
Returns:
true, if an assigment was succesfully removed, false otherwise.
See Also:
RBACPolicyElement.remove(RBACPolicyElement)

getAssignments

public Set getAssignments()
Gets the assignments of this role.

Returns:
Set of role assignments.


Copyright © 2006 Lutz Suhrbier, Freie Universität Berlin. All Rights Reserved.