Class AbstractFlowableVariableExpressionFunction
java.lang.Object
org.flowable.common.engine.impl.el.function.AbstractFlowableVariableExpressionFunction
- All Implemented Interfaces:
FlowableFunctionDelegate
,FlowableAstFunctionCreator
- Direct Known Subclasses:
AbstractVariableComparatorExpressionFunction
,VariableBase64ExpressionFunction
,VariableContainsAnyExpressionFunction
,VariableContainsExpressionFunction
,VariableEqualsExpressionFunction
,VariableExistsExpressionFunction
,VariableGetExpressionFunction
,VariableGetOrDefaultExpressionFunction
,VariableIsEmptyExpressionFunction
,VariableIsNotEmptyExpressionFunction
,VariableNotEqualsExpressionFunction
public abstract class AbstractFlowableVariableExpressionFunction
extends Object
implements FlowableAstFunctionCreator, FlowableFunctionDelegate
- Author:
- Joram Barrez, Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected Collection<String>
protected Method
protected String
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractFlowableVariableExpressionFunction
(String functionName) AbstractFlowableVariableExpressionFunction
(List<String> functionNameOptions, String functionName) -
Method Summary
Modifier and TypeMethodDescriptioncreateFunction
(String name, int index, AstParameters parameters, boolean varargs, FlowableExpressionParser parser) Create anAstFunction
based on the provided name, index, parameters.protected AstNode
createVariableNameNode
(AstNode variableNode) protected Method
findMethod
(String functionName) Returns the method that is invoked by JUEL.The names of the functions that this creator can create.protected static Object
getVariableValue
(VariableContainer variableContainer, String variableName) The name of the method when used in an expression, like the second part of ${prefix:method()}.All the names of the method when used in an expression, like the second part of ${prefix:method()}.prefix()
The prefix of the method when used in an expression, like the first part of ${prefix:method()}.prefixes()
All the prefixes of the method when used in an expression.protected static boolean
valuesAreNumbers
(Object variableValue, Object actualValue)
-
Field Details
-
method
-
functionName
-
functionNamesOptions
-
variableScopeName
-
-
Constructor Details
-
AbstractFlowableVariableExpressionFunction
-
AbstractFlowableVariableExpressionFunction
-
-
Method Details
-
findMethod
-
prefix
Description copied from interface:FlowableFunctionDelegate
The prefix of the method when used in an expression, like the first part of ${prefix:method()}. Will be used to match the text of the expression to the actualFlowableFunctionDelegate
instance.- Specified by:
prefix
in interfaceFlowableFunctionDelegate
-
prefixes
Description copied from interface:FlowableFunctionDelegate
All the prefixes of the method when used in an expression. It allows one method to cover multiple prefixes. e.g.${prefix:method()}
or {$code ${alternativePrefix:method()}}. Will be used to match the text of the expression to the actualFlowableFunctionDelegate
instance.- Specified by:
prefixes
in interfaceFlowableFunctionDelegate
-
localName
Description copied from interface:FlowableFunctionDelegate
The name of the method when used in an expression, like the second part of ${prefix:method()}. Will be used to match the text of the expression to the actualFlowableFunctionDelegate
instance.- Specified by:
localName
in interfaceFlowableFunctionDelegate
-
localNames
Description copied from interface:FlowableFunctionDelegate
All the names of the method when used in an expression, like the second part of ${prefix:method()}. It allows one method to cover multiple local names. e.g.${prefix:method()}
or${prefix:alternativeMethod()}
. Will be used to match the text of the expression to the actualFlowableFunctionDelegate
instance.- Specified by:
localNames
in interfaceFlowableFunctionDelegate
-
functionMethod
Description copied from interface:FlowableFunctionDelegate
Returns the method that is invoked by JUEL.- Specified by:
functionMethod
in interfaceFlowableFunctionDelegate
-
getVariableValue
-
valuesAreNumbers
-
getFunctionNames
Description copied from interface:FlowableAstFunctionCreator
The names of the functions that this creator can create.- Specified by:
getFunctionNames
in interfaceFlowableAstFunctionCreator
-
createFunction
public AstFunction createFunction(String name, int index, AstParameters parameters, boolean varargs, FlowableExpressionParser parser) Description copied from interface:FlowableAstFunctionCreator
Create anAstFunction
based on the provided name, index, parameters. Potentially creating new parameters to enhance the function.- Specified by:
createFunction
in interfaceFlowableAstFunctionCreator
- Parameters:
name
- the name of the functionindex
- the indexparameters
- the parameters for the functionvarargs
- whether varargs is supportedparser
- the parser for potentially creating identifiers
-
createVariableNameNode
-