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 Map<Object,Object> |
beans |
protected DeploymentCache<Expression> |
expressionCache |
protected List<FlowableExpressionEnhancer> |
expressionEnhancers |
protected ExpressionFactory |
expressionFactory |
protected int |
expressionTextLengthCacheLimit |
protected List<FlowableFunctionDelegate> |
functionDelegates |
protected ELContext |
parsingElContext |
| Constructor and Description |
|---|
DefaultExpressionManager() |
DefaultExpressionManager(Map<Object,Object> beans) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureResolvers(List<ELResolver> elResolvers) |
protected ELResolver |
createBeanElResolver() |
protected ELResolver |
createElResolver(VariableContainer variableContainer) |
Expression |
createExpression(String text)
Creates an
Expression instance from the given String. |
protected Expression |
createJuelExpression(String expression,
ValueExpression valueExpression) |
protected ELResolver |
createVariableElResolver(VariableContainer variableContainer) |
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() |
List<FlowableExpressionEnhancer> |
getExpressionEnhancers()
Returns the
FlowableExpressionEnhancer which potentially can alter the expression text
before being transformed into an Expression instance. |
int |
getExpressionTextLengthCacheLimit() |
List<FlowableFunctionDelegate> |
getFunctionDelegates()
Returns the custom functions registered and usable in expressions.
|
protected boolean |
isCacheEnabled(String text) |
void |
setBeans(Map<Object,Object> beans)
Sets the beans which can be used in expressions.
|
void |
setExpressionCache(DeploymentCache<Expression> expressionCache) |
void |
setExpressionEnhancers(List<FlowableExpressionEnhancer> expressionEnhancers)
Sets the
FlowableExpressionEnhancer instances which can enhance expression texts
before being tranformed into an Expression instance. |
void |
setExpressionFactory(ExpressionFactory expressionFactory) |
void |
setExpressionTextLengthCacheLimit(int expressionTextLengthCacheLimit) |
void |
setFunctionDelegates(List<FlowableFunctionDelegate> functionDelegates)
Set the custom functions usable in expressions.
|
protected ExpressionFactory expressionFactory
protected List<FlowableFunctionDelegate> functionDelegates
protected List<FlowableExpressionEnhancer> expressionEnhancers
protected ELContext parsingElContext
protected DeploymentCache<Expression> expressionCache
protected int expressionTextLengthCacheLimit
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 createElResolver(VariableContainer variableContainer)
protected void configureResolvers(List<ELResolver> elResolvers)
protected ELResolver createVariableElResolver(VariableContainer variableContainer)
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 ExpressionManagerpublic List<FlowableExpressionEnhancer> getExpressionEnhancers()
ExpressionManagerFlowableExpressionEnhancer which potentially can alter the expression text
before being transformed into an Expression instance.getExpressionEnhancers in interface ExpressionManagerpublic void setExpressionEnhancers(List<FlowableExpressionEnhancer> expressionEnhancers)
ExpressionManagerFlowableExpressionEnhancer instances which can enhance expression texts
before being tranformed into an Expression instance.setExpressionEnhancers in interface ExpressionManagerpublic DeploymentCache<Expression> getExpressionCache()
public void setExpressionCache(DeploymentCache<Expression> expressionCache)
public int getExpressionTextLengthCacheLimit()
public void setExpressionTextLengthCacheLimit(int expressionTextLengthCacheLimit)
Copyright © 2019 Flowable. All rights reserved.