public interface ExpressionFactory extends Closeable
ExpressionType
s in policies: AttributeDesignator, AttributeSelector, Apply, etc.
Extends Closeable
because it may use NamedAttributeProvider
s (implement Closeable
) to resolve AttributeDesignators for attributes not provided in the request.
Modifier and Type | Method and Description |
---|---|
VariableReference<?> |
addVariable(oasis.names.tc.xacml._3_0.core.schema.wd_17.VariableDefinition varDef,
net.sf.saxon.s9api.XPathCompiler xPathCompiler,
Deque<String> longestVarRefChain)
Add VariableDefinition (variable assignment expression)
|
FunctionExpression |
getFunction(String functionId)
Gets a non-generic function instance
|
FunctionExpression |
getFunction(String functionId,
Datatype<? extends AttributeValue> subFunctionReturnType)
Gets a function instance (generic or non-generic).
|
ConstantExpression<? extends AttributeValue> |
getInstance(oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeValueType jaxbAttrVal,
net.sf.saxon.s9api.XPathCompiler xPathCompiler)
Parse/create an attribute value expression from XACML-schema-derived JAXB model
|
Expression<?> |
getInstance(oasis.names.tc.xacml._3_0.core.schema.wd_17.ExpressionType expr,
net.sf.saxon.s9api.XPathCompiler xPathCompiler,
Deque<String> longestVarRefChain)
Parses an XACML Expression into internal model of expression (evaluable).
|
VariableReference<?> |
getVariableExpression(String varId)
Get a given variable's assignment expression (definition)
|
VariableReference<?> |
removeVariable(String varId)
Removes the VariableReference(Definition) from the manager
|
Expression<?> getInstance(oasis.names.tc.xacml._3_0.core.schema.wd_17.ExpressionType expr, net.sf.saxon.s9api.XPathCompiler xPathCompiler, Deque<String> longestVarRefChain) throws IllegalArgumentException
expr
- the JAXB ExpressionType derived from XACML modelxPathCompiler
- Policy(Set) default XPath compiler, corresponding to the Policy(Set)'s default XPath version specified in DefaultsType
element; null if none specifiedlongestVarRefChain
- Longest chain of VariableReference references in the VariableDefinition's expression that is expr
or contains expr
, or null if expr
is not in a
VariableDefinition. A VariableReference reference chain is a list of VariableIds, such that V1-> V2 ->... -> Vn -> expr
, where "V1 -> V2" means: the expression in
VariableDefinition of V1 has a VariableReference to V2. This is used to detect exceeding depth of VariableReference reference in VariableDefinitions' expressions. Again,
longestVarRefChain
may be null, if this expression is not used in a VariableDefinition.Expression
or null if the root node cannot be parsed as a valid ExpressionIllegalArgumentException
- invalid ExpressionTypeConstantExpression<? extends AttributeValue> getInstance(oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeValueType jaxbAttrVal, net.sf.saxon.s9api.XPathCompiler xPathCompiler) throws IllegalArgumentException
jaxbAttrVal
- XACML-schema-derived JAXB AttributeValuexPathCompiler
- Policy(Set) default XPath compiler, corresponding to the Policy(Set)'s default XPath version specified in DefaultsType
element; null if none specifiedIllegalArgumentException
- if value cannot be parsed into the value's defined datatypeVariableReference<?> addVariable(oasis.names.tc.xacml._3_0.core.schema.wd_17.VariableDefinition varDef, net.sf.saxon.s9api.XPathCompiler xPathCompiler, Deque<String> longestVarRefChain) throws IllegalArgumentException
varDef
- VariableDefinitionxPathCompiler
- Policy(Set) default XPath compiler, corresponding to the Policy(Set)'s default XPath version specified in DefaultsType
element.longestVarRefChain
- Ignored if null else used as inout parameter to be filled by this method with the longest chain of VariableReference references in varDef
. A VariableReference reference
chain is a list of VariableIds, such that V1-> V2 ->... -> Vn -> expr
, where "V1 -> V2" means: the expression in VariableDefinition of V1 has a VariableReference to V2.
This is used to detect exceeding depth of VariableReference reference in VariableDefinitions' expressions. Again, longestVarRefChain
may be null, if this expression is
not used in a VariableDefinition.IllegalArgumentException
- invalid expression in varDef
VariableReference<?> getVariableExpression(String varId)
varId
- varId
, or null if there is no such variable.VariableReference<?> removeVariable(String varId)
varId
- varId
, or null if there was no such variable.FunctionExpression getFunction(String functionId)
functionId
- function ID (XACML URI)functionId
FunctionExpression getFunction(String functionId, Datatype<? extends AttributeValue> subFunctionReturnType) throws IllegalArgumentException
functionId
- function ID (XACML URI)subFunctionReturnType
- optional sub-function's return type required only if a generic higher-order function is expected as the result, of which the sub-function is expected to be the first parameter;
otherwise null (for first-order function). A generic higher-order function is a function whose return type depends on the sub-function ('s return type). Note: we only support
sub-functions with primitive return type here, for simplicity (see HigherOrderBagFunction
for more info).functionId
, or if non-null subFunctionReturnTypeId
specified and no higher-order function compatible with
sub-function's return type subFunctionReturnTypeId
IllegalArgumentException
- if datatype subFunctionReturnType
is not supportedCopyright © 2012–2020. All rights reserved.