Interface FirstOrderFunctionCall<RETURN extends Value>
-
- Type Parameters:
RETURN
- function return type
- All Superinterfaces:
FunctionCall<RETURN>
- All Known Implementing Classes:
BaseFirstOrderFunctionCall
,BaseFirstOrderFunctionCall.EagerBagEval
,BaseFirstOrderFunctionCall.EagerEval
,BaseFirstOrderFunctionCall.EagerMultiPrimitiveTypeEval
,BaseFirstOrderFunctionCall.EagerPartlyBagEval
,BaseFirstOrderFunctionCall.EagerSinglePrimitiveTypeEval
public interface FirstOrderFunctionCall<RETURN extends Value> extends FunctionCall<RETURN>
First-order function call. It is the recommended way of calling anyFirstOrderFunction
instance.Some of the arguments (expressions) may not be known in advance, but only at evaluation time (when calling
evaluate(EvaluationContext, boolean, AttributeValue...)
). For example, when using a FirstOrderFunction as a sub-function of the Higher-Order function 'any-of', the last arguments of the sub-function are determined during evaluation, after evaluating the expression of the last input in the context, and getting the various values in the result bag.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RETURN
evaluate(EvaluationContext context, boolean checkRemainingArgTypes, AttributeValue... remainingArgs)
Make the call in a given evaluation context.RETURN
evaluate(EvaluationContext context, AttributeValue... remainingArgs)
Make the call in a given evaluation context and argument values resolved at evaluation time.-
Methods inherited from interface org.ow2.authzforce.core.pdp.api.func.FunctionCall
evaluate, getReturnType
-
-
-
-
Method Detail
-
evaluate
RETURN evaluate(EvaluationContext context, AttributeValue... remainingArgs) throws IndeterminateEvaluationException
Make the call in a given evaluation context and argument values resolved at evaluation time. This method is called byevaluate(EvaluationContext, boolean, AttributeValue...)
after checking evaluation-time args.- Parameters:
context
- evaluation contextremainingArgs
- 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
-
evaluate
RETURN evaluate(EvaluationContext context, boolean checkRemainingArgTypes, AttributeValue... remainingArgs) throws IndeterminateEvaluationException
Make the call in a given evaluation context. This method calls the function after checkingremainingArgTypes
ifcheckremainingArgTypes = true
- Parameters:
context
- evaluation contextcheckRemainingArgTypes
- whether to check types ofremainingArgs
. It is strongly recommended to set this totrue
always, unless you have already checked the types are OK before calling this method and want to skip re-checking for efficiency.remainingArgs
- remaining args.- Returns:
- result of the call
- Throws:
IndeterminateEvaluationException
- ifcheckremainingArgTypes = true
andremainingArgs
do not check OK, or if they do but there was an error evaluating the function with such arguments
-
-