org.hdiv.webflow.executor.mvc
Class HDIVFlowController
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
org.springframework.webflow.executor.mvc.FlowController
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.
- By default, to have this controller launch a new flow execution
(conversation), have the client send a
FlowExecutorArgumentHandler.getFlowIdArgumentName() request parameter
indicating the flow definition to launch.
- To have this controller participate in an existing flow execution
(conversation), have the client send a
FlowExecutorArgumentHandler.getFlowExecutionKeyArgumentName() request
parameter identifying the conversation to participate in. See the
flow-launcher sample application for examples of the various
strategies for launching and resuming flow executions.
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
| 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 |
|
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 |
HDIVFlowController
public HDIVFlowController()
- Create a new flow controller. Allows bean style usage.
- See Also:
FlowController.setFlowExecutor(FlowExecutor),
FlowController.setArgumentHandler(FlowExecutorArgumentHandler)
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
Copyright © 2008 hdiv.org. All Rights Reserved.