Interface Script


public interface Script
This interface is implemented by openHAB scripts.
Author:
Kai Kreuzer - Initial contribution
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Executes the script instance and returns the execution result
    execute(org.eclipse.xtext.xbase.interpreter.IEvaluationContext evaluationContext)
    Executes the script instance with a given evaluation context and returns the execution result
  • Field Details

  • Method Details

    • execute

      Executes the script instance and returns the execution result
      Returns:
      the execution result or null, if the script does not have a return value
      Throws:
      ScriptExecutionException - if an error occurs during the execution
    • execute

      Object execute(org.eclipse.xtext.xbase.interpreter.IEvaluationContext evaluationContext) throws ScriptExecutionException
      Executes the script instance with a given evaluation context and returns the execution result
      Parameters:
      evaluationContext - the evaluation context is a map of variables (name, object) that should be available during the script execution
      Returns:
      the execution result or null, if the script does not have a return value
      Throws:
      ScriptExecutionException - if an error occurs during the execution