Package org.openwms.tms.impl.removal
Class TransportUnitRemovalHandler
java.lang.Object
org.openwms.tms.impl.removal.TransportUnitRemovalHandler
A TransportUnitRemovalHandler updates existing TransportOrders in case a TransportUnit
is deleted.
- Author:
- Heiko Scherrer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationContext
private static final org.slf4j.Logger
private final TransportOrderRepository
private final StateManager
-
Constructor Summary
ConstructorDescriptionTransportUnitRemovalHandler
(TransportOrderRepository repository, org.springframework.context.ApplicationContext ctx, String cancelStartedTO, StateManager stateManager) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
cancel
(TransportOrder transportOrder) protected void
cancelInitializedOrders
(org.openwms.common.transport.api.commands.TUCommand command) protected void
checkForStarted
(org.openwms.common.transport.api.commands.TUCommand command) void
preRemove
(org.openwms.common.transport.api.commands.TUCommand command) private void
setProblem
(TransportOrder transportOrder, Message problem) protected void
unlinkCanceledOrders
(org.openwms.common.transport.api.commands.TUCommand command) protected void
unlinkFinishedOrders
(org.openwms.common.transport.api.commands.TUCommand command)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
repository
-
ctx
private final org.springframework.context.ApplicationContext ctx -
blockStates
-
stateManager
-
-
Constructor Details
-
TransportUnitRemovalHandler
TransportUnitRemovalHandler(TransportOrderRepository repository, org.springframework.context.ApplicationContext ctx, @Value("${owms.tms.block-tu-deletion-states}") String cancelStartedTO, StateManager stateManager)
-
-
Method Details
-
preRemove
@Transactional @Measured public void preRemove(org.openwms.common.transport.api.commands.TUCommand command) throws RemovalNotAllowedException - Throws:
RemovalNotAllowedException
-
checkForStarted
protected void checkForStarted(org.openwms.common.transport.api.commands.TUCommand command) -
cancel
-
setProblem
-
cancelInitializedOrders
protected void cancelInitializedOrders(org.openwms.common.transport.api.commands.TUCommand command) -
unlinkFinishedOrders
protected void unlinkFinishedOrders(org.openwms.common.transport.api.commands.TUCommand command) -
unlinkCanceledOrders
protected void unlinkCanceledOrders(org.openwms.common.transport.api.commands.TUCommand command)
-