jmmvc
Class MultiCommand

java.lang.Object
  extended by jmmvc.Command
      extended by jmmvc.MultiCommand

public abstract class MultiCommand
extends Command

An abstract Command class that dispatches to a public method that is named by the request parameter method. This Command is useful for developers who prefer to combine many similar commands into a single Command subclass, in order to simplify their application design.

Version:
beta 1
Author:
Giuseppe Capodieci

Field Summary
 
Fields inherited from class jmmvc.Command
application, request, response, session
 
Constructor Summary
MultiCommand()
           
 
Method Summary
 ViewForward execute(UserRequest userRequest)
          Implementation of asbtract superclass method.
 
Methods inherited from class jmmvc.Command
getName, getPathForward, getRequestAttribute, getResourceAsStream, getSessionAttribute, getViewForward, getViewForward, getViewForward, invalidateSession, removeApplicationAttribute, removeRequestAttribute, removeSessionAttribute, setApplicationAttribute, setName, setRequestAttribute, setSessionAttribute, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiCommand

public MultiCommand()
Method Detail

execute

public ViewForward execute(UserRequest userRequest)
                    throws java.lang.Exception
Implementation of asbtract superclass method. Dispatch the request to a specific method implemented in MultiCommand subclasses

Specified by:
execute in class Command
Parameters:
userRequest - - the incoming user request
Returns:
a ViewForward to indicate which resource should handle the response
Throws:
java.lang.Exception