Class DeclarativeWebScript
java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.DeclarativeWebScript
- All Implemented Interfaces:
WebScript
Script/template driven based implementation of an Web Script
- Author:
- davidc
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
AbstractWebScript.ScriptDetails -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidexecute(WebScriptRequest req, WebScriptResponse res) Execute the Serviceprotected voidexecuteFinallyImpl(WebScriptRequest req, Status status, Cache cache, Map<String, Object> model) Execute custom Java logic to clean up any resourcesexecuteImpl(WebScriptRequest req, Status status) Deprecated.executeImpl(WebScriptRequest req, Status status, Cache cache) Execute custom Java logicexecuteImpl(WebScriptRequest req, WebScriptStatus status) Deprecated.Get map of template parameters that are available with given request.protected final voidRender a template (of given format) to the Web Script ResponseMethods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
-
Constructor Details
-
DeclarativeWebScript
public DeclarativeWebScript()
-
-
Method Details
-
execute
Description copied from interface:WebScriptExecute the Service- Parameters:
req- WebScriptRequest representing the request to this serviceres- WebScriptResponse encapsulating the result of this service- Throws:
IOException
-
executeImpl
Deprecated.Execute custom Java logic- Parameters:
req- Web Script requeststatus- Web Script status- Returns:
- custom service model
-
executeImpl
Deprecated.Execute custom Java logic- Parameters:
req- Web Script requeststatus- Web Script status- Returns:
- custom service model
-
executeImpl
Execute custom Java logic- Parameters:
req- Web Script requeststatus- Web Script statuscache- Web Script cache- Returns:
- custom service model
-
executeFinallyImpl
protected void executeFinallyImpl(WebScriptRequest req, Status status, Cache cache, Map<String, Object> model) Execute custom Java logic to clean up any resources- Parameters:
req- Web Script requeststatus- Web Script statuscache- Web Script cachemodel- model
-
renderFormatTemplate
Render a template (of given format) to the Web Script Response- Parameters:
format- template format (null, default format)model- data model to renderwriter- where to output
-
getTemplateModel
public Map<String,Object> getTemplateModel(WebScriptRequest req, WebScriptResponse res) throws IOException Get map of template parameters that are available with given request. This method is for FreeMarker Editor Extension plugin of Surf Dev Tools.- Parameters:
req- webscript requestres- webscript response- Returns:
- Map
- Throws:
IOException
-