Class DefaultConsignmentCancellationService
java.lang.Object
de.hybris.platform.warehousing.cancellation.impl.DefaultConsignmentCancellationService
- All Implemented Interfaces:
ConsignmentCancellationService
public class DefaultConsignmentCancellationService
extends Object
implements ConsignmentCancellationService
Cancellation service implementation that will create cancellation events associated with the consignment entries.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancelConsignment(ConsignmentModel consignment, OrderCancelResponse orderCancelResponse) Cancel a consignment.protected voidcreateCancellationEventForInternalWarehouse(ConsignmentEntryModel consignmentEntry, CancelReason myReason) Create cancellation event in case the warehouse is not "marked" as external.protected LonggetAlreadyCancelledQty(Map<AbstractOrderEntryModel, Long> orderCancelEntriesCompleted, OrderCancelEntry orderCancelEntry) Gets the already cancelled quantityprotected WarehousingCommentServiceprotected OrderModificationRecordEntryModelgetCurrentCancelRecordEntry(OrderCancelResponse orderCancelResponse) protected GuidKeyGeneratorprotected InventoryEventServiceprotected ModelServiceprotected List<ConsignmentStatus>protected WarehousingConsignmentWorkflowServiceprotected voidmoveProcessAndTerminateWorkflow(OrderCancelResponse orderCancelResponse, Map<AbstractOrderEntryModel, Long> orderCancelEntriesCompleted, OrderCancelEntry orderCancelEntry) Moves the consignment business process and terminates the consignment workflowvoidprocessConsignmentCancellation(OrderCancelResponse orderCancelResponse) Cancel consignments linked to anOrderCancelResponse.protected voidsaveSourceOrderEntryToCancelledConsignmentEntry(OrderCancelEntry orderCancelEntry, OrderCancelResponse orderCancelResponse) voidsetConsignmentBusinessProcessService(WarehousingBusinessProcessService<ConsignmentModel> consignmentBusinessProcessService) voidsetConsignmentEntryCommentService(WarehousingCommentService consignmentEntryCommentService) voidsetGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator) voidsetInventoryEventService(InventoryEventService inventoryEventService) voidsetModelService(ModelService modelService) voidsetNonCancellableConsignmentStatus(List<ConsignmentStatus> nonCancellableConsignmentStatus) voidsetWarehousingConsignmentWorkflowService(WarehousingConsignmentWorkflowService warehousingConsignmentWorkflowService)
-
Field Details
-
COMMENT_SUBJECT
- See Also:
-
CONSIGNMENT_ACTION_EVENT_NAME
- See Also:
-
CANCEL_CONSIGNMENT_CHOICE
- See Also:
-
-
Constructor Details
-
DefaultConsignmentCancellationService
public DefaultConsignmentCancellationService()
-
-
Method Details
-
processConsignmentCancellation
Description copied from interface:ConsignmentCancellationServiceCancel consignments linked to anOrderCancelResponse. It creates cancellation events accordingly and will trigger another sourcing if necessary It cancels all the consignments for the given product- Specified by:
processConsignmentCancellationin interfaceConsignmentCancellationService- Parameters:
orderCancelResponse- the order cancel response
-
saveSourceOrderEntryToCancelledConsignmentEntry
protected void saveSourceOrderEntryToCancelledConsignmentEntry(OrderCancelEntry orderCancelEntry, OrderCancelResponse orderCancelResponse) -
getCurrentCancelRecordEntry
protected OrderModificationRecordEntryModel getCurrentCancelRecordEntry(OrderCancelResponse orderCancelResponse) -
moveProcessAndTerminateWorkflow
protected void moveProcessAndTerminateWorkflow(OrderCancelResponse orderCancelResponse, Map<AbstractOrderEntryModel, Long> orderCancelEntriesCompleted, OrderCancelEntry orderCancelEntry) Moves the consignment business process and terminates the consignment workflow- Parameters:
orderCancelResponse- theOrderCancelResponseorderCancelEntriesCompleted- the map of the completed order cancel entries and their valuesorderCancelEntry- the currentOrderCancelEntry
-
getAlreadyCancelledQty
protected Long getAlreadyCancelledQty(Map<AbstractOrderEntryModel, Long> orderCancelEntriesCompleted, OrderCancelEntry orderCancelEntry) Gets the already cancelled quantity- Parameters:
orderCancelEntriesCompleted- the map of the completed order cancel entries and their valuesorderCancelEntry- the currentOrderCancelEntry- Returns:
- the calculated already cancelled quantity
-
cancelConsignment
public Map<AbstractOrderEntryModel,Long> cancelConsignment(ConsignmentModel consignment, OrderCancelResponse orderCancelResponse) Description copied from interface:ConsignmentCancellationServiceCancel a consignment. This will cancel the entire consignment and not only the quantity requested for cancellation. If there is a leftover, then another sourcing evaluation will be performed in order to define the best location for the update quantities ordered.- Specified by:
cancelConsignmentin interfaceConsignmentCancellationService- Parameters:
consignment- the consignment to cancelorderCancelResponse- the order cancel response- Returns:
- Map<AbstractOrderEntryModel, Long>
-
createCancellationEventForInternalWarehouse
protected void createCancellationEventForInternalWarehouse(ConsignmentEntryModel consignmentEntry, CancelReason myReason) Create cancellation event in case the warehouse is not "marked" as external.- Parameters:
consignmentEntry-myReason-
-
getConsignmentEntryCommentService
-
setConsignmentEntryCommentService
public void setConsignmentEntryCommentService(WarehousingCommentService consignmentEntryCommentService) -
getGuidKeyGenerator
-
setGuidKeyGenerator
-
getInventoryEventService
-
setInventoryEventService
-
getModelService
-
setModelService
-
getNonCancellableConsignmentStatus
-
setNonCancellableConsignmentStatus
public void setNonCancellableConsignmentStatus(List<ConsignmentStatus> nonCancellableConsignmentStatus) -
getConsignmentBusinessProcessService
protected WarehousingBusinessProcessService<ConsignmentModel> getConsignmentBusinessProcessService() -
setConsignmentBusinessProcessService
public void setConsignmentBusinessProcessService(WarehousingBusinessProcessService<ConsignmentModel> consignmentBusinessProcessService) -
getWarehousingConsignmentWorkflowService
-
setWarehousingConsignmentWorkflowService
public void setWarehousingConsignmentWorkflowService(WarehousingConsignmentWorkflowService warehousingConsignmentWorkflowService)
-