org.mmbase.applications.vprowizards.spring
Class BasicCommandFactory
java.lang.Object
org.mmbase.applications.vprowizards.spring.BasicCommandFactory
- All Implemented Interfaces:
- CommandFactory
public class BasicCommandFactory
- extends Object
- implements CommandFactory
This class will create an instance of BasicCommand and set the action classes on it.
It uses a given ActionMappingResolver instance to resolve what name to map the action to, or
how the actions wille be accesible through the requests.
- Author:
- ebunders
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicCommandFactory
public BasicCommandFactory()
getNewInstance
public Command getNewInstance()
- Specified by:
getNewInstance in interface CommandFactory
- Throws:
RuntimeException - when the commandClass field is null or something goes wrong with the instantiation process.
setActionClasses
public void setActionClasses(List<Class<? extends Action>> actionClasses)
- This method accepts a list of classes that implement
Action
Only the classes that qualify are added.
- Parameters:
actionClasses -
getActionClasses
public List<Class<? extends Action>> getActionClasses()
getNameResolver
public ActionMappingResolver getNameResolver()
setActionMappingResolver
public void setActionMappingResolver(ActionMappingResolver actionMappingResolver)
- You can insert your own mapping resolver for your actions.
Default a ClassBasedNameResolver is used
- Parameters:
actionMappingResolver -
MMBase 2.0-SNAPSHOT - null