Class DefaultOmsOrderCancelService
- java.lang.Object
-
- de.hybris.platform.warehousing.cancellation.impl.DefaultOmsOrderCancelService
-
- All Implemented Interfaces:
OmsOrderCancelService
public class DefaultOmsOrderCancelService extends java.lang.Object implements OmsOrderCancelService
Cancellation service implementation that will create cancellation events associated with the order entries.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCOMMENT_SUBJECT
-
Constructor Summary
Constructors Constructor Description DefaultOmsOrderCancelService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcancelUnallocatedAndAddRemainder(java.util.List<OmsUnallocatedCancellationRemainder> remainders, OrderEntryCancelRecordEntryModel orderEntryCancellationRecord)Cancels in a first time the unallocated quantities and if necessary creates remainders for the left quantitiesprotected java.util.List<OmsUnallocatedCancellationRemainder>cancelUnallocatedQuantities(java.util.List<OrderEntryCancelRecordEntryModel> orderEntryCancellationRecords)Cancels unallocated quantities based on each entry's requested cancel quantity.protected voidcheckCancellationQuantitiesOnConsignments(OrderModel order, java.util.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, java.util.List<OrderEntryCancelRecordEntryModel> orderEntryCancellationRecords)Checks that the order entry cancellation records are linked to the proper order entries.protected java.util.List<OrderCancelEntry>extractCancellationEntriesForAllocatedQuantities(java.util.List<OmsUnallocatedCancellationRemainder> unallocatedCancellationRemainders)Extracts a list ofOrderCancelEntrycorresponding to the requested quantity to cancel.protected GuidKeyGeneratorgetGuidKeyGenerator()protected ModelServicegetModelService()protected OrderCancelServicegetOrderCancelService()protected WarehousingCommentServicegetOrderEntryCommentService()protected UserServicegetUserService()java.util.List<OrderCancelEntry>processOrderCancel(OrderCancelRecordEntryModel orderCancelRecordEntryModel)process order cancellationvoidsetGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator)voidsetModelService(ModelService modelService)voidsetOrderCancelService(OrderCancelService orderCancelService)voidsetOrderEntryCommentService(WarehousingCommentService orderEntryCommentService)voidsetUserService(UserService userService)
-
-
-
Field Detail
-
COMMENT_SUBJECT
protected static final java.lang.String COMMENT_SUBJECT
- See Also:
- Constant Field Values
-
-
Method Detail
-
processOrderCancel
public java.util.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, java.util.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, java.util.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 java.util.List<OmsUnallocatedCancellationRemainder> cancelUnallocatedQuantities(java.util.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(java.util.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 java.util.List<OrderCancelEntry> extractCancellationEntriesForAllocatedQuantities(java.util.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
protected WarehousingCommentService getOrderEntryCommentService()
-
setOrderEntryCommentService
public void setOrderEntryCommentService(WarehousingCommentService orderEntryCommentService)
-
getGuidKeyGenerator
protected GuidKeyGenerator getGuidKeyGenerator()
-
setGuidKeyGenerator
public void setGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getOrderCancelService
protected OrderCancelService getOrderCancelService()
-
setOrderCancelService
public void setOrderCancelService(OrderCancelService orderCancelService)
-
getUserService
protected UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
-