HDIV API 2.0.4

org.hdiv.webflow.executor.mvc
Class HDIVFlowController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.springframework.webflow.executor.mvc.FlowController
                      extended by org.hdiv.webflow.executor.mvc.HDIVFlowController
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

public class HDIVFlowController
extends org.springframework.webflow.executor.mvc.FlowController

Point of integration between Spring Web MVC and Spring Web Flow: a Controller that routes incoming requests to one or more managed flow executions.

Requests into the web flow system are handled by a FlowExecutor, which this class delegates to using a FlowRequestHandler helper. Consult the JavaDoc of that class for more information on how requests are processed.

Note: a single FlowController may execute all flows of your application.

Usage example:

     <!--
         Exposes flows for execution at a single request URL.
         The id of a flow to launch should be passed in by clients using
         the "_flowId" request parameter:
         e.g. /app.htm?_flowId=flow1
     -->
     <bean name="/app.htm" class="org.springframework.webflow.executor.mvc.FlowController">
         <property name="flowExecutor" ref="flowExecutor"/>
     </bean>
 

It is also possible to customize the FlowExecutorArgumentHandler strategy to allow for different types of controller parameterization, for example perhaps in conjunction with a REST-style request mapper (see RequestPathFlowExecutorArgumentHandler).

Since:
HDIV 2.0.3
Author:
Gorka Vicente
See Also:
FlowExecutor, FlowRequestHandler, FlowExecutorArgumentHandler

Field Summary
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
HDIVFlowController()
          Create a new flow controller.
 
Method Summary
protected  org.springframework.web.servlet.ModelAndView toModelAndView(org.springframework.webflow.executor.ResponseInstruction responseInstruction, org.springframework.webflow.context.ExternalContext context)
          Create a ModelAndView object based on the information in the selected response instruction.
 
Methods inherited from class org.springframework.webflow.executor.mvc.FlowController
afterPropertiesSet, createRequestHandler, getArgumentHandler, getFlowExecutor, handleRequestInternal, setArgumentHandler, setDefaultFlowId, setFlowExecutor
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HDIVFlowController

public HDIVFlowController()
Create a new flow controller. Allows bean style usage.

See Also:
FlowController.setFlowExecutor(FlowExecutor), FlowController.setArgumentHandler(FlowExecutorArgumentHandler)
Method Detail

toModelAndView

protected org.springframework.web.servlet.ModelAndView toModelAndView(org.springframework.webflow.executor.ResponseInstruction responseInstruction,
                                                                      org.springframework.webflow.context.ExternalContext context)
Create a ModelAndView object based on the information in the selected response instruction. Subclasses can override this to return a specialized ModelAndView or to do custom processing on it.

Overrides:
toModelAndView in class org.springframework.webflow.executor.mvc.FlowController
Parameters:
responseInstruction - the response instruction to convert
Returns:
a new ModelAndView object

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.