Package org.openwms.tms
Interface TransportationService<T extends TransportOrder>
- Type Parameters:
T- Any kind ofTransportOrder
- All Known Implementing Classes:
TransportationServiceImpl
public interface TransportationService<T extends TransportOrder>
A TransportationService offers some useful methods regarding the general handling of
TransportOrders.- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionchange(String barcode, TransportOrderState currentState, TransportOrderState targetState, Message message) change(TransportOrderState state, Collection<String> pKeys) Try to turn a list ofTransportOrders into the givenstate.Create a newTransportOrderwith the giventarget.findByPKey(@NotBlank String pKey) Find and return theTransportOrderidentified by the persisted keypKey.intgetNoTransportOrdersToTarget(String target, String... states) Modifies an existingTransportOrderaccording to the argument passed asTransportOrder.
-
Method Details
-
findBy
- Parameters:
barcode- The Barcode of the TransportUnitstates- A set of TransportOrder states- Returns:
- A List of all TransportOrders, never null
-
findByPKey
Find and return theTransportOrderidentified by the persisted keypKey.- Parameters:
pKey- The persisted key- Returns:
- An
TransportOrderinstance - Throws:
org.ameba.exception.NotFoundException- if no entity was found
-
getNoTransportOrdersToTarget
- Parameters:
target- The target place to search TransportOrders forstates- An array of TransportOrder states to filter TransportOrders for- Returns:
- Number of all TransportOrders in one of the
statesthat are on the way to thetarget
-
create
Create a newTransportOrderwith the giventarget.- Parameters:
barcode- The ID of theTransportUnitto movetarget- The target of the TransportOrder to move topriority- APriorityLevelof the newTransportOrder- Returns:
- The newly created
TransportOrder
-
update
Modifies an existingTransportOrderaccording to the argument passed asTransportOrder.- Parameters:
transportOrder- Stores the ID of theTransportOrderto change as well as the state to change- Returns:
- The modified instance
-
change
Try to turn a list ofTransportOrders into the givenstate.- Parameters:
state- The state to change all orders topKeys- The persisted keys ofTransportOrders- Returns:
- A list of persisted keys of
TransportOrders that have not been changed
-
change
Collection<Message> change(String barcode, TransportOrderState currentState, TransportOrderState targetState, Message message) - Parameters:
barcode- The ID of theTransportUnitto movecurrentState- The state of TransportOrders to changetargetState- The state to change all orders tomessage- A messages attached to the changed TransportOrder, may be null- Returns:
- A list of Messages according to the
TransportOrders that have not been changed
-