Update signature for getScriptEngine method of script plugins

This is the xpack side of
https://github.com/elastic/elasticsearch/pull/24896

Original commit: elastic/x-pack-elasticsearch@6b06f5e758
This commit is contained in:
Ryan Ernst 2017-05-25 16:56:00 -07:00
parent d3b3fe783d
commit 77f441b1a0
2 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,7 @@ package org.elasticsearch.script;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.xpack.common.text.TextTemplateEngine;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.function.Function;
@ -23,7 +24,7 @@ public class MockMustacheScriptEngine extends MockScriptEngine {
public static class TestPlugin extends MockScriptPlugin {
@Override
public ScriptEngine getScriptEngine(Settings settings) {
public ScriptEngine getScriptEngine(Settings settings, Collection<ScriptContext<?>> contexts) {
return new MockMustacheScriptEngine();
}

View File

@ -13,6 +13,7 @@ import org.elasticsearch.script.ScriptContext;
import org.elasticsearch.script.ScriptEngine;
import org.elasticsearch.script.SearchScript;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.function.Function;
@ -26,7 +27,7 @@ public class MockPainlessScriptEngine extends MockScriptEngine {
public static class TestPlugin extends MockScriptPlugin {
@Override
public ScriptEngine getScriptEngine(Settings settings) {
public ScriptEngine getScriptEngine(Settings settings, Collection<ScriptContext<?>> contexts) {
return new MockPainlessScriptEngine();
}