Class GroovyScriptExecutor

java.lang.Object
com.persequor.saga.modules.scripting.groovy.GroovyScriptExecutor
All Implemented Interfaces:
IScriptExecutor

@Singleton public class GroovyScriptExecutor extends Object implements IScriptExecutor
  • Constructor Details

    • GroovyScriptExecutor

      public GroovyScriptExecutor()
  • Method Details

    • checkSyntax

      public void checkSyntax(ScriptFile script) throws InvalidScriptException
      Description copied from interface: IScriptExecutor
      Will be called prior to saving to avoid saving script with syntax errors and other mistakes.
      Specified by:
      checkSyntax in interface IScriptExecutor
      Parameters:
      script - the script to validate
      Throws:
      InvalidScriptException - if the script is not valid
    • checkSyntax

      public void checkSyntax(String scriptName, String scriptContent) throws InvalidScriptException
      Throws:
      InvalidScriptException
    • getExtension

      public <T> T getExtension(com.persequor.extension.common.IInjector injector, ScriptFile script, Class<T> extensionType)
      Description copied from interface: IScriptExecutor
      Return an extension instance from script.
      Specified by:
      getExtension in interface IScriptExecutor
      Type Parameters:
      T - - type of the Extension Point
      Parameters:
      injector - - the injector which may be needed for dependency injection on the instance
      script - - the script to evaluate
      extensionType - - the class/type of the Extension Point
      Returns:
      an instance of an extension