|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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
public class 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.
FlowExecutorArgumentHandler.getFlowIdArgumentName() request parameter indicating the flow definition to
launch.
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).
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 | |
|---|---|
FlowController()
Create a new flow controller. |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected FlowRequestHandler |
createRequestHandler()
Factory method that creates a new helper for processing a request into this flow controller. |
FlowExecutorArgumentHandler |
getArgumentHandler()
Returns the flow executor argument handler used by this controller. |
FlowExecutor |
getFlowExecutor()
Returns the flow executor used by this controller. |
protected org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
setArgumentHandler(FlowExecutorArgumentHandler argumentHandler)
Sets the flow executor argument handler to use. |
void |
setDefaultFlowId(java.lang.String defaultFlowId)
Sets the identifier of the default flow to launch if no flowId argument can be extracted by the configured FlowExecutorArgumentHandler during request processing. |
void |
setFlowExecutor(FlowExecutor flowExecutor)
Sets the flow executor to use; setting this property is required. |
protected org.springframework.web.servlet.ModelAndView |
toModelAndView(ResponseInstruction responseInstruction,
ExternalContext context)
Create a ModelAndView object based on the information in the selected response instruction. |
| 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 |
|---|
public FlowController()
setFlowExecutor(FlowExecutor),
setArgumentHandler(FlowExecutorArgumentHandler)| Method Detail |
|---|
public FlowExecutor getFlowExecutor()
public void setFlowExecutor(FlowExecutor flowExecutor)
flowExecutor - the fully configured flow executor to usepublic FlowExecutorArgumentHandler getArgumentHandler()
RequestParameterFlowExecutorArgumentHandler.
public void setArgumentHandler(FlowExecutorArgumentHandler argumentHandler)
RequestParameterFlowExecutorArgumentHandler.
argumentHandler - the fully configured argument handlerpublic void setDefaultFlowId(java.lang.String defaultFlowId)
FlowExecutorArgumentHandler during request processing.
This is a convenience method that sets the default flow id of the controller's argument handler. Don't use this
when using setArgumentHandler(FlowExecutorArgumentHandler).
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
protected org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
handleRequestInternal in class org.springframework.web.servlet.mvc.AbstractControllerjava.lang.Exceptionprotected FlowRequestHandler createRequestHandler()
FlowRequestHandler.
protected org.springframework.web.servlet.ModelAndView toModelAndView(ResponseInstruction responseInstruction,
ExternalContext context)
responseInstruction - the response instruction to convert
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||