|
|||||||||
Home >> All >> com >> sun >> xacml >> [ cond overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
com.sun.xacml.cond
Class Apply

java.lang.Objectcom.sun.xacml.cond.Apply
- All Implemented Interfaces:
- Evaluatable
- public class Apply
- extends java.lang.Object
- implements Evaluatable
- extends java.lang.Object
Represents the XACML ApplyType and ConditionType XML types.
- Since:
- 1.0
Field Summary | |
private Function |
bagFunction
|
private java.util.List |
evals
|
private Function |
function
|
private boolean |
isCondition
|
Constructor Summary | |
Apply(Function function,
java.util.List evals,
boolean isCondition)
Constructs an Apply object. |
|
Apply(Function function,
java.util.List evals,
Function bagFunction,
boolean isCondition)
Constructs an Apply object that contains a higher-order
bag function. |
Method Summary | |
void |
encode(java.io.OutputStream output)
Encodes this Apply into its XML representation and
writes this encoding to the given OutputStream with no
indentation. |
void |
encode(java.io.OutputStream output,
com.sun.xacml.Indenter indenter)
Encodes this Apply into its XML representation and
writes this encoding to the given OutputStream with
indentation. |
EvaluationResult |
evaluate(com.sun.xacml.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. |
java.util.List |
getChildren()
Returns the List of children for this Apply . |
static Apply |
getConditionInstance(org.w3c.dom.Node root,
java.lang.String xpathVersion)
Returns an instance of an Apply based on the given DOM
root node. |
Function |
getFunction()
Returns the Function used by this Apply . |
private static Function |
getFunction(org.w3c.dom.Node root,
java.lang.String version,
FunctionFactory factory)
Helper method that tries to get a function instance |
Function |
getHigherOrderFunction()
Returns the higher order bag function used by this Apply
if it exists, or null if no higher order function is used. |
private static Apply |
getInstance(org.w3c.dom.Node root,
FunctionFactory factory,
boolean isCondition,
java.lang.String xpathVersion)
This is a helper method that is called by the two getInstance methods. |
static Apply |
getInstance(org.w3c.dom.Node root,
java.lang.String xpathVersion)
Returns an instance of Apply based on the given DOM root. |
java.net.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 |
Field Detail |
function
private Function function
evals
private java.util.List evals
bagFunction
private Function bagFunction
isCondition
private boolean isCondition
Constructor Detail |
Apply
public Apply(Function function, java.util.List evals, boolean isCondition) throws java.lang.IllegalArgumentException
- Constructs an
Apply
object. Throws anIllegalArgumentException
if the given parameter list isn't valid for the given function.
Apply
public Apply(Function function, java.util.List evals, Function bagFunction, boolean isCondition) throws java.lang.IllegalArgumentException
- Constructs an
Apply
object that contains a higher-order bag function. Throws anIllegalArgumentException
if the given parameter list isn't valid for the given function.
Method Detail |
getConditionInstance
public static Apply getConditionInstance(org.w3c.dom.Node root, java.lang.String xpathVersion) throws com.sun.xacml.ParsingException
- Returns an instance of an
Apply
based on the given DOM root node. This will actually return a special kind ofApply
, 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.
getInstance
public static Apply getInstance(org.w3c.dom.Node root, java.lang.String xpathVersion) throws com.sun.xacml.ParsingException
- Returns an instance of
Apply
based on the given DOM root.
getInstance
private static Apply getInstance(org.w3c.dom.Node root, FunctionFactory factory, boolean isCondition, java.lang.String xpathVersion) throws com.sun.xacml.ParsingException
- This is a helper method that is called by the two getInstance
methods. It takes a factory so we know that we're getting the right
kind of function.
getFunction
private static Function getFunction(org.w3c.dom.Node root, java.lang.String version, FunctionFactory factory) throws com.sun.xacml.ParsingException
- Helper method that tries to get a function instance
getFunction
public Function getFunction()
- Returns the
Function
used by thisApply
.
getChildren
public java.util.List getChildren()
- Returns the
List
of children for thisApply
. TheList
containsEvaluatable
s. The list is unmodifiable, and may be empty.- Specified by:
getChildren
in interfaceEvaluatable
getHigherOrderFunction
public Function getHigherOrderFunction()
- Returns the higher order bag function used by this
Apply
if it exists, or null if no higher order function is used.
isCondition
public boolean isCondition()
- Returns whether or not this ApplyType is actually a ConditionType.
evaluate
public EvaluationResult evaluate(com.sun.xacml.EvaluationCtx context)
- Evaluates the apply object using the given function. This will in
turn call evaluate on all the given parameters, some of which may be
other
Apply
objects.- Specified by:
evaluate
in interfaceEvaluatable
getType
public java.net.URI getType()
- Returns the type of attribute that this object will return on a call
to
evaluate
. In practice, this will always be the same as the result of callinggetReturnType
on the function used by this object.- Specified by:
getType
in interfaceEvaluatable
evaluatesToBag
public boolean evaluatesToBag()
- Returns whether or not the
Function
will return a bag of values on evaluation.- Specified by:
evaluatesToBag
in interfaceEvaluatable
encode
public void encode(java.io.OutputStream output)
- Encodes this
Apply
into its XML representation and writes this encoding to the givenOutputStream
with no indentation.- Specified by:
encode
in interfaceEvaluatable
encode
public void encode(java.io.OutputStream output, com.sun.xacml.Indenter indenter)
- Encodes this
Apply
into its XML representation and writes this encoding to the givenOutputStream
with indentation.- Specified by:
encode
in interfaceEvaluatable
|
|||||||||
Home >> All >> com >> sun >> xacml >> [ cond overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |