Class DefaultOmsOrderCancelService
java.lang.Object
de.hybris.platform.warehousing.cancellation.impl.DefaultOmsOrderCancelService
- All Implemented Interfaces:
OmsOrderCancelService
Cancellation service implementation that will create cancellation events associated with the order entries.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcancelUnallocatedAndAddRemainder(List<OmsUnallocatedCancellationRemainder> remainders, OrderEntryCancelRecordEntryModel orderEntryCancellationRecord) Cancels in a first time the unallocated quantities and if necessary creates remainders for the left quantitiesprotected List<OmsUnallocatedCancellationRemainder>cancelUnallocatedQuantities(List<OrderEntryCancelRecordEntryModel> orderEntryCancellationRecords) Cancels unallocated quantities based on each entry's requested cancel quantity.protected voidcheckCancellationQuantitiesOnConsignments(OrderModel order, List<OrderEntryCancelRecordEntryModel> orderCancelRecordEntries) Compares cancellation request with the order's consignment status(es) to ensure that the cancellation quantities requested are possibleprotected voidcheckIncomingCancellationRecordsMatchOrderEntries(OrderModel order, List<OrderEntryCancelRecordEntryModel> orderEntryCancellationRecords) Checks that the order entry cancellation records are linked to the proper order entries.protected List<OrderCancelEntry>extractCancellationEntriesForAllocatedQuantities(List<OmsUnallocatedCancellationRemainder> unallocatedCancellationRemainders) Extracts a list ofOrderCancelEntrycorresponding to the requested quantity to cancel.protected GuidKeyGeneratorprotected ModelServiceprotected OrderCancelServiceprotected WarehousingCommentServiceprotected UserServiceprocessOrderCancel(OrderCancelRecordEntryModel orderCancelRecordEntryModel) process order cancellationvoidsetGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator) voidsetModelService(ModelService modelService) voidsetOrderCancelService(OrderCancelService orderCancelService) voidsetOrderEntryCommentService(WarehousingCommentService orderEntryCommentService) voidsetUserService(UserService userService)
-
Field Details
-
COMMENT_SUBJECT
- See Also:
-
-
Constructor Details
-
DefaultOmsOrderCancelService
public DefaultOmsOrderCancelService()
-
-
Method Details
-
processOrderCancel
public List<OrderCancelEntry> processOrderCancel(OrderCancelRecordEntryModel orderCancelRecordEntryModel) throws OrderCancelException Description copied from interface:OmsOrderCancelServiceprocess order cancellation- Specified by:
processOrderCancelin interfaceOmsOrderCancelService- Parameters:
orderCancelRecordEntryModel- holds information about the order entry to be cancelled- Returns:
- list of
OrderCancelEntry - Throws:
OrderCancelException-OrderCancelException
-
checkCancellationQuantitiesOnConsignments
protected void checkCancellationQuantitiesOnConsignments(OrderModel order, List<OrderEntryCancelRecordEntryModel> orderCancelRecordEntries) Compares cancellation request with the order's consignment status(es) to ensure that the cancellation quantities requested are possible- Parameters:
order- theOrderModelcontaining theOrderEntryModels to cancelorderCancelRecordEntries- list ofOrderEntryCancelRecordEntryModelcontaining information on whichOrderEntryModels to cancel from
-
checkIncomingCancellationRecordsMatchOrderEntries
protected void checkIncomingCancellationRecordsMatchOrderEntries(OrderModel order, List<OrderEntryCancelRecordEntryModel> orderEntryCancellationRecords) Checks that the order entry cancellation records are linked to the proper order entries.- Parameters:
order- the order containing the entries to cancelorderEntryCancellationRecords- list ofOrderEntryCancelRecordEntryModelcontaining information on which entries to cancel from and requested quantity to cancel
-
cancelUnallocatedQuantities
protected List<OmsUnallocatedCancellationRemainder> cancelUnallocatedQuantities(List<OrderEntryCancelRecordEntryModel> orderEntryCancellationRecords) Cancels unallocated quantities based on each entry's requested cancel quantity.- Parameters:
orderEntryCancellationRecords- list ofOrderEntryCancelRecordEntryModelcontaining information on which entries to cancel from and requested quantity to cancel
-
cancelUnallocatedAndAddRemainder
protected void cancelUnallocatedAndAddRemainder(List<OmsUnallocatedCancellationRemainder> remainders, OrderEntryCancelRecordEntryModel orderEntryCancellationRecord) Cancels in a first time the unallocated quantities and if necessary creates remainders for the left quantities- Parameters:
remainders- the list of remaindersorderEntryCancellationRecord- theOrderEntryCancelRecordEntryModel
-
extractCancellationEntriesForAllocatedQuantities
protected List<OrderCancelEntry> extractCancellationEntriesForAllocatedQuantities(List<OmsUnallocatedCancellationRemainder> unallocatedCancellationRemainders) Extracts a list ofOrderCancelEntrycorresponding to the requested quantity to cancel.- Parameters:
unallocatedCancellationRemainders- list ofOrderEntryCancelRecordEntryModelcontaining information on which entries to cancel from and requested quantity to cancel- Returns:
- list of
OrderCancelEntry
-
getOrderEntryCommentService
-
setOrderEntryCommentService
-
getGuidKeyGenerator
-
setGuidKeyGenerator
-
getModelService
-
setModelService
-
getOrderCancelService
-
setOrderCancelService
-
getUserService
-
setUserService
-