The bean named shibboleth.Functions.Expression executes a Spring Expression Language (SpEL) expression to implement an arbitrary Function signature.
The bean named shibboleth.BiFunctions.Expression 4.1 executes a Spring Expression Language (SpEL) expression to implement an arbitrary BiFunction signature.
An Expression Function is instantiated by supplying a string argument that contains a SpEL expression to evaluate.
Example
Code Block |
---|
<bean id="MyFunction" parent="shibboleth.Functions.Expression"
c:expression="#input + 42" /> |
Reference
Localtabgroup |
---|
Localtab live |
---|
active | true |
---|
title | Bean Properties |
---|
|
The following additional bean properties are available: PropertyName | Type | Default | Description |
---|
customObject | Bean/Reference |
| An object to make available to the script via a variable named custom | returnOnError | Object | null | What to return if the expression fails | hideExceptions | boolean | false | If true, then the returnOnError value is returned if the expression raises an exception, otherwise the exception is passed out | inputType (Function variant) | Class<?> |
| Adds type checking against the input to the function to enforce type safety | inputTypes (BiFunction variant) | Pair<Class<?>,Class<?>> |
| Adds type checking against the input to the function to enforce type safety | outputType | Class<?> |
| Adds type checking against the output of the function to enforce type safety |
For the Function variant, the expression environment will have these variables populated: For the BiFunction variant, the expression environment will have these variables populated: input1 - the first function input
input2 - the second function input
custom - the object set via the customObject property, if any
|