org.springframework.extensions.webscripts
Class DeclarativeWebScript

java.lang.Object
  extended by org.springframework.extensions.webscripts.AbstractWebScript
      extended by org.springframework.extensions.webscripts.DeclarativeWebScript
All Implemented Interfaces:
WebScript
Direct Known Subclasses:
AtomWebScript, Console, ConsoleUpdate, DeclarativeWebStudioWebScript, Index, IndexAll, IndexFamily, IndexLifecycle, IndexPackage, IndexUpdate, IndexURI, JavascriptDebugger, JavascriptDebuggerPost, ServiceDump, ServiceInstall

public class DeclarativeWebScript
extends AbstractWebScript

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
DeclarativeWebScript()
           
 
Method Summary
 void execute(WebScriptRequest req, WebScriptResponse res)
          Execute the Service
protected  Map<String,Object> executeImpl(WebScriptRequest req, Status status)
          Deprecated.  
protected  Map<String,Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
          Execute custom Java logic
protected  Map<String,Object> executeImpl(WebScriptRequest req, WebScriptStatus status)
          Deprecated.  
protected  void renderFormatTemplate(String format, Map<String,Object> model, Writer writer)
          Render a template (of given format) to the Web Script Response
 
Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeclarativeWebScript

public DeclarativeWebScript()
Method Detail

execute

public final void execute(WebScriptRequest req,
                          WebScriptResponse res)
                   throws IOException
Description copied from interface: WebScript
Execute the Service

Parameters:
req - WebScriptRequest representing the request to this service
res - WebScriptResponse encapsulating the result of this service
Throws:
IOException

executeImpl

protected Map<String,Object> executeImpl(WebScriptRequest req,
                                         WebScriptStatus status)
Deprecated. 

Execute custom Java logic

Parameters:
req - Web Script request
status - Web Script status
Returns:
custom service model

executeImpl

protected Map<String,Object> executeImpl(WebScriptRequest req,
                                         Status status)
Deprecated. 

Execute custom Java logic

Parameters:
req - Web Script request
status - Web Script status
Returns:
custom service model

executeImpl

protected Map<String,Object> executeImpl(WebScriptRequest req,
                                         Status status,
                                         Cache cache)
Execute custom Java logic

Parameters:
req - Web Script request
status - Web Script status
cache - Web Script cache
Returns:
custom service model

renderFormatTemplate

protected final void renderFormatTemplate(String format,
                                          Map<String,Object> model,
                                          Writer writer)
Render a template (of given format) to the Web Script Response

Parameters:
format - template format (null, default format)
model - data model to render
writer - where to output


Copyright © 2009 SpringSource, Inc. All Rights Reserved.