Class GroovyScriptExecutor
java.lang.Object
com.persequor.saga.modules.scripting.groovy.GroovyScriptExecutor
- All Implemented Interfaces:
IScriptExecutor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkSyntax
(ScriptFile script) Will be called prior to saving to avoid saving script with syntax errors and other mistakes.void
checkSyntax
(String scriptName, String scriptContent) <T> T
getExtension
(com.persequor.extension.common.IInjector injector, ScriptFile script, Class<T> extensionType) Return an extension instance from script.
-
Constructor Details
-
GroovyScriptExecutor
public GroovyScriptExecutor()
-
-
Method Details
-
checkSyntax
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 interfaceIScriptExecutor
- Parameters:
script
- the script to validate- Throws:
InvalidScriptException
- if the script is not valid
-
checkSyntax
- 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 interfaceIScriptExecutor
- Type Parameters:
T
- - type of the Extension Point- Parameters:
injector
- - the injector which may be needed for dependency injection on the instancescript
- - the script to evaluateextensionType
- - the class/type of the Extension Point- Returns:
- an instance of an extension
-