Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml
Class PolicySet  view PolicySet download PolicySet.java

java.lang.Object
  extended bycom.sun.xacml.AbstractPolicy
      extended bycom.sun.xacml.PolicySet
All Implemented Interfaces:
PolicyTreeElement

public class PolicySet
extends AbstractPolicy

Represents one of the two top-level constructs in XACML, the PolicySetType. This can contain other policies and policy sets, and can also contain URIs that point to policies and policy sets.

Since:
1.0

Field Summary
 
Fields inherited from class com.sun.xacml.AbstractPolicy
XPATH_1_0_VERSION
 
Constructor Summary
private PolicySet(org.w3c.dom.Node root, com.sun.xacml.finder.PolicyFinder finder)
          Creates a new PolicySet based on the given root node.
  PolicySet(java.net.URI id, com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg, java.lang.String description, Target target, java.util.List policies)
          Creates a new PolicySet with the required elements plus some policies and a String description.
  PolicySet(java.net.URI id, com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg, java.lang.String description, Target target, java.util.List policies, java.lang.String defaultVersion)
          Creates a new PolicySet with the required elements plus some policies, a String description, and policy defaults.
  PolicySet(java.net.URI id, com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg, java.lang.String description, Target target, java.util.List policies, java.lang.String defaultVersion, java.util.Set obligations)
          Creates a new PolicySet with the required elements plus some policies, a String description, policy defaults, and obligations.
  PolicySet(java.net.URI id, com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg, Target target)
          Creates a new PolicySet with only the required elements.
  PolicySet(java.net.URI id, com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg, Target target, java.util.List policies)
          Creates a new PolicySet with only the required elements, plus some policies.
  PolicySet(java.net.URI id, com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg, Target target, java.util.List policies, java.lang.String defaultVersion)
          Creates a new PolicySet with the required elements plus some policies and policy defaults.
 
Method Summary
 void encode(java.io.OutputStream output)
          Encodes this PolicySet into its XML representation and writes this encoding to the given OutputStream with no indentation.
 void encode(java.io.OutputStream output, Indenter indenter)
          Encodes this PolicySet into its XML representation and writes this encoding to the given OutputStream with indentation.
static PolicySet getInstance(org.w3c.dom.Node root)
          Creates an instance of a PolicySet object based on a DOM node.
static PolicySet getInstance(org.w3c.dom.Node root, com.sun.xacml.finder.PolicyFinder finder)
          Creates an instance of a PolicySet object based on a DOM node.
 
Methods inherited from class com.sun.xacml.AbstractPolicy
encodeCommonElements, evaluate, getChildren, getCombiningAlg, getDefaultVersion, getDescription, getId, getObligations, getTarget, match, setChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicySet

public PolicySet(java.net.URI id,
                 com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg,
                 Target target)
Creates a new PolicySet with only the required elements.


PolicySet

public PolicySet(java.net.URI id,
                 com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg,
                 Target target,
                 java.util.List policies)
Creates a new PolicySet with only the required elements, plus some policies.


PolicySet

public PolicySet(java.net.URI id,
                 com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg,
                 Target target,
                 java.util.List policies,
                 java.lang.String defaultVersion)
Creates a new PolicySet with the required elements plus some policies and policy defaults.


PolicySet

public PolicySet(java.net.URI id,
                 com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg,
                 java.lang.String description,
                 Target target,
                 java.util.List policies)
Creates a new PolicySet with the required elements plus some policies and a String description.


PolicySet

public PolicySet(java.net.URI id,
                 com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg,
                 java.lang.String description,
                 Target target,
                 java.util.List policies,
                 java.lang.String defaultVersion)
Creates a new PolicySet with the required elements plus some policies, a String description, and policy defaults.


PolicySet

public PolicySet(java.net.URI id,
                 com.sun.xacml.combine.PolicyCombiningAlgorithm combiningAlg,
                 java.lang.String description,
                 Target target,
                 java.util.List policies,
                 java.lang.String defaultVersion,
                 java.util.Set obligations)
Creates a new PolicySet with the required elements plus some policies, a String description, policy defaults, and obligations.


PolicySet

private PolicySet(org.w3c.dom.Node root,
                  com.sun.xacml.finder.PolicyFinder finder)
           throws ParsingException
Creates a new PolicySet based on the given root node. This is private since every class is supposed to use a getInstance() method to construct from a Node, but since we want some common code in the parent class, we need this functionality in a constructor.

Method Detail

getInstance

public static PolicySet getInstance(org.w3c.dom.Node root)
                             throws ParsingException
Creates an instance of a PolicySet object based on a DOM node. The node must be the root of PolicySetType XML object, otherwise an exception is thrown. This PolicySet will not support references because it has no PolicyFinder.


getInstance

public static PolicySet getInstance(org.w3c.dom.Node root,
                                    com.sun.xacml.finder.PolicyFinder finder)
                             throws ParsingException
Creates an instance of a PolicySet object based on a DOM node. The node must be the root of PolicySetType XML object, otherwise an exception is thrown. The finder is used to handle policy references.


encode

public void encode(java.io.OutputStream output)
Encodes this PolicySet into its XML representation and writes this encoding to the given OutputStream with no indentation.


encode

public void encode(java.io.OutputStream output,
                   Indenter indenter)
Encodes this PolicySet into its XML representation and writes this encoding to the given OutputStream with indentation.