Class DefaultConsignmentCancellationService
- java.lang.Object
-
- de.hybris.platform.warehousing.cancellation.impl.DefaultConsignmentCancellationService
-
- All Implemented Interfaces:
ConsignmentCancellationService
- Direct Known Subclasses:
SapOmsConsignmentCancellationService
public class DefaultConsignmentCancellationService extends java.lang.Object implements ConsignmentCancellationService
Cancellation service implementation that will create cancellation events associated with the consignment entries.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCANCEL_CONSIGNMENT_CHOICEprotected static java.lang.StringCOMMENT_SUBJECTprotected static java.lang.StringCONSIGNMENT_ACTION_EVENT_NAME
-
Constructor Summary
Constructors Constructor Description DefaultConsignmentCancellationService()
-
Method Summary
-
-
-
Field Detail
-
COMMENT_SUBJECT
protected static final java.lang.String COMMENT_SUBJECT
- See Also:
- Constant Field Values
-
CONSIGNMENT_ACTION_EVENT_NAME
protected static final java.lang.String CONSIGNMENT_ACTION_EVENT_NAME
- See Also:
- Constant Field Values
-
CANCEL_CONSIGNMENT_CHOICE
protected static final java.lang.String CANCEL_CONSIGNMENT_CHOICE
- See Also:
- Constant Field Values
-
-
Method Detail
-
processConsignmentCancellation
public void processConsignmentCancellation(OrderCancelResponse orderCancelResponse)
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
-
moveProcessAndTerminateWorkflow
protected void moveProcessAndTerminateWorkflow(OrderCancelResponse orderCancelResponse, java.util.Map<AbstractOrderEntryModel,java.lang.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 java.lang.Long getAlreadyCancelledQty(java.util.Map<AbstractOrderEntryModel,java.lang.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 java.util.Map<AbstractOrderEntryModel,java.lang.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
-
createCancellationEventForInternalWarehouse
protected void createCancellationEventForInternalWarehouse(ConsignmentEntryModel consignmentEntry, CancelReason myReason)
Create cancellation event in case the warehouse is not "marked" as external.- Parameters:
consignmentEntry-myReason-
-
getConsignmentEntryCommentService
protected WarehousingCommentService getConsignmentEntryCommentService()
-
setConsignmentEntryCommentService
public void setConsignmentEntryCommentService(WarehousingCommentService consignmentEntryCommentService)
-
getGuidKeyGenerator
protected GuidKeyGenerator getGuidKeyGenerator()
-
setGuidKeyGenerator
public void setGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator)
-
getInventoryEventService
protected InventoryEventService getInventoryEventService()
-
setInventoryEventService
public void setInventoryEventService(InventoryEventService inventoryEventService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getNonCancellableConsignmentStatus
protected java.util.List<ConsignmentStatus> getNonCancellableConsignmentStatus()
-
setNonCancellableConsignmentStatus
public void setNonCancellableConsignmentStatus(java.util.List<ConsignmentStatus> nonCancellableConsignmentStatus)
-
getConsignmentBusinessProcessService
protected WarehousingBusinessProcessService<ConsignmentModel> getConsignmentBusinessProcessService()
-
setConsignmentBusinessProcessService
public void setConsignmentBusinessProcessService(WarehousingBusinessProcessService<ConsignmentModel> consignmentBusinessProcessService)
-
getWarehousingConsignmentWorkflowService
protected WarehousingConsignmentWorkflowService getWarehousingConsignmentWorkflowService()
-
setWarehousingConsignmentWorkflowService
public void setWarehousingConsignmentWorkflowService(WarehousingConsignmentWorkflowService warehousingConsignmentWorkflowService)
-
-