com.itmusings.owiz.impl
Class CommandBase<InputType>

java.lang.Object
  extended by com.itmusings.owiz.impl.CommandBase<InputType>
All Implemented Interfaces:
Command<InputType>
Direct Known Subclasses:
Chain, DelegatorCommand, Router

public abstract class CommandBase<InputType>
extends Object
implements Command<InputType>

Base class to implement command functionality. Typically should get customized for individual implementations. Inherit this command and over-ride the pre and post process methods.

Author:
Raja Shankar Kolluru

Constructor Summary
CommandBase()
           
 
Method Summary
protected abstract  void doExecute(InputType context)
           
 void execute(InputType context)
           
protected  String getConfigValue(InputType context, String name)
           
 void postprocess(InputType context)
           
 void preprocess(InputType context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandBase

public CommandBase()
Method Detail

execute

public final void execute(InputType context)
                   throws Exception
Specified by:
execute in interface Command<InputType>
Throws:
Exception

doExecute

protected abstract void doExecute(InputType context)
                           throws Exception
Throws:
Exception

preprocess

public void preprocess(InputType context)
                throws Exception
Throws:
Exception

postprocess

public void postprocess(InputType context)
                 throws Exception
Throws:
Exception

getConfigValue

protected String getConfigValue(InputType context,
                                String name)


Copyright © 2010 ITMUSINGS. All Rights Reserved.