|
JBoss port of sunxacml 2.0.5-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.xacml.sunxacml.cond.Condition
public class Condition
Represents the XACML ConditionType type. It contains exactly one child expression that is boolean and returns a single value. This class was added in XACML 2.0
Constructor Summary | |
---|---|
Condition(Expression expression)
Constructs a Condition as used in XACML 2.0. |
|
Condition(Function function,
List expressions)
Constructs a Condition as used in XACML 1.x. |
Method Summary | |
---|---|
void |
encode(OutputStream output)
Encodes this Condition into its XML representation and
writes this encoding to the given OutputStream with no
indentation. |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this Condition into its XML representation and
writes this encoding to the given OutputStream with
indentation. |
EvaluationResult |
evaluate(EvaluationCtx context)
Evaluates the Condition by evaluating its child
Expression . |
boolean |
evaluatesToBag()
Deprecated. As of 2.0, you should use the returnsBag
method from the super-interface Expression . |
List |
getChildren()
Returns the List of children for this
Condition . |
Function |
getFunction()
Returns the Function used by this Condition
if this is a 1.x condition, or null if this is a 2.0 condition. |
static Condition |
getInstance(Node root,
PolicyMetaData metaData,
VariableManager manager)
Returns an instance of Condition based on the given
DOM root. |
URI |
getType()
Returns the type of attribute that this object will return on a call to evaluate . |
boolean |
returnsBag()
Returns whether or not this Condition will return a bag
of values on evaluation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Condition(Function function, List expressions) throws IllegalArgumentException
Condition
as used in XACML 1.x.
function
- the Function
to use in evaluating the
elements in the Conditionxprs
- the contents of the Condition which will be the parameters
to the function, each of which is an
Expression
IllegalArgumentException
- if the input expressions don't
match the signature of the function or
if the function is invalid for use
in a Conditionpublic Condition(Expression expression) throws IllegalArgumentException
Condition
as used in XACML 2.0.
expression
- the child Expression
IllegalArgumentException
- if the expression is not boolean or
returns a bagMethod Detail |
---|
public static Condition getInstance(Node root, PolicyMetaData metaData, VariableManager manager) throws ParsingException
Condition
based on the given
DOM root.
root
- the DOM root of a ConditionType XML typemetaData
- the meta-data associated with the containing policymanager
- VariableManager
used to connect references
and definitions while parsing
ParsingException
- if this is not a valid ConditionTypepublic Function getFunction()
Function
used by this Condition
if this is a 1.x condition, or null if this is a 2.0 condition.
Function
or nullpublic List getChildren()
List
of children for this
Condition
. The List
contains
Expression
s. The list is unmodifiable.
getChildren
in interface Evaluatable
List
of Expression
spublic URI getType()
evaluate
. This is always a boolean, since that's
all that a Condition is allowed to return.
getType
in interface Expression
public boolean returnsBag()
Condition
will return a bag
of values on evaluation. This always returns false, since a Condition
isn't allowed to return a bag.
returnsBag
in interface Expression
public boolean evaluatesToBag()
returnsBag
method from the super-interface Expression
.
Condition
will return a bag
of values on evaluation. This always returns false, since a Condition
isn't allowed to return a bag.
evaluatesToBag
in interface Evaluatable
public EvaluationResult evaluate(EvaluationCtx context)
Condition
by evaluating its child
Expression
.
evaluate
in interface Evaluatable
context
- the representation of the request
public void encode(OutputStream output)
Condition
into its XML representation and
writes this encoding to the given OutputStream
with no
indentation.
encode
in interface Expression
output
- a stream into which the XML-encoded data is writtenpublic void encode(OutputStream output, Indenter indenter)
Condition
into its XML representation and
writes this encoding to the given OutputStream
with
indentation.
encode
in interface Expression
output
- a stream into which the XML-encoded data is writtenindenter
- an object that creates indentation strings
|
JBoss port of sunxacml 2.0.5-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |