AV
- function parameter typepublic class ComparisonFunction<AV extends AttributeValue & Comparable<AV>> extends SingleParameterTypedFirstOrderFunction<BooleanValue,AV>
Modifier and Type | Class and Description |
---|---|
static class |
ComparisonFunction.PostCondition
post-condition to hold true when comparing the result of
arg0.compareTo(arg1) to zero; where compateTo() function is similar to Comparable.compareTo(Object) . |
functionSignature
AUTHZFORCE_EXTENSION_PREFIX, XACML_NS_1_0, XACML_NS_2_0, XACML_NS_3_0
Constructor and Description |
---|
ComparisonFunction(Datatype<AV> paramType,
ComparisonFunction.PostCondition postCondition)
Creates a new comparison function.
|
Modifier and Type | Method and Description |
---|---|
FirstOrderFunctionCall<BooleanValue> |
newCall(List<Expression<?>> argExpressions,
Datatype<?>... remainingArgTypes)
Returns a function call for calling this function.
|
getParameterTypes, getReturnType
newCall
equals, getId, getIndeterminateArgException, getIndeterminateArgMessage, hashCode, toString
public ComparisonFunction(Datatype<AV> paramType, ComparisonFunction.PostCondition postCondition)
paramType.getFuncIdPrefix() + functionSuffix
, where functionSuffix
is:
postCondition == GREATER_THAN
, then the suffix is '-greater-than'postCondition == GREATER_THAN_OR_EQUAL
, then the suffix is '-greater-than-or-equal'postCondition == LESSER_THAN
, then the suffix is '-lesser-than'postCondition == LESSER_THAN_OR_EQUAL
, then the suffix is '-lesser-than-or-equal'paramType.getFuncIdPrefix()
is 'urn:oasis:names:tc:xacml:1.0:function:integer' and postCondition == GREATER_THAN
, then the resulting function ID
will be 'urn:oasis:names:tc:xacml:1.0:function:integer-greater-than'paramType
- parameter typepostCondition
- post-condition to hold true when comparing the result of arg0.compareTo(arg1)
to zero; where compateTo() function is similar to Comparable.compareTo(Object)
IllegalArgumentException
- if the function is unknownpublic FirstOrderFunctionCall<BooleanValue> newCall(List<Expression<?>> argExpressions, Datatype<?>... remainingArgTypes)
newCall
in class FirstOrderFunction<BooleanValue>
argExpressions
- function arguments (expressions)remainingArgTypes
- types of remaining inputs to be passed only at request evaluation time, if not all arguments are specified in argExpressions
. Therefore, only their type is checked at
this point. The actual argument values will be passed as last parameters when calling
BaseFirstOrderFunctionCall.evaluate(org.ow2.authzforce.core.pdp.api.EvaluationContext, boolean, org.ow2.authzforce.core.pdp.api.value.AttributeValue...)
at request evaluation
time, via the returned FunctionCall
.Copyright © 2012–2020. All rights reserved.