Class ScriptService
java.lang.Object
com.persequor.saga.modules.scripting.service.ScriptService
This class provides scripting module operations.
-
Constructor Summary
ConstructorsConstructorDescriptionScriptService
(ScriptModuleContextWrapper contextWrapper, com.persequor.extension.common.IInjector injector) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkSyntax
(ScriptFile script) Validate syntax of a given script file.<T> T
getExtension
(ScriptFile script, Class<T> extensionType) Retrieve the extension from the script file.initialScriptCode
(String language, Class<?> epInterface, ScriptFile scriptFile) Retrieve the initial code for a given script interface.
-
Constructor Details
-
ScriptService
@Inject public ScriptService(ScriptModuleContextWrapper contextWrapper, com.persequor.extension.common.IInjector injector)
-
-
Method Details
-
initialScriptCode
Retrieve the initial code for a given script interface.- Parameters:
language
- that initial code is fetched.epInterface
- - the type of extension point interface.- Returns:
- initial code.
-
checkSyntax
Validate syntax of a given script file.- Parameters:
script
- - the validated script file- Throws:
InvalidScriptException
- - if the script is invalid.
-
getExtension
Retrieve the extension from the script file.- Type Parameters:
T
- the class of returned extension.- Parameters:
script
- - the script file.extensionType
- - the type of returned extension.- Returns:
- the extension.
-