org.openwms.core.service.listener
Interface OnRemovalListener<T extends AbstractEntity>

Type Parameters:
T - Any kind of AbstractEntity
All Known Implementing Classes:
TransportUnitRemovalListener

public interface OnRemovalListener<T extends AbstractEntity>

An OnRemovalListener is able to hook in the lifecycle of an entity class. A class implementing this interface is called before an entity of type T is removed.

Since:
0.1
Version:
$Revision: 1538 $
Author:
Tina Russell

Method Summary
 boolean preRemove(T entity)
          Do something prior the entity instance is been removed.
 

Method Detail

preRemove

boolean preRemove(T entity)
                  throws RemovalNotAllowedException
Do something prior the entity instance is been removed.

Parameters:
entity - The instance to be removed.
Returns:
true if removal is allowed, otherwise false
Throws:
RemovalNotAllowedException - When it is not allowed to remove the entity, because depending items exist


Copyright © 2005-2011 openwms.org. All Rights Reserved.