public class StringComparingFunction extends FunctionBase
BooleanAttribute data type.
The result shall be true if the second string begins with the first string, and false otherwise.| Modifier and Type | Field and Description |
|---|---|
static String |
NAME_ANY_URI_CONTAIN
Standard identifier for the anyURI-starts-with function.
|
static String |
NAME_ANY_URI_ENDS_WITH
Standard identifier for the anyURI-starts-with function.
|
static String |
NAME_ANY_URI_START_WITH
Standard identifier for the anyURI-starts-with function.
|
static String |
NAME_STRING_CONTAIN
Standard identifier for the string-starts-with function.
|
static String |
NAME_STRING_ENDS_WITH
Standard identifier for the string-starts-with function.
|
static String |
NAME_STRING_START_WITH
Standard identifier for the string-starts-with function.
|
FUNCTION_NS, FUNCTION_NS_2, FUNCTION_NS_3| Constructor and Description |
|---|
StringComparingFunction(String functionName)
Creates a new
AddFunction object. |
| Modifier and Type | Method and Description |
|---|---|
EvaluationResult |
evaluate(List<Evaluatable> inputs,
EvaluationCtx context)
Evaluates the
Function using the given inputs. |
static Set<String> |
getSupportedIdentifiers()
Returns a
Set containing all the function identifiers supported by this class. |
checkInputs, checkInputsNoBag, encode, encode, evalArgs, getFunctionId, getFunctionName, getIdentifier, getReturnType, getReturnTypeAsString, getType, makeProcessingError, returnsBagpublic static final String NAME_STRING_START_WITH
public static final String NAME_ANY_URI_START_WITH
public static final String NAME_STRING_ENDS_WITH
public static final String NAME_ANY_URI_ENDS_WITH
public static final String NAME_STRING_CONTAIN
public static final String NAME_ANY_URI_CONTAIN
public StringComparingFunction(String functionName)
AddFunction object.functionName - the standard XACML name of the function to be handled by this object,
including the full namespaceIllegalArgumentException - if the function is unknownpublic static Set<String> getSupportedIdentifiers()
Set containing all the function identifiers supported by this class.Set of Stringspublic EvaluationResult evaluate(List<Evaluatable> inputs, EvaluationCtx context)
FunctionFunction using the given inputs. The List contains
Evaluatables which are all
of the correct type if the Function has been created as part of an
Apply or TargetMatch, but which may otherwise be invalid. Each
parameter should be evaluated by the Function, unless the Function
doesn't need to evaluate all inputs to determine a result (as in the case of the or
function). The order of the List is significant, so a Function
should have a very good reason if it wants to evaluate the inputs in a different order.
Note that if this is a higher-order function, like any-of, then some argument (typically the
first) in the List will actually be a Function object representing the function
to apply to some bag. A function needs to know if it's a higher-order function, and therefore
whether or not to look for this case. Also, a higher-order function is responsible for
checking that the inputs that it will pass to the Function provided as the first
parameter are valid, ie. it must do a checkInputs on its sub-function when
checkInputs is called on the higher-order function.
inputs - the List of inputs for the functioncontext - the representation of the requestAttributeValue computed when evaluating the
function, or Status specifying some error conditionCopyright © 2019 WSO2. All rights reserved.