Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated methods from ScriptService #10476

Conversation

javanna
Copy link
Member

@javanna javanna commented Apr 8, 2015

Removed the following methods from ScriptService, which don't require the ScriptContext argument:

public CompiledScript compile(String lang,  String script, ScriptType scriptType)

public ExecutableScript executable(String lang, String script, ScriptType scriptType, Map<String, Object> vars)

public SearchScript search(SearchLookup lookup, String lang, String script, ScriptType scriptType, @Nullable Map<String, Object> vars)

Also removed the ScriptContext.Standard.GENERIC_PLUGIN enum value, as it was used only for backwards compatibility.

Plugins that make use of scripts should declare their own script contexts through ScriptModule#registerScriptContext and use them when compiling/executing scripts.

Removed the following methods from `ScriptService`, which don't require the `ScriptContext` argument:

```
public CompiledScript compile(String lang,  String script, ScriptType scriptType)

public ExecutableScript executable(String lang, String script, ScriptType scriptType, Map<String, Object> vars)

public SearchScript search(SearchLookup lookup, String lang, String script, ScriptType scriptType, @nullable Map<String, Object> vars)
```

Also removed the ScriptContext.Standard.GENERIC_PLUGIN enum value, as it was used only for backwards compatibility.

 Plugins that make use of scripts should declare their own script contexts through `ScriptModule#registerScriptContext` and use them when compiling/executing scripts.
@javanna
Copy link
Member Author

javanna commented Apr 8, 2015

@uboness can you have a look please?

@uboness
Copy link
Contributor

uboness commented Apr 8, 2015

LGTM

@javanna javanna closed this in d9aebf4 Apr 8, 2015
@javanna javanna removed the review label Apr 8, 2015
@javanna
Copy link
Member Author

javanna commented Apr 8, 2015

Note: this change is breaking only for plugins that make use of scripts.

@clintongormley clintongormley changed the title Scripting: remove deprecated methods from ScriptService Remove deprecated methods from ScriptService Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants