Class OrderCreatedTaxHandler
java.lang.Object
com.broadleafcommerce.orderoperation.service.messaging.tax.OrderCreatedTaxHandler
@DataRouteByExample(CheckoutCompletionEvent.class)
public class OrderCreatedTaxHandler
extends Object
Responsible for committing tax on checkout completion events.
-
Constructor Summary
ConstructorDescriptionOrderCreatedTaxHandler
(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 FulfillmentProvider<com.broadleafcommerce.order.client.domain.OrderFulfillment>
protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService
protected com.broadleafcommerce.order.client.domain.Order
getOrder
(@NonNull OrderCreatedEvent event, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment>
getOrderFulfillments
(@NonNull OrderCreatedEvent event) TheOrderCreatedEvent
doesn't contain the order fulfillments to reduce the message size.protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment>
getOrderFulfillments
(OrderLink readOrderFulfillmentLink, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected OrderLink
getOrderLink
(@NonNull OrderCreatedEvent event) protected OrderProvider<com.broadleafcommerce.order.client.domain.Order>
protected OrderLink
protected com.broadleafcommerce.tax.delegate.TaxDelegate<com.broadleafcommerce.tax.domain.TaxRequest,
com.broadleafcommerce.tax.domain.TaxResponse> protected TaxRequestService
void
listen
(org.springframework.messaging.Message<OrderCreatedEvent> message) protected void
processEvent
(org.springframework.messaging.Message<OrderCreatedEvent> orderCreatedEventMessage) void
setFulfillmentProvider
(FulfillmentProvider<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillmentProvider)
-
Constructor Details
-
OrderCreatedTaxHandler
public OrderCreatedTaxHandler(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("orderOperationsOrderCreatedInput") public void listen(org.springframework.messaging.Message<OrderCreatedEvent> message) -
processEvent
protected void processEvent(org.springframework.messaging.Message<OrderCreatedEvent> orderCreatedEventMessage) -
getOrderFulfillments
protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getOrderFulfillments(@NonNull @NonNull OrderCreatedEvent event) TheOrderCreatedEvent
doesn't contain the order fulfillments to reduce the message size. This method reads the Order fulfillments by the link provided inOrderCreatedEvent.getLinks()
. -
getReadOrderFulfillmentLink
-
getOrderFulfillments
-
getOrder
protected com.broadleafcommerce.order.client.domain.Order getOrder(@NonNull @NonNull OrderCreatedEvent event, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getOrderLink
-
getOrderProvider
-
getTaxDelegate
protected com.broadleafcommerce.tax.delegate.TaxDelegate<com.broadleafcommerce.tax.domain.TaxRequest,com.broadleafcommerce.tax.domain.TaxResponse> getTaxDelegate() -
getTaxRequestService
-
getIdempotentMessageService
protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentMessageService() -
getFulfillmentProvider
protected FulfillmentProvider<com.broadleafcommerce.order.client.domain.OrderFulfillment> getFulfillmentProvider() -
setFulfillmentProvider
@Autowired public void setFulfillmentProvider(FulfillmentProvider<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillmentProvider)
-