Class FirstOrderFunction<RETURN extends Value>
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.func.BaseFunction<RETURN>
-
- org.ow2.authzforce.core.pdp.api.func.FirstOrderFunction<RETURN>
-
- Type Parameters:
RETURN
- function return type
- All Implemented Interfaces:
Function<RETURN>
,PdpExtension
,PrimitiveValue
,Value
- Direct Known Subclasses:
MultiParameterTypedFirstOrderFunction
,SingleParameterTypedFirstOrderFunction
public abstract class FirstOrderFunction<RETURN extends Value> extends BaseFunction<RETURN>
Superclass of "first-order" functions, "first-order" as opposed to "higher-order". (Higher-order functions are implemented in separate classes.) Supplies several useful methods, making it easier to implement a "first-order" function.
-
-
Field Summary
-
Fields inherited from interface org.ow2.authzforce.core.pdp.api.func.Function
AUTHZFORCE_EXTENSION_PREFIX, XACML_NS_1_0, XACML_NS_2_0, XACML_NS_3_0
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FirstOrderFunction(String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract List<? extends Datatype<?>>
getParameterTypes()
Get parameter typesFunctionCall<RETURN>
newCall(List<Expression<?>> argExpressions)
Creates new function call with given arguments (Expressions).abstract FirstOrderFunctionCall<RETURN>
newCall(List<Expression<?>> argExpressions, Datatype<?>... remainingArgTypes)
Returns a function call for calling this function.-
Methods inherited from class org.ow2.authzforce.core.pdp.api.func.BaseFunction
equals, getId, getIndeterminateArgException, getIndeterminateArgMessage, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ow2.authzforce.core.pdp.api.func.Function
getReturnType
-
-
-
-
Constructor Detail
-
FirstOrderFunction
protected FirstOrderFunction(String name)
-
-
Method Detail
-
getParameterTypes
public abstract List<? extends Datatype<?>> getParameterTypes()
Get parameter types- Returns:
- parameter types
-
newCall
public abstract FirstOrderFunctionCall<RETURN> newCall(List<Expression<?>> argExpressions, Datatype<?>... remainingArgTypes) throws IllegalArgumentException
Returns a function call for calling this function.- Parameters:
argExpressions
- function arguments (expressions)remainingArgTypes
- types of remaining inputs to be passed only at request evaluation time, if not all arguments are specified inargExpressions
. Therefore, only their type is checked at this point. The actual argument values will be passed as last parameters when callingBaseFirstOrderFunctionCall.evaluate(org.ow2.authzforce.core.pdp.api.EvaluationContext, boolean, org.ow2.authzforce.core.pdp.api.value.AttributeValue...)
at request evaluation time, via the returnedFunctionCall
.- Returns:
- Function call handle for calling this function which such inputs (with possible changes from original inputs due to optimizations for instance)
- Throws:
IllegalArgumentException
- if inputs are invalid for this function
-
newCall
public final FunctionCall<RETURN> newCall(List<Expression<?>> argExpressions) throws IllegalArgumentException
Description copied from interface:Function
Creates new function call with given arguments (Expressions). Any implementation of this method should first validate inputs according to the function signature/definition.- Parameters:
argExpressions
- function arguments (expressions)- Returns:
- Function call handle for calling this function which such inputs (with possible changes from original inputs due to optimizations for instance)
- Throws:
IllegalArgumentException
- if inputs are invalid for this function
-
-