Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.infohazard.maverick.flow
Class CommandBase  view CommandBase download CommandBase.java

java.lang.Object
  extended byorg.infohazard.maverick.flow.CommandBase
All Implemented Interfaces:
Command
Direct Known Subclasses:
CommandMultipleViews, CommandSingleView

abstract class CommandBase
extends java.lang.Object
implements Command

Base class for implementing a Maverick Command. Implementors must define getView(java.lang.String) 55 .

CommandBase obtains a View name by calling its Controller's go 55 method, and then invokes the View's go 55 method.

The ModelLifetime interface is honored. After invoking View.go, if the model object is an instance of ModelLifetime, its discard 55 method is called.


Field Summary
protected  Controller controller
           Reference to our Controller.
private static org.apache.commons.logging.Log log
           CommandBase logger.
 
Constructor Summary
CommandBase(Controller ctl)
           Set reference to out Controller.
 
Method Summary
protected abstract  View getView(java.lang.String name)
           
 void go(MaverickContext mctx)
           Execute the Command and render the results!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

CommandBase logger.


controller

protected Controller controller

Reference to our Controller.

Constructor Detail

CommandBase

public CommandBase(Controller ctl)

Set reference to out Controller.

Method Detail

go

public void go(MaverickContext mctx)
        throws java.io.IOException,
               javax.servlet.ServletException
Description copied from interface: Command

Execute the Command and render the results!

Specified by:
go in interface Command

getView

protected abstract View getView(java.lang.String name)