mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
script: Remove unused ScriptEngine.executeScript (#5105)
This commit is contained in:
-6
@@ -38,7 +38,6 @@ import org.openhab.core.model.script.ScriptServiceUtil;
|
||||
import org.openhab.core.model.script.ScriptStandaloneSetup;
|
||||
import org.openhab.core.model.script.engine.Script;
|
||||
import org.openhab.core.model.script.engine.ScriptEngine;
|
||||
import org.openhab.core.model.script.engine.ScriptExecutionException;
|
||||
import org.openhab.core.model.script.engine.ScriptParsingException;
|
||||
import org.openhab.core.model.script.runtime.ScriptRuntime;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
@@ -118,11 +117,6 @@ public class ScriptEngineImpl implements ScriptEngine, ModelParser {
|
||||
return script;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object executeScript(String scriptAsString) throws ScriptParsingException, ScriptExecutionException {
|
||||
return newScriptFromString(scriptAsString).execute();
|
||||
}
|
||||
|
||||
private XExpression parseScriptIntoXTextEObject(String scriptAsString) throws ScriptParsingException {
|
||||
XtextResourceSet resourceSet = getResourceSet();
|
||||
Resource resource = resourceSet.createResource(computeUnusedUri(resourceSet)); // IS-A XtextResource
|
||||
|
||||
-10
@@ -31,16 +31,6 @@ public interface ScriptEngine {
|
||||
*/
|
||||
Script newScriptFromString(final String scriptAsString) throws ScriptParsingException;
|
||||
|
||||
/**
|
||||
* Executes a script that is passed as a string
|
||||
*
|
||||
* @param scriptAsString
|
||||
* @return the return value of the script
|
||||
* @throws ScriptParsingException
|
||||
* @throws ScriptExecutionException
|
||||
*/
|
||||
Object executeScript(final String scriptAsString) throws ScriptParsingException, ScriptExecutionException;
|
||||
|
||||
/**
|
||||
* Wraps an Xbase XExpression in a Script instance
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user