Interface AllocationService
-
- All Known Implementing Classes:
DefaultAllocationService
,DefaultRevenueCloudAllocationService
public interface AllocationService
Service layer to create consignments.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
autoReallocate(DeclineEntries declinedEntries)
CreatesDeclineConsignmentEntryEventModel
items to represent the reallocations that can be retrieved byConsignmentEntryModel.getDeclineEntryEvents()
.ConsignmentModel
createConsignment(AbstractOrderModel order, java.lang.String code, SourcingResult result)
Create a consignment for the sourcing result.
The consignment and the order will be persisted after creation and updates.java.util.Collection<ConsignmentModel>
createConsignments(AbstractOrderModel order, java.lang.String code, SourcingResults results)
Create consignments for the sourcing results gathered from the sourcing strategies executions.
All consignments and order will be persisted after creations and updates.java.util.Collection<ConsignmentModel>
manualReallocate(DeclineEntries declinedEntries)
Manually reallocate the consignment entries provided to a new point of service.
-
-
-
Method Detail
-
createConsignments
java.util.Collection<ConsignmentModel> createConsignments(AbstractOrderModel order, java.lang.String code, SourcingResults results)
Create consignments for the sourcing results gathered from the sourcing strategies executions.
All consignments and order will be persisted after creations and updates.- Parameters:
order
- - the order to create consignments forcode
- - the consignment code; never nullresults
- - the sourcing results collected from the sourcing strategies; never null- Returns:
- a collection of
ConsignmentModel
; never null
-
createConsignment
ConsignmentModel createConsignment(AbstractOrderModel order, java.lang.String code, SourcingResult result)
Create a consignment for the sourcing result.
The consignment and the order will be persisted after creation and updates.- Parameters:
order
- - the order to create consignments forcode
- - the consignment code; never nullresult
- - the sourcing results collected from the sourcing strategies; never null- Returns:
- a
ConsignmentModel
; never null
-
manualReallocate
java.util.Collection<ConsignmentModel> manualReallocate(DeclineEntries declinedEntries)
Manually reallocate the consignment entries provided to a new point of service. Creates new consignments for the items that were reallocated. This will also createDeclineConsignmentEntryEventModel
items to represent the reallocations that can be retrieved byConsignmentEntryModel.getDeclineEntryEvents()
.Furthermore, the service can only reallocate an item if it is pending as in
ConsignmentEntryModel.getQuantityPending()
.- Parameters:
declinedEntries
- - the collection of decline entries to be reallocated- Returns:
- the collection of newly created consignments
-
autoReallocate
void autoReallocate(DeclineEntries declinedEntries)
CreatesDeclineConsignmentEntryEventModel
items to represent the reallocations that can be retrieved byConsignmentEntryModel.getDeclineEntryEvents()
.Furthermore, the service can only reallocate an item if it is pending as in
ConsignmentEntryModel.getQuantityPending()
.- Parameters:
declinedEntries
- - the collection of decline entries to be reallocated
-
-