org.pm4j.core.pm
Interface PmCommandDecorator

All Known Implementing Classes:
PmCommandDecoratorImpl

public interface PmCommandDecorator

Interface for command logic that may be added to commands just by adding decorator instances to the command execution logic.

Author:
olaf boede

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.
 

Method Detail

beforeDo

boolean beforeDo(PmCommand cmd)
This method will be called before command execution.

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

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

void afterDo(PmCommand cmd)
This method will be called after successful command execution.

Parameters:
cmd - The command that has been executed.