Class ScriptingServiceImpl

java.lang.Object
org.craftercms.studio.impl.v2.service.scripting.ScriptingServiceImpl
All Implemented Interfaces:
ScriptingService

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

  • Constructor Details

  • Method Details

    • executeRestScript

      @Valid public @Valid Object executeRestScript(String siteId, String path, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws groovy.util.ResourceException, groovy.util.ScriptException, ConfigurationException
      Description copied from interface: ScriptingService
      Executes a REST script from the site repository
      Specified by:
      executeRestScript in interface ScriptingService
      Parameters:
      siteId - the id of the site
      path - the path of the script
      request - the current request
      response - the current response
      Returns:
      the value returned by the script
      Throws:
      groovy.util.ResourceException - if there is any error loading the script
      groovy.util.ScriptException - if there is any error executing the script
      ConfigurationException
    • reload

      public void reload(String siteId)
      Description copied from interface: ScriptingService
      Reloads the classpath for the given site
      Specified by:
      reload in interface ScriptingService
      Parameters:
      siteId - the id of the site