public class PolicySet extends AbstractPolicy
| Constructor and Description |
|---|
PolicySet(URI id,
PolicyCombiningAlgorithm combiningAlg,
Target target)
Creates a new
PolicySet with only the required elements. |
PolicySet(URI id,
PolicyCombiningAlgorithm combiningAlg,
Target target,
List policies)
Creates a new
PolicySet with only the required elements,
plus some policies. |
PolicySet(URI id,
String version,
PolicyCombiningAlgorithm combiningAlg,
String description,
Target target,
List policies)
Creates a new
PolicySet with the required elements plus
some policies and a String description. |
PolicySet(URI id,
String version,
PolicyCombiningAlgorithm combiningAlg,
String description,
Target target,
List policies,
String defaultVersion)
Creates a new
PolicySet with the required elements plus
some policies, a String description, and policy defaults. |
PolicySet(URI id,
String version,
PolicyCombiningAlgorithm combiningAlg,
String description,
Target target,
List policies,
String defaultVersion,
Set obligations)
Creates a new
PolicySet with the required elements plus
some policies, a String description, policy defaults, and obligations. |
PolicySet(URI id,
String version,
PolicyCombiningAlgorithm combiningAlg,
String description,
Target target,
List policyElements,
String defaultVersion,
Set obligations,
List parameters)
Creates a new
PolicySet with the required and optional
elements. |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(OutputStream output)
Encodes this
PolicySet into its XML representation and
writes this encoding to the given OutputStream with no
indentation. |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this
PolicySet into its XML representation and
writes this encoding to the given OutputStream with
indentation. |
static PolicySet |
getInstance(Node root)
Creates an instance of a
PolicySet object based on a
DOM node. |
static PolicySet |
getInstance(Node root,
PolicyFinder finder)
Creates an instance of a
PolicySet object based on a
DOM node. |
String |
toString() |
encodeCommonElements, evaluate, getChildElements, getChildren, getCombiningAlg, getCombiningParameters, getDefaultVersion, getDescription, getId, getMetaData, getObligations, getTarget, getVersion, match, setChildrenpublic PolicySet(URI id, PolicyCombiningAlgorithm combiningAlg, Target target)
PolicySet with only the required elements.id - the policy set identifiercombiningAlg - the CombiningAlgorithm used on the
policies in this settarget - the Target for this setpublic PolicySet(URI id, PolicyCombiningAlgorithm combiningAlg, Target target, List policies)
PolicySet with only the required elements,
plus some policies.id - the policy set identifiercombiningAlg - the CombiningAlgorithm used on the
policies in this settarget - the Target for this setpolicies - a list of AbstractPolicy objectsIllegalArgumentException - if the List of policies
contains an object that is not an
AbstractPolicypublic PolicySet(URI id, String version, PolicyCombiningAlgorithm combiningAlg, String description, Target target, List policies)
PolicySet with the required elements plus
some policies and a String description.id - the policy set identifierversion - the policy version or null for the default (this is
always null for pre-2.0 policies)combiningAlg - the CombiningAlgorithm used on the
policies in this setdescription - a String describing the policytarget - the Target for this setpolicies - a list of AbstractPolicy objectsIllegalArgumentException - if the List of policies
contains an object that is not an
AbstractPolicypublic PolicySet(URI id, String version, PolicyCombiningAlgorithm combiningAlg, String description, Target target, List policies, String defaultVersion)
PolicySet with the required elements plus
some policies, a String description, and policy defaults.id - the policy set identifierversion - the policy version or null for the default (this is
always null for pre-2.0 policies)combiningAlg - the CombiningAlgorithm used on the
policies in this setdescription - a String describing the policytarget - the Target for this setpolicies - a list of AbstractPolicy objectsdefaultVersion - the XPath version to useIllegalArgumentException - if the List of policies
contains an object that is not an
AbstractPolicypublic PolicySet(URI id, String version, PolicyCombiningAlgorithm combiningAlg, String description, Target target, List policies, String defaultVersion, Set obligations)
PolicySet with the required elements plus
some policies, a String description, policy defaults, and obligations.id - the policy set identifierversion - the policy version or null for the default (this is
always null for pre-2.0 policies)combiningAlg - the CombiningAlgorithm used on the
policies in this setdescription - a String describing the policytarget - the Target for this setpolicies - a list of AbstractPolicy objectsdefaultVersion - the XPath version to useobligations - a set of Obligation objectsIllegalArgumentException - if the List of policies
contains an object that is not an
AbstractPolicypublic PolicySet(URI id, String version, PolicyCombiningAlgorithm combiningAlg, String description, Target target, List policyElements, String defaultVersion, Set obligations, List parameters)
PolicySet with the required and optional
elements. If you need to provide combining algorithm parameters, you
need to use this constructor. Note that unlike the other constructors
in this class, the policies list is actually a list of
CombinerElements used to match a policy with any
combiner parameters it may have.id - the policy set identifierversion - the policy version or null for the default (this is
always null for pre-2.0 policies)combiningAlg - the CombiningAlgorithm used on the
rules in this setdescription - a String describing the policy or
null if there is no descriptiontarget - the Target for this policypolicyElements - a list of CombinerElement objects or
null if there are no policiesdefaultVersion - the XPath version to use or null if there is
no default versionobligations - a set of Obligations objects or null
if there are no obligationsparameters - the List of
CombinerParameters provided for general
use by the combining algorithmIllegalArgumentException - if the List of rules
contains an object that is not a
Rulepublic static PolicySet getInstance(Node root) throws ParsingException
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.root - the DOM root of a PolicySetType XML typeParsingException - if the PolicySetType is invalidpublic static PolicySet getInstance(Node root, PolicyFinder finder) throws ParsingException
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.root - the DOM root of a PolicySetType XML typefinder - the PolicyFinder used to handle referencesParsingException - if the PolicySetType is invalidpublic void encode(OutputStream output)
PolicySet into its XML representation and
writes this encoding to the given OutputStream with no
indentation.output - a stream into which the XML-encoded data is writtenpublic void encode(OutputStream output, Indenter indenter)
PolicySet into its XML representation and
writes this encoding to the given OutputStream with
indentation.output - a stream into which the XML-encoded data is writtenindenter - an object that creates indentation stringsCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.