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 Type
    Method
    Description
    newScriptFromString(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

      Script newScriptFromString(String scriptAsString) throws ScriptParsingException
      Parses a string and returns a parsed script object.
      Parameters:
      scriptAsString - script to parse
      Returns:
      Script object, which can be executed
      Throws:
      ScriptParsingException
    • newScriptFromXExpression

      Script newScriptFromXExpression(org.eclipse.xtext.xbase.XExpression expression)
      Wraps an Xbase XExpression in a Script instance
      Parameters:
      expression - the XExpression
      Returns:
      the Script instance containing the expression