org.abstracthorizon.danube.webflow
Class DanubeFlowController

java.lang.Object
  extended by org.abstracthorizon.danube.webflow.DanubeFlowController
All Implemented Interfaces:
Controller

public class DanubeFlowController
extends Object
implements Controller

Flow execution manager for Danube MVC. This is a glue between Spring Webflow and Danube.

Note: Code is based on the code from FlowController by Erwin Vervaet and Keith Donald

Author:
Daniel Sendula

Constructor Summary
DanubeFlowController()
          Constructor.
 
Method Summary
 org.springframework.webflow.executor.support.FlowExecutorArgumentExtractor getArgumentExtractor()
          Returns argument extractor used by this controller.
 Map<String,Object> getAttributes()
          Returns attributes as a map
 org.springframework.webflow.executor.FlowExecutor getFlowExecutor()
          Returns flow executor.
 HTTPSessionManager getSessionManager()
          Returns session manaager
 ModelAndView handleRequest(Connection connection)
          Handles request
 void setArgumentExtractor(org.springframework.webflow.executor.support.FlowExecutorArgumentExtractor parameterExtractor)
          Sets argument extractor to be used.
 void setAttributes(Map<String,Object> attributes)
          Sets attributes map
 void setDefaultFlowId(String defaultFlowId)
          Sets default flow id if none is specified with the parameters.
 void setFlowExecutor(org.springframework.webflow.executor.FlowExecutor flowExecutor)
          Sets flow executor.
 void setSessionManager(HTTPSessionManager sessionManager)
          Sets session manager
protected  ModelAndView toModelAndView(org.springframework.webflow.executor.ResponseInstruction response, org.springframework.webflow.context.ExternalContext context)
          Returns model and a view combination
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DanubeFlowController

public DanubeFlowController()
Constructor.

Method Detail

getFlowExecutor

public org.springframework.webflow.executor.FlowExecutor getFlowExecutor()
Returns flow executor.

Returns:
flow executor

setFlowExecutor

public void setFlowExecutor(org.springframework.webflow.executor.FlowExecutor flowExecutor)
Sets flow executor.

Parameters:
flowExecutor - flow executor

getArgumentExtractor

public org.springframework.webflow.executor.support.FlowExecutorArgumentExtractor getArgumentExtractor()
Returns argument extractor used by this controller.

Returns:
argument extractor

setArgumentExtractor

public void setArgumentExtractor(org.springframework.webflow.executor.support.FlowExecutorArgumentExtractor parameterExtractor)
Sets argument extractor to be used.

Parameters:
parameterExtractor - argument extractor

setDefaultFlowId

public void setDefaultFlowId(String defaultFlowId)
Sets default flow id if none is specified with the parameters.

Parameters:
defaultFlowId - default flow id

handleRequest

public ModelAndView handleRequest(Connection connection)
                           throws ConnectionException
Handles request

Specified by:
handleRequest in interface Controller
Parameters:
connection - connection
Returns:
model and view combination
Throws:
ConnectionException - connection exception

toModelAndView

protected ModelAndView toModelAndView(org.springframework.webflow.executor.ResponseInstruction response,
                                      org.springframework.webflow.context.ExternalContext context)
Returns model and a view combination

Parameters:
response - response instruction
context - external context
Returns:
model and view

getSessionManager

public HTTPSessionManager getSessionManager()
Returns session manaager

Returns:
http session manager

setSessionManager

public void setSessionManager(HTTPSessionManager sessionManager)
Sets session manager

Parameters:
sessionManager - http session manager

getAttributes

public Map<String,Object> getAttributes()
Returns attributes as a map

Returns:
attributes

setAttributes

public void setAttributes(Map<String,Object> attributes)
Sets attributes map

Parameters:
attributes - attributes


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.