Class DefaultConsignmentCancellationService

    • 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
    • Constructor Detail

      • DefaultConsignmentCancellationService

        public DefaultConsignmentCancellationService()
    • Method Detail

      • 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 - the OrderCancelResponse
        orderCancelEntriesCompleted - the map of the completed order cancel entries and their values
        orderCancelEntry - the current OrderCancelEntry
      • 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 values
        orderCancelEntry - the current OrderCancelEntry
        Returns:
        the calculated already cancelled quantity
      • cancelConsignment

        public java.util.Map<AbstractOrderEntryModel,​java.lang.Long> cancelConsignment​(ConsignmentModel consignment,
                                                                                             OrderCancelResponse orderCancelResponse)
        Description copied from interface: ConsignmentCancellationService
        Cancel 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:
        cancelConsignment in interface ConsignmentCancellationService
        Parameters:
        consignment - the consignment to cancel
        orderCancelResponse - 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 -
      • setConsignmentEntryCommentService

        public void setConsignmentEntryCommentService​(WarehousingCommentService consignmentEntryCommentService)
      • setGuidKeyGenerator

        public void setGuidKeyGenerator​(GuidKeyGenerator guidKeyGenerator)
      • 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)