Add protected method to SpringELExpression
Issue: SWF-1476
This commit is contained in:
@@ -133,9 +133,17 @@ public class SpringELExpression implements Expression {
|
||||
context.setVariables(getVariableValues(rootObject));
|
||||
context.setTypeConverter(new StandardTypeConverter(conversionService));
|
||||
context.getPropertyAccessors().addAll(propertyAccessors);
|
||||
extendEvaluationContext(context);
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked every time an evaluation context is created allowing further
|
||||
* initialization from sub-classes.
|
||||
*/
|
||||
protected void extendEvaluationContext(StandardEvaluationContext context) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn the map of variable-names-to-expressions into a map of variable-names-to-plain-objects
|
||||
* by evaluating each object against the input rootObject.
|
||||
|
||||
@@ -78,7 +78,18 @@ public class SpringELExpressionParser implements ExpressionParser {
|
||||
Class<?> expectedResultType = context.getExpectedEvaluationResultType();
|
||||
org.springframework.core.convert.ConversionService cs = conversionService.getDelegateConversionService();
|
||||
|
||||
return new SpringELExpression(spelExpression, expressionVars, expectedResultType, cs, propertyAccessors);
|
||||
return createSpringELExpression(expressionVars, spelExpression, expectedResultType, cs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the {@link SpringELExpression}.
|
||||
*/
|
||||
protected SpringELExpression createSpringELExpression(Map<String, Expression> expressionVars,
|
||||
org.springframework.expression.Expression spelExpression, Class<?> expectedResultType,
|
||||
org.springframework.core.convert.ConversionService conversionService) {
|
||||
|
||||
return new SpringELExpression(spelExpression, expressionVars,
|
||||
expectedResultType, conversionService, propertyAccessors);
|
||||
}
|
||||
|
||||
private org.springframework.expression.Expression parseSpelExpression(String expression, ParserContext context) {
|
||||
|
||||
Reference in New Issue
Block a user