Interface ConsignmentService
-
- All Known Implementing Classes:
DefaultConsignmentService,DefaultPickupConsignmentService,MockConsignmentService
public interface ConsignmentServiceThe ConsignmentService provides methods for creating consignments for orders.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConsignmentModelcreateConsignment(AbstractOrderModel order, java.lang.String code, java.util.List<AbstractOrderEntryModel> orderEntries)Creates the consignment.WarehouseModelgetWarehouse(java.util.List<AbstractOrderEntryModel> orderEntries)Gets the warehouse.
-
-
-
Method Detail
-
createConsignment
ConsignmentModel createConsignment(AbstractOrderModel order, java.lang.String code, java.util.List<AbstractOrderEntryModel> orderEntries) throws ConsignmentCreationException
Creates the consignment.- Parameters:
order- the order. If Order is instance of OrderModel type then it is taken to relation to created consignmentorderEntries- the order entriescode- the code- Returns:
- the consignment model
- Throws:
ConsignmentCreationException- in the case of any inconsistency (e.g. warehouses not found)
-
getWarehouse
WarehouseModel getWarehouse(java.util.List<AbstractOrderEntryModel> orderEntries)
Gets the warehouse. Simple random one from possible- Parameters:
orderEntries- the order entries- Returns:
- the warehouse
-
-