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.String
COMMENT_SUBJECT
-
Constructor Summary
Constructors Constructor Description DefaultOmsOrderCancelService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 quantitiesprotected java.util.List<OmsUnallocatedCancellationRemainder>
cancelUnallocatedQuantities(java.util.List<OrderEntryCancelRecordEntryModel> orderEntryCancellationRecords)
Cancels unallocated quantities based on each entry's requested cancel quantity.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 possibleprotected void
checkIncomingCancellationRecordsMatchOrderEntries(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 ofOrderCancelEntry
corresponding to the requested quantity to cancel.protected GuidKeyGenerator
getGuidKeyGenerator()
protected ModelService
getModelService()
protected OrderCancelService
getOrderCancelService()
protected WarehousingCommentService
getOrderEntryCommentService()
protected UserService
getUserService()
java.util.List<OrderCancelEntry>
processOrderCancel(OrderCancelRecordEntryModel orderCancelRecordEntryModel)
process order cancellationvoid
setGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator)
void
setModelService(ModelService modelService)
void
setOrderCancelService(OrderCancelService orderCancelService)
void
setOrderEntryCommentService(WarehousingCommentService orderEntryCommentService)
void
setUserService(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:OmsOrderCancelService
process order cancellation- Specified by:
processOrderCancel
in 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
- theOrderModel
containing theOrderEntryModel
s to cancelorderCancelRecordEntries
- list ofOrderEntryCancelRecordEntryModel
containing information on whichOrderEntryModel
s 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 ofOrderEntryCancelRecordEntryModel
containing 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 ofOrderEntryCancelRecordEntryModel
containing 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 ofOrderCancelEntry
corresponding to the requested quantity to cancel.- Parameters:
unallocatedCancellationRemainders
- list ofOrderEntryCancelRecordEntryModel
containing 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)
-
-