Class ScriptEngineManagerImpl

java.lang.Object
org.craftercms.studio.impl.v2.scripting.ScriptEngineManagerImpl
All Implemented Interfaces:
ScriptEngineManager

public class ScriptEngineManagerImpl extends Object implements ScriptEngineManager
Default implementation of ScriptEngineManager
Since:
4.0
Author:
joseross
  • Field Details

    • scriptEngines

      protected Map<String,groovy.util.GroovyScriptEngine> scriptEngines
    • contextManager

      protected ContextManager contextManager
    • contentStoreService

      protected org.craftercms.core.service.ContentStoreService contentStoreService
    • sandboxEnabled

      protected boolean sandboxEnabled
    • classesBasePath

      protected String classesBasePath
    • restBasePath

      protected String restBasePath
    • scriptExtension

      protected String 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

      public groovy.util.GroovyScriptEngine getScriptEngine(String siteId)
      Description copied from interface: ScriptEngineManager
      Returns the GroovyScriptEngine for the given site, if it doesn't exist then a new one is created
      Specified by:
      getScriptEngine in interface ScriptEngineManager
      Parameters:
      siteId - the id fo the site
      Returns:
      the script engine instance
    • createScriptEngine

      protected groovy.util.GroovyScriptEngine createScriptEngine(String siteId)
    • reloadScriptEngine

      public void reloadScriptEngine(String siteId)
      Description copied from interface: ScriptEngineManager
      Creates a new GroovyScriptEngine for the given site
      Specified by:
      reloadScriptEngine in interface ScriptEngineManager
      Parameters:
      siteId - the id of the site