|
SunTM's XACML Implementation for JavaTM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.xacml.cond.Apply
Represents the XACML ApplyType and ConditionType XML types.
Constructor Summary | |
Apply(Function function,
List evals,
boolean isCondition)
Constructs an Apply object. |
|
Apply(Function function,
List evals,
Function bagFunction,
boolean isCondition)
Constructs an Apply object that contains a higher-order
bag function. |
Method Summary | |
void |
encode(OutputStream output)
Encodes this Apply into its XML representation and
writes this encoding to the given OutputStream with no
indentation. |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this Apply into its XML representation and
writes this encoding to the given OutputStream with
indentation. |
EvaluationResult |
evaluate(EvaluationCtx context)
Evaluates the apply object using the given function. |
boolean |
evaluatesToBag()
Returns whether or not the Function will return a bag
of values on evaluation. |
List |
getChildren()
Returns the List of children for this Apply . |
static Apply |
getConditionInstance(Node root,
String xpathVersion)
Returns an instance of an Apply based on the given DOM
root node. |
Function |
getFunction()
Returns the Function used by this Apply . |
Function |
getHigherOrderFunction()
Returns the higher order bag function used by this Apply
if it exists, or null if no higher order function is used. |
static Apply |
getInstance(Node root,
String xpathVersion)
Returns an instance of Apply based on the given DOM root. |
URI |
getType()
Returns the type of attribute that this object will return on a call to evaluate . |
boolean |
isCondition()
Returns whether or not this ApplyType is actually a ConditionType. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Apply(Function function, List evals, boolean isCondition) throws IllegalArgumentException
Apply
object. Throws an
IllegalArgumentException
if the given parameter list
isn't valid for the given function.
function
- the Function
to use in evaluating the
elements in the applyevals
- the contents of the apply which will be the parameters
to the function, each of which is an
Evaluatable
isCondition
- true if this Apply
is a Condition,
false otherwisepublic Apply(Function function, List evals, Function bagFunction, boolean isCondition) throws IllegalArgumentException
Apply
object that contains a higher-order
bag function. Throws an IllegalArgumentException
if the
given parameter list isn't valid for the given function.
function
- the Function
to use in evaluating the
elements in the applyevals
- the contents of the apply which will be the parameters
to the function, each of which is an
Evaluatable
bagFunction
- the higher-order function to useisCondition
- true if this Apply
is a Condition,
false otherwiseMethod Detail |
public static Apply getConditionInstance(Node root, String xpathVersion) throws ParsingException
Apply
based on the given DOM
root node. This will actually return a special kind of
Apply
, namely an XML ConditionType, which is the root
of the condition logic in a RuleType. A ConditionType is the same
as an ApplyType except that it must use a FunctionId that returns
a boolean value.
root
- the DOM root of a ConditionType XML typexpathVersion
- the XPath version to use in any selectors or XPath
functions, or null if this is unspecified (ie, not
supplied in the defaults section of the policy)
ParsingException
- if this is not a valid ConditionTypepublic static Apply getInstance(Node root, String xpathVersion) throws ParsingException
Apply
based on the given DOM root.
root
- the DOM root of an ApplyType XML typexpathVersion
- the XPath version to use in any selectors or XPath
functions, or null if this is unspecified (ie, not
supplied in the defaults section of the policy)
ParsingException
- if this is not a valid ApplyTypepublic Function getFunction()
Function
used by this Apply
.
Function
public List getChildren()
List
of children for this Apply
.
The List
contains Evaluatable
s. The list is
unmodifiable, and may be empty.
getChildren
in interface Evaluatable
List
of Evaluatable
spublic Function getHigherOrderFunction()
Apply
if it exists, or null if no higher order function is used.
Function
or nullpublic boolean isCondition()
public EvaluationResult evaluate(EvaluationCtx context)
Apply
objects.
evaluate
in interface Evaluatable
context
- the representation of the request
public URI getType()
evaluate
. In practice, this will always be the same as
the result of calling getReturnType
on the function used
by this object.
getType
in interface Evaluatable
evaluate
public boolean evaluatesToBag()
Function
will return a bag
of values on evaluation.
evaluatesToBag
in interface Evaluatable
public void encode(OutputStream output)
Apply
into its XML representation and
writes this encoding to the given OutputStream
with no
indentation.
encode
in interface Evaluatable
output
- a stream into which the XML-encoded data is writtenpublic void encode(OutputStream output, Indenter indenter)
Apply
into its XML representation and
writes this encoding to the given OutputStream
with
indentation.
encode
in interface Evaluatable
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 | |||||||||
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.