Class ScriptingServiceImpl
java.lang.Object
org.craftercms.studio.impl.v2.service.scripting.ScriptingServiceImpl
- All Implemented Interfaces:
ScriptingService
Default implementation of
ScriptingService- Since:
- 4.0
- Author:
- joseross
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Valid ObjectexecuteRestScript(String siteId, String path, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Executes a REST script from the site repositoryvoidReloads the classpath for the given site
-
Field Details
-
scriptingServiceInternal
-
-
Constructor Details
-
ScriptingServiceImpl
@ConstructorProperties("scriptingServiceInternal") public ScriptingServiceImpl(ScriptingServiceInternal scriptingServiceInternal)
-
-
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:ScriptingServiceExecutes a REST script from the site repository- Specified by:
executeRestScriptin interfaceScriptingService- Parameters:
siteId- the id of the sitepath- the path of the scriptrequest- the current requestresponse- the current response- Returns:
- the value returned by the script
- Throws:
groovy.util.ResourceException- if there is any error loading the scriptgroovy.util.ScriptException- if there is any error executing the scriptConfigurationException
-
reload
Description copied from interface:ScriptingServiceReloads the classpath for the given site- Specified by:
reloadin interfaceScriptingService- Parameters:
siteId- the id of the site
-