Class AbstractAutoStatusChangeListener<E>

    • Constructor Detail

      • AbstractAutoStatusChangeListener

        public AbstractAutoStatusChangeListener​(com.broadleafcommerce.common.extension.TypeFactory typeFactory,
                                                FulfillmentOperationService fulfillmentOperationService,
                                                com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentMessageService)
    • Method Detail

      • processEvent

        public void processEvent​(@NonNull
                                 @NonNull org.springframework.messaging.Message<E> message)
      • getFulfillments

        protected abstract List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getFulfillments​(E event)
      • getOrder

        protected abstract com.broadleafcommerce.order.client.domain.Order getOrder​(E event)
      • getContextInfo

        @Nullable
        protected abstract com.broadleafcommerce.data.tracking.core.context.ContextInfo getContextInfo​(E event)
      • shouldChangeStatus

        protected abstract boolean shouldChangeStatus​(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment,
                                                      com.broadleafcommerce.order.client.domain.Order order)
        Determine whether or not the OrderFulfillment should automatically change status.
        Parameters:
        fulfillment - The fulfillment to possibly change status
        Returns:
        whether the fulfillment should change status
      • performChangeStatus

        protected void performChangeStatus​(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment,
                                           @Nullable
                                           com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      • getNewStatus

        protected abstract com.broadleafcommerce.order.client.domain.OrderFulfillmentStatus getNewStatus()
      • getTypeFactory

        protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
      • getIdempotentMessageService

        protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentMessageService()