org.szegedi.spring.web.jsflow
Interface ScriptSelectionStrategy

All Known Implementing Classes:
UrlScriptSelectionStrategy

public interface ScriptSelectionStrategy

Interface for objects that select the flowscript to execute for a flow initiating HTTP requests.

Version:
$Id: $
Author:
Attila Szegedi

Method Summary
 java.lang.String getScriptPath(javax.servlet.http.HttpServletRequest request)
          Returns the pathname of the script that should run for a particular initial HTTP request.
 

Method Detail

getScriptPath

java.lang.String getScriptPath(javax.servlet.http.HttpServletRequest request)
                               throws org.springframework.web.servlet.ModelAndViewDefiningException
Returns the pathname of the script that should run for a particular initial HTTP request.

Parameters:
request - the HTTP request that initiates a flow
Returns:
the path of the script. null can be returned to indicate that this strategy is unable to select a script (i.e. because some data is missing in the request). The controller will respond to this by sending back a HTTP 400 "Bad Request" status. Alternatively, the strategy can throw an instance of Spring's ModelAndViewDefiningException to indicate failure.
Throws:
org.springframework.web.servlet.ModelAndViewDefiningException