org.springframework.webflow.mvc.portlet
Class FlowHandlerAdapter

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.portlet.context.PortletApplicationObjectSupport
          extended by org.springframework.web.portlet.handler.PortletContentGenerator
              extended by org.springframework.webflow.mvc.portlet.FlowHandlerAdapter
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.portlet.context.PortletContextAware, org.springframework.web.portlet.HandlerAdapter

public class FlowHandlerAdapter
extends org.springframework.web.portlet.handler.PortletContentGenerator
implements org.springframework.web.portlet.HandlerAdapter, org.springframework.beans.factory.InitializingBean

A custom MVC HandlerAdapter that encapsulates the generic workflow associated with executing flows in a Portlet environment. Delegates to mapped flow handlers to manage the interaction with executions of specific flow definitions.

Author:
Keith Donald, Scott Andrews

Constructor Summary
FlowHandlerAdapter()
          Creates a new flow handler adapter.
 
Method Summary
 void afterPropertiesSet()
           
 FlowExecutor getFlowExecutor()
          Returns the central service for executing flows.
 FlowUrlHandler getFlowUrlHandler()
          Returns the flow url handler.
 void handleAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, Object handler)
           
 void handleEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response, Object handler)
           
 org.springframework.web.portlet.ModelAndView handleRender(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, Object handler)
           
 org.springframework.web.portlet.ModelAndView handleResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response, Object handler)
           
 void setFlowExecutor(FlowExecutor flowExecutor)
          Sets the central service for executing flows.
 void setFlowUrlHandler(FlowUrlHandler urlHandler)
          Sets the flow url handler
 boolean supports(Object handler)
           
 
Methods inherited from class org.springframework.web.portlet.handler.PortletContentGenerator
getCacheSeconds, isRequireSession, setCacheSeconds, setRequireSession
 
Methods inherited from class org.springframework.web.portlet.context.PortletApplicationObjectSupport
setPortletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, setApplicationContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowHandlerAdapter

public FlowHandlerAdapter()
Creates a new flow handler adapter.

See Also:
setFlowExecutor(FlowExecutor), setFlowUrlHandler(FlowUrlHandler), 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 flow url handler.


setFlowUrlHandler

public void setFlowUrlHandler(FlowUrlHandler urlHandler)
Sets the flow url handler

Parameters:
urlHandler - the flow url handler

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

supports

public boolean supports(Object handler)
Specified by:
supports in interface org.springframework.web.portlet.HandlerAdapter

handleRender

public org.springframework.web.portlet.ModelAndView handleRender(javax.portlet.RenderRequest request,
                                                                 javax.portlet.RenderResponse response,
                                                                 Object handler)
                                                          throws Exception
Specified by:
handleRender in interface org.springframework.web.portlet.HandlerAdapter
Throws:
Exception

handleAction

public void handleAction(javax.portlet.ActionRequest request,
                         javax.portlet.ActionResponse response,
                         Object handler)
                  throws Exception
Specified by:
handleAction in interface org.springframework.web.portlet.HandlerAdapter
Throws:
Exception

handleEvent

public void handleEvent(javax.portlet.EventRequest request,
                        javax.portlet.EventResponse response,
                        Object handler)
Specified by:
handleEvent in interface org.springframework.web.portlet.HandlerAdapter

handleResource

public org.springframework.web.portlet.ModelAndView handleResource(javax.portlet.ResourceRequest request,
                                                                   javax.portlet.ResourceResponse response,
                                                                   Object handler)
Specified by:
handleResource in interface org.springframework.web.portlet.HandlerAdapter