nbi.xmlsec.xacml.profile.rbac
Class RoleAssignmentPolicySet

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

public class RoleAssignmentPolicySet
extends RBACPolicySet

This class implements a role assignment policy set according to the XACML RBAC Profile. It administers role assigment policies, which may be represented as a PolicySetor parsed from a PolicySetrepresentation. NOTE: If a policyFinder is set, this method adds the policies of this set as PolicyReferenceobjects to this policy set. Otherwise, policies are added as Policyobjects.

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

Field Summary
(package private) static Logger logger
           
(package private)  PolicyFinder policyFinder
           
 
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicySet
REPRESENT_POLICIES_AS_NONE, REPRESENT_POLICIES_AS_POLICY, REPRESENT_POLICIES_AS_POLICYREF
 
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicy
elements, permitRule
 
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement
 
Constructor Summary
RoleAssignmentPolicySet(PolicySet policySet)
          Create an role assigment policy set from its PolicySet representation.
RoleAssignmentPolicySet(PolicySet policySet, PolicyFinder finder)
          Create an role assigment policy set from its PolicySet representation.
RoleAssignmentPolicySet(String domain, String label)
          Creates role assigment policy set from its identifier.
RoleAssignmentPolicySet(URI id)
          Creates role assigment policy set from its identifier.
 
Method Summary
 boolean add(Assignment element)
          Adds the assignment to the element's related role assignment policy of this role assignment policy set.
 boolean add(RBACPolicyElement element)
          If the element is an RoleAssignmentPolicy, the element is added to the set of elements.
 Set getAssignments()
          Gets the Assignments of the RoleAssignmentPolicies of this RoleAssignmentPolicySet.
 Set getRoleAssignmentPolicies()
          Gets the RoleAssignmentPolicies of this RoleAssignmentPolicySet.
 void parse(PolicyTreeElement element)
          Parses a roleassignment policy set from its PolicySet representation.
 void parse(Target target)
          Parses the target of an PermissionPolicySet.
 boolean remove(Assignment element)
          Removes the assignment from the role assignment policy of this role role assignment policy set.
 boolean remove(RBACPolicyElement element)
          If the element is an RoleAssignmentPolicy, the element is removed from the set of elements.
 Assignment searchAssignment(String label)
          Retrieves an assigment from an role assignment policy of this role assignment policy set.
 void setPolicyFinder(PolicyFinder policyFinder)
          Sets policyFinder
 
Methods inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicySet
encode, getPolicyRepresentationType, parse, setPolicyRepresentationType, toPolicyRerence, toPolicyTreeElement
 
Methods inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicy
encode, equals, getElements, isPermitRule, parse, search, search, setPermitRule, toPolicyRerence, toPolicyTreeElement
 
Methods inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement
getIdentifier, getTarget, hashCode, 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

policyFinder

PolicyFinder policyFinder
Constructor Detail

RoleAssignmentPolicySet

public RoleAssignmentPolicySet(String domain,
                               String label)
Creates role assigment policy set from its identifier. The default policy representation type is set to REPRESENT_POLICIES_AS_POLICYREF.

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

RoleAssignmentPolicySet

public RoleAssignmentPolicySet(URI id)
                        throws ParsingException
Creates role assigment policy set from its identifier. The default policy representation type is set to REPRESENT_POLICIES_AS_POLICYREF.

Parameters:
id - Identifier's URI representation.

RoleAssignmentPolicySet

public RoleAssignmentPolicySet(PolicySet policySet)
                        throws ParsingException
Create an role assigment policy set from its PolicySet representation. The first policy parsed determines the policy representation type of the policy set.

Parameters:
policySet - PolicySetrepresentation.

RoleAssignmentPolicySet

public RoleAssignmentPolicySet(PolicySet policySet,
                               PolicyFinder finder)
                        throws ParsingException
Create an role assigment policy set from its PolicySet representation. The first policy parsed determines the policy representation type of the policy set.

Parameters:
policySet - PolicySetrepresentation.
Method Detail

parse

public void parse(Target target)
           throws ParsingException
Parses the target of an PermissionPolicySet.

Overrides:
parse in class RBACPolicyElement
Parameters:
target - The target to parse.
Throws:
ParsingException - Signals errors during the parsing process.
See Also:
RBACPolicyElement.parse(com.sun.xacml.Target)

parse

public void parse(PolicyTreeElement element)
           throws ParsingException
Parses a roleassignment policy set from its PolicySet representation. The first policy parsed determines the policy representation type of the policy set.

Overrides:
parse in class RBACPolicySet
Parameters:
element - The policy set to parse.
Throws:
ParsingException - Indicates errors during the parsing process.

searchAssignment

public Assignment searchAssignment(String label)
Retrieves an assigment from an role assignment policy of this role assignment policy set.

Parameters:
label - The name of the assignment to search for.
Returns:
The assignemtn from the role assignment policy or null.
See Also:
RBACPolicy.search(Identifier).

add

public boolean add(RBACPolicyElement element)
If the element is an RoleAssignmentPolicy, 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 role assignment Policy was succesfully added, false otherwise.
See Also:
RBACPolicyElement.add(RBACPolicyElement)

add

public boolean add(Assignment element)
Adds the assignment to the element's related role assignment policy of this role assignment policy set. If the RoleAssignmentPolicy does not exist, it will be created and added to this RoleAssignmentPolicySet.

Parameters:
element - The assignment to add.
Returns:
true, if the element was succesfully added or successfully updates an existing element, false otherwise.
See Also:
RBACPolicy.remove(RBACPolicyElement).

remove

public boolean remove(Assignment element)
Removes the assignment from the role assignment policy of this role role assignment policy set.

Parameters:
element - The assignment to remove.
Returns:
true, if the element was succesfully removed or successfully updates an existing element, false otherwise.
See Also:
RBACPolicy.remove(RBACPolicyElement).

remove

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

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

setPolicyFinder

public void setPolicyFinder(PolicyFinder policyFinder)
Sets policyFinder

Parameters:
policyFinder - The policyFinder to set.

getAssignments

public Set getAssignments()
Gets the Assignments of the RoleAssignmentPolicies of this RoleAssignmentPolicySet.

Returns:
Set of Assignments or null, if no RoleAssignmentPolicy exists.

getRoleAssignmentPolicies

public Set getRoleAssignmentPolicies()
Gets the RoleAssignmentPolicies of this RoleAssignmentPolicySet.

Returns:
Set of RoleAssignmentPolicies or null, if no elements available.


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