org.pm4j.core.pm.impl
Class PmCommandDecoratorImpl

java.lang.Object
  extended by org.pm4j.core.pm.impl.PmCommandDecoratorImpl
All Implemented Interfaces:
PmCommandDecorator

public class PmCommandDecoratorImpl
extends java.lang.Object
implements PmCommandDecorator

A basic PmCommandDecorator implementation, providing empty implementations for all interface methods.

It may be used as a convenient base class for decorators that need to implement only some methods of the PmCommandDecorator interface.

Author:
olaf boede

Constructor Summary
PmCommandDecoratorImpl()
           
 
Method Summary
 void afterDo(PmCommand cmd)
          This method will be called after successful command execution.
 boolean beforeDo(PmCommand cmd)
          This method will be called before command execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PmCommandDecoratorImpl

public PmCommandDecoratorImpl()
Method Detail

beforeDo

public boolean beforeDo(PmCommand cmd)
Description copied from interface: PmCommandDecorator
This method will be called before command execution.

This method may prevent the execution of the command by returning false.

Specified by:
beforeDo in interface PmCommandDecorator
Parameters:
cmd - The command that is about to be executed.
Returns:
true allows the command to be executed. false prevents the command logic execution.

afterDo

public void afterDo(PmCommand cmd)
Description copied from interface: PmCommandDecorator
This method will be called after successful command execution.

Specified by:
afterDo in interface PmCommandDecorator
Parameters:
cmd - The command that has been executed.