mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-07-02 11:23:20 -04:00
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:
parent
7f6e0c6c02
commit
a4503c2aed
95 changed files with 16 additions and 1098 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue