public class Policy extends AbstractPolicy
| Constructor and Description |
|---|
Policy(URI id,
RuleCombiningAlgorithm combiningAlg,
Target target)
Creates a new
Policy with only the required elements. |
Policy(URI id,
RuleCombiningAlgorithm combiningAlg,
Target target,
List rules)
Creates a new
Policy with only the required elements
plus rules. |
Policy(URI id,
String version,
RuleCombiningAlgorithm combiningAlg,
String description,
Target target,
List rules)
Creates a new
Policy with the required elements plus
a version, rules, and a String description. |
Policy(URI id,
String version,
RuleCombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion,
List rules)
Creates a new
Policy with the required elements plus
a version, rules, a String description and policy defaults. |
Policy(URI id,
String version,
RuleCombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion,
List rules,
Set obligations)
Creates a new
Policy with the required elements plus
a version, rules, a String description, policy defaults, and
obligations. |
Policy(URI id,
String version,
RuleCombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion,
List rules,
Set obligations,
Set definitions)
Creates a new
Policy with the required elements plus
a version, rules, a String description, policy defaults, obligations,
and variable definitions. |
Policy(URI id,
String version,
RuleCombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion,
List ruleElements,
Set obligations,
Set definitions,
List parameters)
Creates a new
Policy with the required and optional
elements. |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(OutputStream output)
Encodes this
Policy into its XML representation and writes
this encoding to the given OutputStream with no
indentation. |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this
Policy into its XML representation and writes
this encoding to the given OutputStream with
indentation. |
static Policy |
getInstance(Node root)
Creates an instance of a
Policy object based on a
DOM node. |
Set |
getVariableDefinitions()
Returns the variable definitions in this Policy.
|
encodeCommonElements, evaluate, getChildElements, getChildren, getCombiningAlg, getCombiningParameters, getDefaultVersion, getDescription, getId, getMetaData, getObligations, getTarget, getVersion, match, setChildrenpublic Policy(URI id, RuleCombiningAlgorithm combiningAlg, Target target)
Policy with only the required elements.id - the policy identifiercombiningAlg - the CombiningAlgorithm used on the
rules in this settarget - the Target for this policypublic Policy(URI id, RuleCombiningAlgorithm combiningAlg, Target target, List rules)
Policy with only the required elements
plus rules.id - the policy identifiercombiningAlg - the CombiningAlgorithm used on the
rules in this settarget - the Target for this policyrules - a list of Rule objectsIllegalArgumentException - if the List of rules
contains an object that is not a
Rulepublic Policy(URI id, String version, RuleCombiningAlgorithm combiningAlg, String description, Target target, List rules)
Policy with the required elements plus
a version, rules, and a String description. Note that the version
is an XACML 2.0 feature.id - the policy identifierversion - the policy version or null for the default (this must
always be null for XACML 1.x policies)combiningAlg - the CombiningAlgorithm used on the
rules in this setdescription - a String describing the policytarget - the Target for this policyrules - a list of Rule objectsIllegalArgumentException - if the List of rules
contains an object that is not a
Rulepublic Policy(URI id, String version, RuleCombiningAlgorithm combiningAlg, String description, Target target, String defaultVersion, List rules)
Policy with the required elements plus
a version, rules, a String description and policy defaults. Note that
the version is an XACML 2.0 feature.id - the policy identifierversion - the policy version or null for the default (this must
always be null for XACML 1.x policies)combiningAlg - the CombiningAlgorithm used on the
rules in this setdescription - a String describing the policytarget - the Target for this policydefaultVersion - the XPath version to userules - a list of Rule objectsIllegalArgumentException - if the List of rules
contains an object that is not a
Rulepublic Policy(URI id, String version, RuleCombiningAlgorithm combiningAlg, String description, Target target, String defaultVersion, List rules, Set obligations)
Policy with the required elements plus
a version, rules, a String description, policy defaults, and
obligations. Note that the version is an XACML 2.0 feature.id - the policy identifierversion - the policy version or null for the default (this must
always be null for XACML 1.x policies)combiningAlg - the CombiningAlgorithm used on the
rules in this setdescription - a String describing the policytarget - the Target for this policydefaultVersion - the XPath version to userules - a list of Rule objectsobligations - a set of Obligations objectsIllegalArgumentException - if the List of rules
contains an object that is not a
Rulepublic Policy(URI id, String version, RuleCombiningAlgorithm combiningAlg, String description, Target target, String defaultVersion, List rules, Set obligations, Set definitions)
Policy with the required elements plus
a version, rules, a String description, policy defaults, obligations,
and variable definitions. Note that the version and definitions are
XACML 2.0 features.id - the policy identifierversion - the policy version or null for the default (this must
always be null for XACML 1.x policies)combiningAlg - the CombiningAlgorithm used on the
rules in this setdescription - a String describing the policytarget - the Target for this policydefaultVersion - the XPath version to userules - a list of Rule objectsobligations - a set of Obligations objectsdefinitions - a set of VariableDefinition objects
that must provide all definitions referenced by
all VariableReferences in the policyIllegalArgumentException - if the List of rules
contains an object that is not a
Rulepublic Policy(URI id, String version, RuleCombiningAlgorithm combiningAlg, String description, Target target, String defaultVersion, List ruleElements, Set obligations, Set definitions, List parameters)
Policy 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 rules list is actually a list of
CombinerElements used to match a rule with any
combiner parameters it may have.id - the policy identifierversion - the policy version or null for the default (this must
always be null for XACML 1.x 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 policydefaultVersion - the XPath version to use or null if there is
no default versionruleElements - a list of RuleCombinerElement objects
or null if there are no rulesobligations - a set of Obligations objects or null
if there are no obligationsdefinitions - a set of VariableDefinition objects
that must provide all definitions referenced by
all VariableReferences in the policyparameters - the List of
CombinerParameters provided for general
use by the combining algorithmIllegalArgumentException - if the List of rules
contains an object that is not a
RuleCombinerElementpublic static Policy getInstance(Node root) throws ParsingException
Policy object based on a
DOM node. The node must be the root of PolicyType XML object,
otherwise an exception is thrown.root - the DOM root of a PolicyType XML typeParsingException - if the PolicyType is invalidpublic Set getVariableDefinitions()
Set of VariableDefinitionspublic void encode(OutputStream output)
Policy 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)
Policy 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.