nbi.xmlsec.xacml.builder
Class PolicySetBuilder

java.lang.Object
  extended bynbi.xmlsec.xacml.builder.AbstractPolicyTreeElementBuilder
      extended bynbi.xmlsec.xacml.builder.AbstractPolicyBuilder
          extended bynbi.xmlsec.xacml.builder.PolicySetBuilder
All Implemented Interfaces:
PolicyTreeElementBuilder, XACMLObjectBuilder

public class PolicySetBuilder
extends AbstractPolicyBuilder

Class to create policy set instances.

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

Field Summary
 
Fields inherited from class nbi.xmlsec.xacml.builder.AbstractPolicyBuilder
combiningAlg, defaultVersion, logger, obligations, treeElements
 
Fields inherited from class nbi.xmlsec.xacml.builder.AbstractPolicyTreeElementBuilder
description, identifier, target
 
Constructor Summary
PolicySetBuilder(URI identifier, PolicyCombiningAlgorithm combAlg)
          Creates a policy set builder instance.
 
Method Summary
 boolean add(AbstractPolicy policy)
          Adds a policy to this policy set.
 boolean add(AbstractPolicyBuilder policy)
          Adds a policy to this policy set.
 PolicyTreeElement getInstance()
          Createa a new policy set instance.
 boolean remove(AbstractPolicy policy)
          Adds a policy to this policy set.
 void setPolicies(List policies)
          Sets the policies of this policy set.
 
Methods inherited from class nbi.xmlsec.xacml.builder.AbstractPolicyBuilder
add, add, add, add, remove, remove, setCombiningAlg, setCombiningAlg, setCombiningAlg, setDefaultVersion, setObligations, setTreeElements
 
Methods inherited from class nbi.xmlsec.xacml.builder.AbstractPolicyTreeElementBuilder
setDescription, setIdentifier, setIdentifier, setTarget, setTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicySetBuilder

public PolicySetBuilder(URI identifier,
                        PolicyCombiningAlgorithm combAlg)
Creates a policy set builder instance.

Parameters:
identifier - policy set identifier.
combAlg - Policy combining Algorithm (DenyOverridesPolicyAlg, FirstApplicablePolicyAlg, OnlyOneApplicablePolicyAlg or PermitOverridesPolicyAlg).
Method Detail

getInstance

public PolicyTreeElement getInstance()
Createa a new policy set instance.

Specified by:
getInstance in interface PolicyTreeElementBuilder
Specified by:
getInstance in class AbstractPolicyTreeElementBuilder
See Also:
PolicyTreeElementBuilder.getInstance()

add

public boolean add(AbstractPolicy policy)
Adds a policy to this policy set.

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

add

public boolean add(AbstractPolicyBuilder policy)
Adds a policy to this policy set.

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

remove

public boolean remove(AbstractPolicy policy)
Adds a policy to this policy set.

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

setPolicies

public void setPolicies(List policies)
Sets the policies of this policy set.

Parameters:
policies - The policies to set.


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