org.openwms.tms.service.spring
Class TransportUnitRemovalListener

java.lang.Object
  extended by org.openwms.tms.service.spring.TransportUnitRemovalListener
All Implemented Interfaces:
OnRemovalListener<TransportUnit>

@Component
@Transactional
public class TransportUnitRemovalListener
extends Object
implements OnRemovalListener<TransportUnit>

A TransportUnitRemovalListener. Is implemented as a Voter to allow the removal of TransportUnits.

Since:
0.1
Version:
$Revision: 1583 $
Author:
Heiko Scherrer

Constructor Summary
TransportUnitRemovalListener()
           
 
Method Summary
 boolean preRemove(TransportUnit entity)
          Do something prior the entity instance is been removed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportUnitRemovalListener

public TransportUnitRemovalListener()
Method Detail

preRemove

public boolean preRemove(TransportUnit entity)
                  throws RemovalNotAllowedException
Do something prior the entity instance is been removed. The implementation verifies that no active TransportOrders exist, before a TransportUnit is going to be removed.

Specified by:
preRemove in interface OnRemovalListener<TransportUnit>
Parameters:
entity - The instance to be removed.
Returns:
true if removal is allowed, otherwise false
Throws:
RemovalNotAllowedException - when active TransportOrders exist for the TransportUnit entity.
See Also:
OnRemovalListener.preRemove(org.openwms.core.domain.AbstractEntity)


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