Class FirstOrderBagFunctions.BagContains<AV extends AttributeValue>
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.func.BaseFunction<RETURN>
-
- org.ow2.authzforce.core.pdp.api.func.FirstOrderFunction<RETURN_T>
-
- org.ow2.authzforce.core.pdp.api.func.MultiParameterTypedFirstOrderFunction<BooleanValue>
-
- org.ow2.authzforce.core.pdp.api.func.FirstOrderBagFunctions.BagContains<AV>
-
- Type Parameters:
AV
- primitive datatype
- All Implemented Interfaces:
Function<BooleanValue>
,PdpExtension
,PrimitiveValue
,Value
- Enclosing class:
- FirstOrderBagFunctions
public static class FirstOrderBagFunctions.BagContains<AV extends AttributeValue> extends MultiParameterTypedFirstOrderFunction<BooleanValue>
Generic 'type-is-in' function
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME_SUFFIX_IS_IN
Function ID suffix for 'primitiveType-is-in' functions-
Fields inherited from class org.ow2.authzforce.core.pdp.api.func.MultiParameterTypedFirstOrderFunction
functionSignature
-
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 Constructor Description BagContains(Datatype<AV> paramType, BagDatatype<AV> paramBagType, Class<AV[]> paramArrayClass)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V extends AttributeValue>
booleaneval(V arg0, Bag<V> bag)
Tests whether a bag contains a given primitive valueFirstOrderFunctionCall<BooleanValue>
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.MultiParameterTypedFirstOrderFunction
getParameterTypes, getReturnType
-
Methods inherited from class org.ow2.authzforce.core.pdp.api.func.FirstOrderFunction
newCall
-
Methods inherited from class org.ow2.authzforce.core.pdp.api.func.BaseFunction
equals, getId, getIndeterminateArgException, getIndeterminateArgMessage, hashCode, toString
-
-
-
-
Field Detail
-
NAME_SUFFIX_IS_IN
public static final String NAME_SUFFIX_IS_IN
Function ID suffix for 'primitiveType-is-in' functions- See Also:
- Constant Field Values
-
-
Method Detail
-
newCall
public FirstOrderFunctionCall<BooleanValue> newCall(List<Expression<?>> argExpressions, Datatype<?>... remainingArgTypes) throws IllegalArgumentException
Description copied from class:FirstOrderFunction
Returns a function call for calling this function.- Specified by:
newCall
in classFirstOrderFunction<BooleanValue>
- 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, Optional, 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
-
eval
public static <V extends AttributeValue> boolean eval(V arg0, Bag<V> bag)
Tests whether a bag contains a given primitive value- Parameters:
arg0
- primitive valuebag
- bag- Returns:
- true iff
arg0
is inbag
-
-