org.mmbase.applications.vprowizards.spring
Class BasicCommand

java.lang.Object
  extended by org.mmbase.applications.vprowizards.spring.BasicCommand
All Implemented Interfaces:
Command

public class BasicCommand
extends Object
implements Command

This class accepts a number of Action objects and maps them to their names, so the data binder can access them. For each action class that is registered a Map is created, where an instance of the action class is mapped to a string id. This way you can create more than one actions of one type in one request.

Version:
$Id: BasicCommand.java 41493 2010-03-18 10:23:01Z michiel $
Author:
Ernst Bunders

Nested Class Summary
static class BasicCommand.MyFactory
          We have to wrap the Instationation Factory, becouse the LazyMap expects a factory of generic type Action, but the instantiation factory has no differentiation between the type it instantiates and the type it returns.
 
Constructor Summary
BasicCommand()
           
 
Method Summary
 void addAction(String mappingName, Class<? extends Action> actionClass)
           
 Map<String,Map<String,Action>> getActions()
           
 void processActions(HttpServletRequest request, HttpServletResponse response, ResultContainer resultContainer)
          This method should process all the action objects after the data binding was done.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicCommand

public BasicCommand()
Method Detail

getActions

public Map<String,Map<String,Action>> getActions()
Specified by:
getActions in interface Command
Returns:
the map that have all the Action instances mapped to arbitrary keys. This method is used in the databinding process, The way actions are mapped is like this: actions[]

processActions

public void processActions(HttpServletRequest request,
                           HttpServletResponse response,
                           ResultContainer resultContainer)
Description copied from interface: Command
This method should process all the action objects after the data binding was done. The class implementing this interface should make shure the actions are executed in the proper order (i.e. node create actions first and so on). The method is called after the data binding process is completed.

Specified by:
processActions in interface Command

addAction

public void addAction(String mappingName,
                      Class<? extends Action> actionClass)


MMBase 2.0-SNAPSHOT - null