Class ScriptEngineManagerImpl
java.lang.Object
org.craftercms.studio.impl.v2.scripting.ScriptEngineManagerImpl
- All Implemented Interfaces:
ScriptEngineManager
Default implementation of
ScriptEngineManager- Since:
- 4.0
- Author:
- joseross
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected org.craftercms.core.service.ContentStoreServiceprotected ContextManagerprotected Stringprotected booleanprotected String -
Constructor Summary
ConstructorsConstructorDescriptionScriptEngineManagerImpl(ContextManager contextManager, org.craftercms.core.service.ContentStoreService contentStoreService, boolean sandboxEnabled, String classesBasePath, String restBasePath, String scriptExtension) -
Method Summary
Modifier and TypeMethodDescriptionprotected groovy.util.GroovyScriptEnginecreateScriptEngine(String siteId) groovy.util.GroovyScriptEnginegetScriptEngine(String siteId) Returns theGroovyScriptEnginefor the given site, if it doesn't exist then a new one is createdvoidreloadScriptEngine(String siteId) Creates a newGroovyScriptEnginefor the given site
-
Field Details
-
scriptEngines
-
contextManager
-
contentStoreService
protected org.craftercms.core.service.ContentStoreService contentStoreService -
sandboxEnabled
protected boolean sandboxEnabled -
classesBasePath
-
restBasePath
-
scriptExtension
-
-
Constructor Details
-
ScriptEngineManagerImpl
@ConstructorProperties({"contextManager","contentStoreService","sandboxEnabled","classesBasePath","restBasePath","scriptExtension"}) public ScriptEngineManagerImpl(ContextManager contextManager, org.craftercms.core.service.ContentStoreService contentStoreService, boolean sandboxEnabled, String classesBasePath, String restBasePath, String scriptExtension)
-
-
Method Details
-
getScriptEngine
Description copied from interface:ScriptEngineManagerReturns theGroovyScriptEnginefor the given site, if it doesn't exist then a new one is created- Specified by:
getScriptEnginein interfaceScriptEngineManager- Parameters:
siteId- the id fo the site- Returns:
- the script engine instance
-
createScriptEngine
-
reloadScriptEngine
Description copied from interface:ScriptEngineManagerCreates a newGroovyScriptEnginefor the given site- Specified by:
reloadScriptEnginein interfaceScriptEngineManager- Parameters:
siteId- the id of the site
-