Package org.openwms.tms.impl.state
Class StateManagerImpl
java.lang.Object
org.openwms.tms.impl.state.StateManagerImpl
- All Implemented Interfaces:
StateManager
A StateManagerImpl.
- Author:
- Heiko Scherrer
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final TransportOrderRepository
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorDescriptionStateManagerImpl
(org.ameba.i18n.Translator translator, TransportOrderRepository repo) -
Method Summary
Modifier and TypeMethodDescriptionvoid
validate
(TransportOrderState newState, TransportOrder transportOrder) Validates if the requested state transition tonewState
is valid or not.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
translator
private final org.ameba.i18n.Translator translator -
repo
-
-
Constructor Details
-
StateManagerImpl
StateManagerImpl(org.ameba.i18n.Translator translator, TransportOrderRepository repo)
-
-
Method Details
-
validate
@Measured public void validate(TransportOrderState newState, TransportOrder transportOrder) throws StateChangeException Description copied from interface:StateManager
Validates if the requested state transition tonewState
is valid or not. Does not change the state of the giventransportOrder.
- Specified by:
validate
in interfaceStateManager
- Parameters:
newState
- The new statetransportOrder
- The TransportOrder to check the state transition for- Throws:
StateChangeException
- in case of errors
-