Class FulfillmentCancelledTaxHandler
java.lang.Object
com.broadleafcommerce.orderoperation.service.messaging.tax.FulfillmentCancelledTaxHandler
@DataRouteByExample(FulfillmentStatusChangeEvent.class)
public class FulfillmentCancelledTaxHandler
extends Object
Responsible for adjusting tax transactions on fulfillment cancellation events.
-
Constructor Summary
ConstructorDescriptionFulfillmentCancelledTaxHandler
(FulfillmentProvider<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillmentProvider, OrderProvider<com.broadleafcommerce.order.client.domain.Order> orderProvider, com.broadleafcommerce.tax.delegate.TaxDelegate<com.broadleafcommerce.tax.domain.TaxRequest, com.broadleafcommerce.tax.domain.TaxResponse> taxDelegate, TaxRequestService taxRequestService, com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentMessageService) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<com.broadleafcommerce.order.client.domain.OrderFulfillment>
getNonCancelledFulfillments
(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments, FulfillmentStatusChangeEvent event) protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment>
protected boolean
protected boolean
isOrderCancelled
(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments) void
listen
(org.springframework.messaging.Message<FulfillmentStatusChangeEvent> message) protected void
processEvent
(org.springframework.messaging.Message<FulfillmentStatusChangeEvent> fulfillmentStatusChangeEventMessage)
-
Constructor Details
-
FulfillmentCancelledTaxHandler
public FulfillmentCancelledTaxHandler(FulfillmentProvider<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillmentProvider, OrderProvider<com.broadleafcommerce.order.client.domain.Order> orderProvider, com.broadleafcommerce.tax.delegate.TaxDelegate<com.broadleafcommerce.tax.domain.TaxRequest, com.broadleafcommerce.tax.domain.TaxResponse> taxDelegate, TaxRequestService taxRequestService, com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentMessageService)
-
-
Method Details
-
listen
@StreamListener("orderOperationsFulfillmentCancelledInput") public void listen(org.springframework.messaging.Message<FulfillmentStatusChangeEvent> message) -
processEvent
protected void processEvent(org.springframework.messaging.Message<FulfillmentStatusChangeEvent> fulfillmentStatusChangeEventMessage) -
isCancelledStatus
-
isOrderCancelled
protected boolean isOrderCancelled(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments) -
getOrderFulfillments
protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getOrderFulfillments(FulfillmentStatusChangeEvent event) -
getNonCancelledFulfillments
protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getNonCancelledFulfillments(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments, FulfillmentStatusChangeEvent event)
-