info.joseluismartin.cmd
Class DefaultCommand

java.lang.Object
  extended by info.joseluismartin.cmd.DefaultCommand
All Implemented Interfaces:
Command

public class DefaultCommand
extends Object
implements Command

Simple base command to extends that do nothing

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Constructor Summary
DefaultCommand()
           
 
Method Summary
 boolean execute(Object data)
          Execute the command
 String getName()
           
 void onFault(Object data)
          Handle fault on command chain.
 void setName(String name)
           
 void undo()
          Undo the command, do nothig by default.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCommand

public DefaultCommand()
Method Detail

execute

public boolean execute(Object data)
Execute the command

Specified by:
execute in interface Command
Parameters:
data - generic command data
Returns:
true if command ok.

onFault

public void onFault(Object data)
Handle fault on command chain.

Specified by:
onFault in interface Command
Parameters:
data - generic command data

getName

public String getName()
Specified by:
getName in interface Command
Returns:
the name

setName

public void setName(String name)
Parameters:
name - the name to set

undo

public void undo()
Undo the command, do nothig by default.

Specified by:
undo in interface Command


Copyright © 2012 JDAL. All Rights Reserved.