Class BaseFirstOrderFunctionCall.EagerMultiPrimitiveTypeEval<RETURN_T extends Value>
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.func.BaseFirstOrderFunctionCall<RETURN_T>
-
- org.ow2.authzforce.core.pdp.api.func.BaseFirstOrderFunctionCall.EagerEval<RETURN_T>
-
- org.ow2.authzforce.core.pdp.api.func.BaseFirstOrderFunctionCall.EagerMultiPrimitiveTypeEval<RETURN_T>
-
- Type Parameters:
RETURN_T
- function return type
- All Implemented Interfaces:
FirstOrderFunctionCall<RETURN_T>
,FunctionCall<RETURN_T>
- Enclosing class:
- BaseFirstOrderFunctionCall<RETURN extends Value>
public abstract static class BaseFirstOrderFunctionCall.EagerMultiPrimitiveTypeEval<RETURN_T extends Value> extends BaseFirstOrderFunctionCall.EagerEval<RETURN_T>
Function call, for functions requiring eager (a.k.a. greedy) evaluation of ALL their arguments' expressions to actual values, before the function can be evaluated. All arguments must be primitive values but may not have the same primitive datatype.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ow2.authzforce.core.pdp.api.func.BaseFirstOrderFunctionCall
BaseFirstOrderFunctionCall.EagerBagEval<RETURN_T extends Value,PARAM_BAG_ELEMENT_T extends AttributeValue>, BaseFirstOrderFunctionCall.EagerEval<RETURN_T extends Value>, BaseFirstOrderFunctionCall.EagerMultiPrimitiveTypeEval<RETURN_T extends Value>, BaseFirstOrderFunctionCall.EagerPartlyBagEval<RETURN_T extends Value,PRIMITIVE_PARAM_T extends AttributeValue>, BaseFirstOrderFunctionCall.EagerSinglePrimitiveTypeEval<RETURN_T extends Value,PARAM_T extends AttributeValue>
-
-
Field Summary
-
Fields inherited from class org.ow2.authzforce.core.pdp.api.func.BaseFirstOrderFunctionCall.EagerEval
argExpressions, indeterminateArgMessage, numOfSameTypePrimitiveParamsBeforeBag, totalArgCount
-
Fields inherited from class org.ow2.authzforce.core.pdp.api.func.BaseFirstOrderFunctionCall
funcId
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EagerMultiPrimitiveTypeEval(FirstOrderFunctionSignature<RETURN_T> functionSig, List<Expression<?>> args, Datatype<?>... remainingArgTypes)
Instantiates Function call
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract RETURN_T
evaluate(Deque<AttributeValue> args)
Make the call with attribute values as arguments.RETURN_T
evaluate(EvaluationContext context, Optional<EvaluationContext> mdpContext, AttributeValue... remainingArgs)
Make the call in a given evaluation context and argument values resolved at evaluation time.-
Methods inherited from class org.ow2.authzforce.core.pdp.api.func.BaseFirstOrderFunctionCall
evaluate, evaluate, getReturnType
-
-
-
-
Constructor Detail
-
EagerMultiPrimitiveTypeEval
protected EagerMultiPrimitiveTypeEval(FirstOrderFunctionSignature<RETURN_T> functionSig, List<Expression<?>> args, Datatype<?>... remainingArgTypes) throws IllegalArgumentException
Instantiates Function call- Parameters:
functionSig
- function signatureargs
- arguments' ExpressionsremainingArgTypes
- types of arguments followingargs
, and of which the actual Expression is unknown at this point, but will be known and passed at evaluation time asremainingArgs
parameter toBaseFirstOrderFunctionCall.evaluate(EvaluationContext, Optional, boolean, AttributeValue...)
, thenevaluate(EvaluationContext, Optional, AttributeValue...)
.- Throws:
IllegalArgumentException
- if one ofremainingArgTypes
is a bag type.
-
-
Method Detail
-
evaluate
protected abstract RETURN_T evaluate(Deque<AttributeValue> args) throws IndeterminateEvaluationException
Make the call with attribute values as arguments. (The pre-evaluation of argument expressions in the evaluation context is already handled internally by this class.)- Parameters:
args
- function arguments- Returns:
- result of the call
- Throws:
IndeterminateEvaluationException
- if any error evaluating the function
-
evaluate
public final RETURN_T evaluate(EvaluationContext context, Optional<EvaluationContext> mdpContext, AttributeValue... remainingArgs) throws IndeterminateEvaluationException
Description copied from interface:FirstOrderFunctionCall
Make the call in a given evaluation context and argument values resolved at evaluation time. This method is called byFirstOrderFunctionCall.evaluate(EvaluationContext, Optional, boolean, AttributeValue...)
after checking evaluation-time args.- Parameters:
context
- Individual Decision evaluation contextmdpContext
- the context of the Multiple Decision request that thecontext
belongs to if the Multiple Decision Profile is usedremainingArgs
- remaining args (not yet known at initialization time). Null if none. Only non-bag/primitive values are validremainingArgs
to prevent varargs warning (potential heap pollution via varargs parameter) that would be caused by using a parameterized type such as Value/Collection to represent both bags and primitives.- Returns:
- result of the call
- Throws:
IndeterminateEvaluationException
- if any error evaluating the function
-
-