Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.webflow.mvc.servlet
Class FlowController

    java.lang.Object
      org.springframework.webflow.mvc.servlet.FlowController

All Implemented Interfaces:
  org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.servlet.mvc.Controller

    public class FlowController

extends java.lang.Object
implements org.springframework.web.servlet.mvc.Controller, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean

The adapter between the Spring MVC Controller layer and the Spring Web Flow engine. This controller allows Spring Web Flow to run embedded as a Controller within a DispatcherServlet, the key piece of the Spring Web MVC platform. It is expected a DispatcherServlet HandlerMapping will care for mapping all requests for flows to this controller for handling.

Author:
  Keith Donald

Constructor Summary
`FlowController()` Creates a new flow controller.

Method Summary
`void` | `afterPropertiesSet()`
`AjaxHandler` | `getAjaxHandler()` Returns the configured Ajax handler.
`FlowExecutor` | `getFlowExecutor()` Returns the central service for executing flows.
`FlowHandlerAdapter` | `getFlowHandlerAdapter()` Returns the flow handler adapter which this Controller uses internally to carry out handler workflow.
`FlowUrlHandler` | `getFlowUrlHandler()` Returns the configured flow url handler.
`org.springframework.web.servlet.ModelAndView` | `handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
`void` | `registerFlowHandler(FlowHandler flowHandler)` Registers a flow handler this controller should delegate to to customize the control logic associated with managing the execution of a specific flow.
`void` | `setAjaxHandler(AjaxHandler ajaxHandler)` Sets the configured Ajax handler.
`void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
`void` | `setFlowExecutor(FlowExecutor flowExecutor)` Sets the central service for executing flows.
`void` | `setFlowHandlerAdapter(FlowHandlerAdapter flowHandlerAdapter)` Sets the flow handler adapter which this Controller uses internally to carry out handler workflow.
`void` | `setFlowHandlers(java.util.Map flowHandlers)` Sets the custom flow handles for managing the access to flows in a custom manner.
`void` | `setFlowUrlHandler(FlowUrlHandler urlHandler)` Sets the configured flow url handler.
`void` | `setRedirectHttp10Compatible(boolean redirectHttp10Compatible)` Set whether redirects sent by this controller should be compatible with HTTP 1.0 clients.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FlowController

    public FlowController()

  Creates a new flow controller.

  See Also:
    `setFlowExecutor(FlowExecutor)`, `setFlowUrlHandler(FlowUrlHandler)`, `setAjaxHandler(AjaxHandler)`, `setFlowHandlerAdapter(FlowHandlerAdapter)`, `afterPropertiesSet()`

Method Detail

### getFlowExecutor

    public FlowExecutor getFlowExecutor()

  Returns the central service for executing flows. Required.

### setFlowExecutor

    public void setFlowExecutor(FlowExecutor flowExecutor)

  Sets the central service for executing flows. Required.

  Parameters:
    `flowExecutor` -

### getFlowUrlHandler

    public FlowUrlHandler getFlowUrlHandler()

  Returns the configured flow url handler.

### setFlowUrlHandler

    public void setFlowUrlHandler(FlowUrlHandler urlHandler)

  Sets the configured flow url handler.

  Parameters:
    `urlHandler` - the flow url handler.

### getAjaxHandler

    public AjaxHandler getAjaxHandler()

  Returns the configured Ajax handler.

### setAjaxHandler

    public void setAjaxHandler(AjaxHandler ajaxHandler)

  Sets the configured Ajax handler.

  Parameters:
    `ajaxHandler` - the ajax handler

### setRedirectHttp10Compatible

    public void setRedirectHttp10Compatible(boolean redirectHttp10Compatible)

  Set whether redirects sent by this controller should be compatible with HTTP 1.0 clients.

  By default, this will enforce a redirect HTTP status code of 302 by delegating to `HttpServletResponse.sendRedirect`. Setting this to false will send HTTP status code 303, which is the correct code for HTTP 1.1 clients, but not understood by HTTP 1.0 clients.

  Many HTTP 1.1 clients treat 302 just like 303, not making any difference. However, some clients depend on 303 when redirecting after a POST request; turn this flag off in such a scenario.

  See Also:
    `HttpServletResponse.sendRedirect(java.lang.String)`

### setFlowHandlers

    public void setFlowHandlers(java.util.Map flowHandlers)

  Sets the custom flow handles for managing the access to flows in a custom manner.

  Parameters:
    `flowHandlers` - the flow handler map

### registerFlowHandler

    public void registerFlowHandler(FlowHandler flowHandler)

  Registers a flow handler this controller should delegate to to customize the control logic associated with managing the execution of a specific flow.

  Parameters:
    `flowHandler` - the handler

### getFlowHandlerAdapter

    public FlowHandlerAdapter getFlowHandlerAdapter()

  Returns the flow handler adapter which this Controller uses internally to carry out handler workflow.

### setFlowHandlerAdapter

    public void setFlowHandlerAdapter(FlowHandlerAdapter flowHandlerAdapter)

  Sets the flow handler adapter which this Controller uses internally to carry out handler workflow. Call this instead of the convenience accesors to completely customize flow controller workflow.

  Parameters:
    `flowHandlerAdapter` - the flow handler adapter

### setApplicationContext

    public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                               throws org.springframework.beans.BeansException

  Specified by:
    `setApplicationContext` in interface `org.springframework.context.ApplicationContextAware`
  Throws:
    `org.springframework.beans.BeansException`

### afterPropertiesSet

    public void afterPropertiesSet()
                            throws java.lang.Exception

  Specified by:
    `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
  Throws:
    `java.lang.Exception`

### handleRequest

    public org.springframework.web.servlet.ModelAndView handleRequest(javax.servlet.http.HttpServletRequest request,
                                                                      javax.servlet.http.HttpServletResponse response)
                                                               throws java.lang.Exception

  Specified by:
    `handleRequest` in interface `org.springframework.web.servlet.mvc.Controller`
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD