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 ofScriptingService
- Since:
- 4.0
- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description protected ScriptingServiceInternal
scriptingServiceInternal
-
Constructor Summary
Constructors Constructor Description ScriptingServiceImpl(ScriptingServiceInternal scriptingServiceInternal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Valid Object
executeRestScript(String siteId, String path, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Executes a REST script from the site repositoryvoid
reload(String siteId)
Reloads the classpath for the given site
-
-
-
Field Detail
-
scriptingServiceInternal
protected ScriptingServiceInternal scriptingServiceInternal
-
-
Constructor Detail
-
ScriptingServiceImpl
@ConstructorProperties("scriptingServiceInternal") public ScriptingServiceImpl(ScriptingServiceInternal scriptingServiceInternal)
-
-
Method Detail
-
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 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
public void reload(String siteId)
Description copied from interface:ScriptingService
Reloads the classpath for the given site- Specified by:
reload
in interfaceScriptingService
- Parameters:
siteId
- the id of the site
-
-