INT-4160: Port Scripts DSL

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

* Rename `Scripts.script()` to processor() for better context
* Add `Scripts.messageSource()` for the `ScriptMessageSourceSpec`
* Redo `DslScriptExecutingMessageProcessor` logic to deal with `GroovyScriptExecutingMessageProcessor` via reflection, since that class is a part of `SI-Groovy` module
* Upgrade to `JRuby-9.1.5.0`

* Get rid of reflection in the `DslScriptExecutingMessageProcessor`
* Introduce `ScriptExecutingProcessorFactory` and its `GroovyAwareScriptExecutingProcessorFactory` extension in the `groovy` module
* Register `GroovyAwareScriptExecutingProcessorFactory` as a bean via `GroovyIntegrationConfigurationInitializer`
* Use bean for `ScriptExecutingProcessorFactory.BEAN_NAME` in the `DslScriptExecutingMessageProcessor` to populate `delegate` and fallback to the regular `ScriptExecutingMessageProcessor` instantiation if there is no such a `ScriptExecutingProcessorFactory.BEAN_NAME` bean
This commit is contained in:
Artem Bilan
2016-11-03 15:33:45 -04:00
committed by Gary Russell
parent 47cd4e4540
commit 1871b11e85
17 changed files with 1017 additions and 1 deletions

View File

@@ -0,0 +1 @@
payload.split(',')

View File

@@ -0,0 +1 @@
headers.type == 'good'

View File

@@ -0,0 +1 @@
java.util.Date.new

View File

@@ -0,0 +1,3 @@
(function(){
return payload.length > 5 ? "longStrings" : "shortStrings";
})();

View File

@@ -0,0 +1,7 @@
class Transformer
def transform(payload, arg)
"ruby-#{payload}-#{arg}"
end
end
Transformer.new.transform(payload, foo)