INT-3749: Revert setters for EC

JIRA: https://jira.spring.io/browse/INT-3749

Since some target application could inject there is `EvaluationContext` before, removal of
 `setIntegrationEvaluationContext()` is breaking change.

 This fix reverts all those setters.
This commit is contained in:
Artem Bilan
2015-06-27 12:36:33 -04:00
parent 3392d4e1ab
commit 9c96a14cd1
15 changed files with 115 additions and 24 deletions

View File

@@ -63,6 +63,10 @@ public class ExpressionArgumentsStrategy implements ArgumentsStrategy, BeanFacto
this.useCommandVariable = useCommandVariable;
}
public void setIntegrationEvaluationContext(EvaluationContext evaluationContext) {
this.evaluationContext = evaluationContext;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
this.beanFactory = beanFactory;
@@ -70,7 +74,9 @@ public class ExpressionArgumentsStrategy implements ArgumentsStrategy, BeanFacto
@Override
public void afterPropertiesSet() throws Exception {
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.beanFactory);
if (this.evaluationContext == null) {
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.beanFactory);
}
}
@Override

View File

@@ -94,6 +94,10 @@ public class RedisOutboundGateway extends AbstractReplyProducingMessageHandler {
this.argumentsStrategy = argumentsStrategy;
}
public void setIntegrationEvaluationContext(EvaluationContext evaluationContext) {
this.evaluationContext = evaluationContext;
}
@Override
public String getComponentType() {
return "redis:outbound-gateway";
@@ -102,7 +106,9 @@ public class RedisOutboundGateway extends AbstractReplyProducingMessageHandler {
@Override
protected void doInit() {
super.doInit();
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
if (this.evaluationContext == null) {
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
}
}
@Override

View File

@@ -87,6 +87,10 @@ public class RedisPublishingMessageHandler extends AbstractMessageHandler {
this.topicExpression = topicExpression;
}
public void setIntegrationEvaluationContext(EvaluationContext evaluationContext) {
this.evaluationContext = evaluationContext;
}
@Override
public String getComponentType() {
return "redis:outbound-channel-adapter";
@@ -98,7 +102,9 @@ public class RedisPublishingMessageHandler extends AbstractMessageHandler {
if (this.messageConverter instanceof BeanFactoryAware) {
((BeanFactoryAware) this.messageConverter).setBeanFactory(getBeanFactory());
}
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
if (this.evaluationContext == null) {
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
}
}
@Override

View File

@@ -77,6 +77,10 @@ public class RedisQueueOutboundChannelAdapter extends AbstractMessageHandler {
this.serializerExplicitlySet = true;
}
public void setIntegrationEvaluationContext(EvaluationContext evaluationContext) {
this.evaluationContext = evaluationContext;
}
@Override
public String getComponentType() {
return "redis:queue-outbound-channel-adapter";
@@ -85,7 +89,9 @@ public class RedisQueueOutboundChannelAdapter extends AbstractMessageHandler {
@Override
protected void onInit() throws Exception {
super.onInit();
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
if (this.evaluationContext == null) {
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
}
}
@Override