nbi.xmlsec.xacml.builder
Class AbstractPolicyBuilder

java.lang.Object
  extended bynbi.xmlsec.xacml.builder.AbstractPolicyTreeElementBuilder
      extended bynbi.xmlsec.xacml.builder.AbstractPolicyBuilder
All Implemented Interfaces:
PolicyTreeElementBuilder, XACMLObjectBuilder
Direct Known Subclasses:
PolicyBuilder, PolicyReferenceBuilder, PolicySetBuilder, PolicySetReferenceBuilder

public abstract class AbstractPolicyBuilder
extends AbstractPolicyTreeElementBuilder

Abstract base class for all policy building classes.

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

Field Summary
protected  CombiningAlgorithm combiningAlg
          The combining algorithm to use
protected  String defaultVersion
          the XPath version to use for selectors
(package private) static Logger logger
           
protected  Set obligations
          The policy's obligations
protected  List treeElements
          The policy's subelements
 
Fields inherited from class nbi.xmlsec.xacml.builder.AbstractPolicyTreeElementBuilder
description, identifier, target
 
Constructor Summary
protected AbstractPolicyBuilder()
          Default constructor.
 
Method Summary
protected  boolean add(AbstractPolicyTreeElementBuilder element)
          Adds a tree element to this policy.
 boolean add(Obligation obligation)
          Adds an obligation to the policy's obligations.
 boolean add(ObligationBuilder obligation)
          Adds an obligation to the policy's obligation set.
protected  boolean add(PolicyTreeElement element)
          Adds a tree element to this policy.
 boolean remove(Obligation obligation)
          Removes an obligation from the policy's obligation set.
protected  boolean remove(PolicyTreeElement element)
          Removes a tree element from this policy.
 void setCombiningAlg(CombiningAlgorithm combiningAlg)
          Sets the policy's combining algorithm.
 void setCombiningAlg(String combiningAlgId)
          Sets the policy's combining algorithm.
 void setCombiningAlg(URI combiningAlgId)
          Sets the policy's combining algorithm.
 void setDefaultVersion(String defaultVersion)
          Sets the XPath version to use for selectors
 void setObligations(Set obligations)
          Sets obligations
protected  void setTreeElements(List elements)
          Sets the treeElements of this policy.
 
Methods inherited from class nbi.xmlsec.xacml.builder.AbstractPolicyTreeElementBuilder
getInstance, setDescription, setIdentifier, setIdentifier, setTarget, setTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static Logger logger

defaultVersion

protected String defaultVersion
the XPath version to use for selectors


combiningAlg

protected CombiningAlgorithm combiningAlg
The combining algorithm to use


treeElements

protected List treeElements
The policy's subelements


obligations

protected Set obligations
The policy's obligations

Constructor Detail

AbstractPolicyBuilder

protected AbstractPolicyBuilder()
Default constructor.

Method Detail

setCombiningAlg

public void setCombiningAlg(CombiningAlgorithm combiningAlg)
Sets the policy's combining algorithm.

Parameters:
combiningAlg - The combining algorithm to set.

setCombiningAlg

public void setCombiningAlg(URI combiningAlgId)
                     throws UnknownIdentifierException
Sets the policy's combining algorithm.

Parameters:
combiningAlgId - The identifier of the combining algorithm to set.
Throws:
UnknownIdentifierException
See Also:
CombiningAlgFactory.createAlgorithm(java.net.URI).

setCombiningAlg

public void setCombiningAlg(String combiningAlgId)
                     throws UnknownIdentifierException
Sets the policy's combining algorithm.

Parameters:
combiningAlgId - The identifier of the combining algorithm to set.
Throws:
UnknownIdentifierException
See Also:
CombiningAlgFactory.createAlgorithm(java.net.URI).

setDefaultVersion

public void setDefaultVersion(String defaultVersion)
Sets the XPath version to use for selectors

Parameters:
defaultVersion - the XPath version to use for selectors.

add

public boolean add(Obligation obligation)
Adds an obligation to the policy's obligations.

Parameters:
obligation - The policy's obligations to set.
Returns:
true if the obligation has been added succesfully.

add

public boolean add(ObligationBuilder obligation)
Adds an obligation to the policy's obligation set.

Parameters:
obligation - The policy's obligation to set.
Returns:
true if the obligation has been added succesfully.

remove

public boolean remove(Obligation obligation)
Removes an obligation from the policy's obligation set.

Parameters:
obligation - The policy's obligation to remove.
Returns:
true if the obligation has been removed succesfully.

setObligations

public void setObligations(Set obligations)
Sets obligations

Parameters:
obligations - The obligations to set.

add

protected boolean add(PolicyTreeElement element)
Adds a tree element to this policy.

Parameters:
element - The tree element to add.
Returns:
true if the tree element has been added succesfully.

add

protected boolean add(AbstractPolicyTreeElementBuilder element)
Adds a tree element to this policy.

Parameters:
element - The tree element to add.
Returns:
true if the tree element has been added succesfully.

remove

protected boolean remove(PolicyTreeElement element)
Removes a tree element from this policy.

Parameters:
element - The tree element to remove.
Returns:
true if the tree element has been removed succesfully.

setTreeElements

protected void setTreeElements(List elements)
Sets the treeElements of this policy.

Parameters:
elements - The policies to set.


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