Register the `ScriptTransform.Parser` and `ChainTransform.Parser`.

We weren't properly registering the chain or script transforms so that they were accessable from the Watch.parse and PUT Watch APIs.

Original commit: elastic/x-pack-elasticsearch@2a236d62f3
This commit is contained in:
Brian Murphy 2015-04-17 12:42:34 -04:00
parent 90fa55d1eb
commit cce3291b59
1 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,10 @@ public class TransformModule extends AbstractModule {
MapBinder<String, Transform.Parser> mbinder = MapBinder.newMapBinder(binder(), String.class, Transform.Parser.class);
bind(SearchTransform.Parser.class).asEagerSingleton();
mbinder.addBinding(SearchTransform.TYPE).to(SearchTransform.Parser.class);
bind(ScriptTransform.Parser.class).asEagerSingleton();
mbinder.addBinding(ScriptTransform.TYPE).to(ScriptTransform.Parser.class);
bind(ChainTransform.Parser.class).asEagerSingleton();
mbinder.addBinding(ChainTransform.TYPE).to(ChainTransform.Parser.class);
for (Map.Entry<String, Class<? extends Transform.Parser>> entry : parsers.entrySet()) {
bind(entry.getValue()).asEagerSingleton();