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 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 Details

  • Method Details

    • 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(Map<String,FlowHandler> 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 Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • handleRequest

      public org.springframework.web.servlet.ModelAndView handleRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws Exception
      Specified by:
      handleRequest in interface org.springframework.web.servlet.mvc.Controller
      Throws:
      Exception