Interface ScriptEngine
public interface ScriptEngine
The script engine is the main entrypoint for openHAB script use. It can build
Script
instances from
simple strings. These scripts can then be executed by the caller.- Author:
- Kai Kreuzer - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionexecuteScript
(String scriptAsString) Executes a script that is passed as a stringnewScriptFromString
(String scriptAsString) Parses a string and returns a parsed script object.newScriptFromXExpression
(org.eclipse.xtext.xbase.XExpression expression) Wraps an Xbase XExpression in a Script instance
-
Method Details
-
newScriptFromString
Parses a string and returns a parsed script object.- Parameters:
scriptAsString
- script to parse- Returns:
- Script object, which can be executed
- Throws:
ScriptParsingException
-
executeScript
Executes a script that is passed as a string- Parameters:
scriptAsString
-- Returns:
- the return value of the script
- Throws:
ScriptParsingException
ScriptExecutionException
-
newScriptFromXExpression
Wraps an Xbase XExpression in a Script instance- Parameters:
expression
- the XExpression- Returns:
- the Script instance containing the expression
-