public class DefaultExpressionManager extends Object implements ExpressionManager
ExpressionManager implementation that contains the logic for creating
and resolving Expression instances.| Modifier and Type | Field and Description |
|---|---|
protected List<FlowableAstFunctionCreator> |
astFunctionCreators |
protected Map<Object,Object> |
beans |
protected DeploymentCache<Expression> |
expressionCache |
protected ExpressionFactory |
expressionFactory |
protected int |
expressionTextLengthCacheLimit |
protected List<FlowableFunctionDelegate> |
functionDelegates |
protected BiFunction<String,String,FlowableFunctionDelegate> |
functionResolver |
protected ELContext |
parsingElContext |
protected List<ELResolver> |
postDefaultResolvers |
protected List<ELResolver> |
preBeanResolvers |
protected List<ELResolver> |
preDefaultResolvers |
protected ELResolver |
staticElResolver |
| Constructor and Description |
|---|
DefaultExpressionManager(Map<Object,Object> beans) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPostDefaultResolver(ELResolver elResolver) |
void |
addPreBeanResolver(ELResolver elResolver) |
void |
addPreDefaultResolver(ELResolver elResolver) |
protected ELResolver |
createBeanElResolver() |
protected List<ELResolver> |
createDefaultElResolvers() |
Expression |
createExpression(String text)
Creates an
Expression instance from the given String. |
protected Expression |
createJuelExpression(String expression,
ValueExpression valueExpression) |
protected ELResolver |
createVariableElResolver() |
List<FlowableAstFunctionCreator> |
getAstFunctionCreators()
Returns the
FlowableAstFunctionCreator which potentially can alter the expression functions
during the creation of an Expression instance. |
Map<Object,Object> |
getBeans()
Returns the beans registered with this expression manager instance.
|
ELContext |
getElContext(VariableContainer variableContainer)
Creates an
ELContext against which Expression instance can be resolved. |
DeploymentCache<Expression> |
getExpressionCache() |
int |
getExpressionTextLengthCacheLimit() |
List<FlowableFunctionDelegate> |
getFunctionDelegates()
Returns the custom functions registered and usable in expressions.
|
protected ELResolver |
getOrCreateStaticElResolver() |
protected boolean |
isCacheEnabled(String text) |
void |
setAstFunctionCreators(List<FlowableAstFunctionCreator> astFunctionCreators)
Sets the
FlowableAstFunctionCreator instances which can alter the expression functions
during the creation of an Expression instance. |
void |
setBeans(Map<Object,Object> beans)
Sets the beans which can be used in expressions.
|
void |
setExpressionCache(DeploymentCache<Expression> expressionCache) |
void |
setExpressionFactory(ExpressionFactory expressionFactory) |
void |
setExpressionTextLengthCacheLimit(int expressionTextLengthCacheLimit) |
void |
setFunctionDelegates(List<FlowableFunctionDelegate> functionDelegates)
Set the custom functions usable in expressions.
|
protected void |
updateFunctionResolver() |
protected ExpressionFactory expressionFactory
protected List<FlowableFunctionDelegate> functionDelegates
protected BiFunction<String,String,FlowableFunctionDelegate> functionResolver
protected List<FlowableAstFunctionCreator> astFunctionCreators
protected ELContext parsingElContext
protected DeploymentCache<Expression> expressionCache
protected int expressionTextLengthCacheLimit
protected List<ELResolver> preDefaultResolvers
protected List<ELResolver> postDefaultResolvers
protected List<ELResolver> preBeanResolvers
protected ELResolver staticElResolver
public Expression createExpression(String text)
ExpressionManagerExpression instance from the given String.
Expression are resolved against a VariableContainer (e.g. a process Execution, a case instance plan item, etc.)createExpression in interface ExpressionManagerprotected boolean isCacheEnabled(String text)
protected Expression createJuelExpression(String expression, ValueExpression valueExpression)
public void setExpressionFactory(ExpressionFactory expressionFactory)
public ELContext getElContext(VariableContainer variableContainer)
ExpressionManagerELContext against which Expression instance can be resolved.getElContext in interface ExpressionManagerprotected ELResolver getOrCreateStaticElResolver()
protected List<ELResolver> createDefaultElResolvers()
protected ELResolver createVariableElResolver()
protected ELResolver createBeanElResolver()
public Map<Object,Object> getBeans()
ExpressionManagergetBeans in interface ExpressionManagerpublic void setBeans(Map<Object,Object> beans)
ExpressionManagersetBeans in interface ExpressionManagerpublic List<FlowableFunctionDelegate> getFunctionDelegates()
ExpressionManagergetFunctionDelegates in interface ExpressionManagerpublic void setFunctionDelegates(List<FlowableFunctionDelegate> functionDelegates)
ExpressionManagersetFunctionDelegates in interface ExpressionManagerprotected void updateFunctionResolver()
public List<FlowableAstFunctionCreator> getAstFunctionCreators()
ExpressionManagerFlowableAstFunctionCreator which potentially can alter the expression functions
during the creation of an Expression instance.getAstFunctionCreators in interface ExpressionManagerpublic void setAstFunctionCreators(List<FlowableAstFunctionCreator> astFunctionCreators)
ExpressionManagerFlowableAstFunctionCreator instances which can alter the expression functions
during the creation of an Expression instance.setAstFunctionCreators in interface ExpressionManagerpublic DeploymentCache<Expression> getExpressionCache()
public void setExpressionCache(DeploymentCache<Expression> expressionCache)
public int getExpressionTextLengthCacheLimit()
public void setExpressionTextLengthCacheLimit(int expressionTextLengthCacheLimit)
public void addPreDefaultResolver(ELResolver elResolver)
public void addPostDefaultResolver(ELResolver elResolver)
public void addPreBeanResolver(ELResolver elResolver)
Copyright © 2021 Flowable. All rights reserved.