Plugins: Remove name() and description() from api

In 2.0 we added plugin descriptors which require defining a name and
description for the plugin. However, we still have name() and
description() which must be overriden from the Plugin class. This still
exists for classpath plugins. But classpath plugins are mainly for
tests, and even then, referring to classpath plugins with their class is
a better idea. This change removes name() and description(), replacing
the name for classpath plugins with the full class name.
This commit is contained in:
Ryan Ernst 2016-06-15 15:13:25 -07:00
parent 7f6e0c6c02
commit a4503c2aed
95 changed files with 16 additions and 1098 deletions

View file

@ -24,21 +24,8 @@ import org.elasticsearch.script.ScriptEngineRegistry;
import org.elasticsearch.script.ScriptModule;
import org.elasticsearch.script.python.PythonScriptEngineService;
/**
*
*/
public class PythonPlugin extends Plugin {
@Override
public String name() {
return "lang-python";
}
@Override
public String description() {
return "Adds support for writing scripts in Python";
}
public void onModule(ScriptModule module) {
module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(PythonScriptEngineService.class, PythonScriptEngineService.NAME));
}