|
SunTM's XACML Implementation for JavaTM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xacml.AbstractPolicy
com.sun.xacml.Policy
Represents one of the two top-level constructs in XACML, the PolicyType. This optionally contains rules, which in turn contain most of the logic of a policy.
Field Summary |
Fields inherited from class com.sun.xacml.AbstractPolicy |
XPATH_1_0_VERSION |
Constructor Summary | |
Policy(URI id,
RuleCombiningAlgorithm combiningAlg,
String description,
Target target,
List rules)
Creates a new Policy with the required elements plus
some rules and a String description. |
|
Policy(URI id,
RuleCombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion,
List rules)
Creates a new Policy with the required elements plus
some rules, a String description and policy defaults. |
|
Policy(URI id,
RuleCombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion,
List rules,
Set obligations)
Creates a new Policy with the required elements plus
some rules, a String description, policy defaults, and obligations. |
|
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 some rules. |
|
Policy(URI id,
RuleCombiningAlgorithm combiningAlg,
Target target,
String defaultVersion,
List rules)
Creates a new Policy with the required elements plus
some rules and policy defaults. |
Method Summary | |
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. |
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 |
public 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 some rules.
id
- the policy identifiercombiningAlg
- the CombiningAlgorithm
used on the
rules in this settarget
- the Target
for this policyrules
- a list of Rule
objects
IllegalArgumentException
- if the List
of rules
contains an object that is not a
Rule
public Policy(URI id, RuleCombiningAlgorithm combiningAlg, Target target, String defaultVersion, List rules)
Policy
with the required elements plus
some rules and policy defaults.
id
- the policy identifiercombiningAlg
- the CombiningAlgorithm
used on the
rules in this settarget
- the Target
for this policydefaultVersion
- the XPath version to userules
- a list of Rule
objects
IllegalArgumentException
- if the List
of rules
contains an object that is not a
Rule
public Policy(URI id, RuleCombiningAlgorithm combiningAlg, String description, Target target, List rules)
Policy
with the required elements plus
some rules and a String description.
id
- the policy identifiercombiningAlg
- the CombiningAlgorithm
used on the
rules in this setdescription
- a String
describing the policytarget
- the Target
for this policyrules
- a list of Rule
objects
IllegalArgumentException
- if the List
of rules
contains an object that is not a
Rule
public Policy(URI id, RuleCombiningAlgorithm combiningAlg, String description, Target target, String defaultVersion, List rules)
Policy
with the required elements plus
some rules, a String description and policy defaults.
id
- the policy identifiercombiningAlg
- 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
objects
IllegalArgumentException
- if the List
of rules
contains an object that is not a
Rule
public Policy(URI id, RuleCombiningAlgorithm combiningAlg, String description, Target target, String defaultVersion, List rules, Set obligations)
Policy
with the required elements plus
some rules, a String description, policy defaults, and obligations.
id
- the policy identifiercombiningAlg
- 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
objects
IllegalArgumentException
- if the List
of rules
contains an object that is not a
Rule
Method Detail |
public 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 type
ParsingException
- if the PolicyType is invalidpublic 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 strings
|
Sun's XACML Implementation Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.