org.abstracthorizon.danube.beanconsole
Class InvokeController

java.lang.Object
  extended by org.abstracthorizon.danube.beanconsole.InvokeController
All Implemented Interfaces:
Controller

public class InvokeController
extends Object
implements Controller

Invokes an arbitrary method on selected bean. The bean is defined with all but last part of the resource path.

Author:
Daniel Sendula

Field Summary
protected  DisplayController displayController
           
 
Constructor Summary
InvokeController()
          Constructor
InvokeController(DisplayController displayController)
          Constructor
 
Method Summary
protected  void execute(Map<String,Object> model, Object current, HTTPConnection httpConnection, String methodName)
          Invokes the method
 DisplayController getDisplayController()
          Returns reference to DisplayController instance
 ModelAndView handleRequest(Connection connection)
          Method that handles a request.
 void setDisplayController(DisplayController displayController)
          Sets reference to DisplayController instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

displayController

protected DisplayController displayController
Constructor Detail

InvokeController

public InvokeController()
Constructor


InvokeController

public InvokeController(DisplayController displayController)
Constructor

Parameters:
displayController - reference to display controller
Method Detail

handleRequest

public ModelAndView handleRequest(Connection connection)
Method that handles a request. It returns following entries in model's map:

For the way navigation is done check BeanHelper.navigate(Object, String) method documentation.

Specified by:
handleRequest in interface Controller
Parameters:
connection - connection action was invoked over
Returns:
model and view response

execute

protected void execute(Map<String,Object> model,
                       Object current,
                       HTTPConnection httpConnection,
                       String methodName)
Invokes the method

Parameters:
model - model map
current - current bean
httpConnection - http connection (for paramters)
methodName - method name

getDisplayController

public DisplayController getDisplayController()
Returns reference to DisplayController instance

Returns:
reference to DisplayController instance

setDisplayController

public void setDisplayController(DisplayController displayController)
Sets reference to DisplayController instance

Parameters:
displayController - reference to DisplayController instance


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