Package org.mwolff.command
Class AbstractDefaultCommand<T>
- java.lang.Object
-
- org.mwolff.command.AbstractDefaultCommand<T>
-
- All Implemented Interfaces:
Command<T>
- Direct Known Subclasses:
AbstractDefaultChainCommand
,ActionListToCommandContainerCommand
,InputSourceReaderCommand
,SaxParserCommand
public abstract class AbstractDefaultCommand<T> extends Object implements Command<T>
Default implementation for a command. The command interface offers only the executeCommand method which returns as a default SUSSESS. Event the paramter object equals null, FAILURE is returned.- Since:
- 1.5.1
-
-
Constructor Summary
Constructors Constructor Description AbstractDefaultCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandTransition
executeCommand(T parameterObject)
Executes the command and returns a CommandTransition as feedback.
-
-
-
Method Detail
-
executeCommand
public CommandTransition executeCommand(T parameterObject)
Executes the command and returns a CommandTransition as feedback. Implementation should save errors in the parameter object.- Specified by:
executeCommand
in interfaceCommand<T>
- Parameters:
parameterObject
- The parameter object to pass. Should not be finalized.- Returns:
- CommandTransion.SUCCESS by default, FAILURE if the parameter equals null.
-
-