Package net.officefloor.javascript
Class JavaScriptProcedureSourceServiceFactory
java.lang.Object
net.officefloor.script.AbstractScriptProcedureSourceServiceFactory
net.officefloor.javascript.JavaScriptProcedureSourceServiceFactory
- All Implemented Interfaces:
ProcedureSourceServiceFactory,ServiceFactory<ProcedureSource>
public class JavaScriptProcedureSourceServiceFactory
extends AbstractScriptProcedureSourceServiceFactory
JavaScript function
ProcedureSourceServiceFactory.- Author:
- Daniel Sagenschneider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddecorateScriptEngine(ScriptEngine engine, SourceContext context) Enables overriding to decorate theScriptEngine.protected StringgetMetaDataScriptPath(SourceContext context) Obtains the path to the script that extracts the function meta-data.protected StringgetScriptEngineName(SourceContext context) Obtains the name of theScriptEngine.protected ScriptExceptionTranslatorObtains theScriptExceptionTranslator.protected String[]getScriptFileExtensions(SourceContext context) Obtains the extensions for the script resource.protected StringObtains the source name for thisProcedureSource.Methods inherited from class net.officefloor.script.AbstractScriptProcedureSourceServiceFactory
createService, getSetupScriptPath, listProcedures, loadManagedFunction, loadResourceScript, loadScriptEngine, loadSetupScript
-
Constructor Details
-
JavaScriptProcedureSourceServiceFactory
public JavaScriptProcedureSourceServiceFactory()
-
-
Method Details
-
getSourceName
Description copied from class:AbstractScriptProcedureSourceServiceFactoryObtains the source name for thisProcedureSource.- Specified by:
getSourceNamein classAbstractScriptProcedureSourceServiceFactory- Returns:
- Source name for this
ProcedureSource.
-
getScriptFileExtensions
Description copied from class:AbstractScriptProcedureSourceServiceFactoryObtains the extensions for the script resource.- Specified by:
getScriptFileExtensionsin classAbstractScriptProcedureSourceServiceFactory- Parameters:
context-SourceContext.- Returns:
- Extensions for the script resource.
- Throws:
Exception- If fails to obtain the file extensions.
-
getScriptEngineName
Description copied from class:AbstractScriptProcedureSourceServiceFactoryObtains the name of theScriptEngine.- Specified by:
getScriptEngineNamein classAbstractScriptProcedureSourceServiceFactory- Parameters:
context-SourceContext.- Returns:
- Name of the
ScriptEngine. - Throws:
Exception- If fails to obtain the name of theScriptEngine.
-
decorateScriptEngine
Description copied from class:AbstractScriptProcedureSourceServiceFactoryEnables overriding to decorate theScriptEngine.- Overrides:
decorateScriptEnginein classAbstractScriptProcedureSourceServiceFactory- Parameters:
engine-ScriptEngine.context-SourceContext.- Throws:
Exception- If fails to decorate theScriptEngine.
-
getMetaDataScriptPath
Description copied from class:AbstractScriptProcedureSourceServiceFactoryObtains the path to the script that extracts the function meta-data.- Specified by:
getMetaDataScriptPathin classAbstractScriptProcedureSourceServiceFactory- Parameters:
context-SourceContext.- Returns:
- Path to the script that extracts the function meta-data.
- Throws:
Exception- If fails to obtain the path to the function meta-data script.
-
getScriptExceptionTranslator
Description copied from class:AbstractScriptProcedureSourceServiceFactoryObtains theScriptExceptionTranslator.- Overrides:
getScriptExceptionTranslatorin classAbstractScriptProcedureSourceServiceFactory- Returns:
ScriptExceptionTranslator.
-