Class PaymentRefundReturnConfirmedListener
- java.lang.Object
-
- com.broadleafcommerce.orderoperation.service.messaging.returns.PaymentRefundReturnConfirmedListener
-
public class PaymentRefundReturnConfirmedListener extends Object
Listens forReturnConfirmedEvent
and issues a refund for all pendingReturnConfirmations
on theReturnAuthorization
, marking them as completed once finished.Delegates to
PaymentRefundService
.- Author:
- Samarth Dhruva (samarthd)
-
-
Constructor Summary
Constructors Constructor Description PaymentRefundReturnConfirmedListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentMessageService, PaymentRefundService paymentRefundService, OrderProvider<com.broadleafcommerce.order.client.domain.Order> orderProvider, ReturnAuthorizationProvider<com.broadleafcommerce.order.client.domain.ReturnAuthorization> returnAuthorizationProvider, ResourceLockProvider resourceLockProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService
getIdempotentMessageService()
protected com.broadleafcommerce.order.client.domain.Order
getOrder(@NonNull ReturnConfirmedEvent event)
Get theOrder
in theevent
, refreshing in case any payment changes have occurred on the order since the message was emitted.protected OrderProvider<com.broadleafcommerce.order.client.domain.Order>
getOrderProvider()
protected PaymentRefundService
getPaymentRefundService()
protected ResourceLockProvider
getResourceLockProvider()
protected com.broadleafcommerce.order.client.domain.ReturnAuthorization
getReturnAuthorization(@NonNull ReturnConfirmedEvent event)
Get theReturnAuthorization
in theevent
, refreshing in case any changes have occurred.protected ReturnAuthorizationProvider<com.broadleafcommerce.order.client.domain.ReturnAuthorization>
getReturnAuthorizationProvider()
void
listen(org.springframework.messaging.Message<ReturnConfirmedEvent> message)
protected void
processEvent(@NonNull org.springframework.messaging.Message<ReturnConfirmedEvent> message)
-
-
-
Constructor Detail
-
PaymentRefundReturnConfirmedListener
public PaymentRefundReturnConfirmedListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentMessageService, PaymentRefundService paymentRefundService, OrderProvider<com.broadleafcommerce.order.client.domain.Order> orderProvider, ReturnAuthorizationProvider<com.broadleafcommerce.order.client.domain.ReturnAuthorization> returnAuthorizationProvider, ResourceLockProvider resourceLockProvider)
-
-
Method Detail
-
listen
@StreamListener("orderOperationsReturnConfirmedInput") public void listen(org.springframework.messaging.Message<ReturnConfirmedEvent> message)
-
processEvent
protected void processEvent(@NonNull @NonNull org.springframework.messaging.Message<ReturnConfirmedEvent> message)
-
getOrder
protected com.broadleafcommerce.order.client.domain.Order getOrder(@NonNull @NonNull ReturnConfirmedEvent event)
Get theOrder
in theevent
, refreshing in case any payment changes have occurred on the order since the message was emitted.- Parameters:
event
- the return confirmed event- Returns:
- the retrieved order based on the event
-
getReturnAuthorization
protected com.broadleafcommerce.order.client.domain.ReturnAuthorization getReturnAuthorization(@NonNull @NonNull ReturnConfirmedEvent event)
Get theReturnAuthorization
in theevent
, refreshing in case any changes have occurred.- Parameters:
event
- the return confirmed event- Returns:
- the retrieved return authorization based on the event
-
getIdempotentMessageService
protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentMessageService()
-
getPaymentRefundService
protected PaymentRefundService getPaymentRefundService()
-
getOrderProvider
protected OrderProvider<com.broadleafcommerce.order.client.domain.Order> getOrderProvider()
-
getReturnAuthorizationProvider
protected ReturnAuthorizationProvider<com.broadleafcommerce.order.client.domain.ReturnAuthorization> getReturnAuthorizationProvider()
-
getResourceLockProvider
protected ResourceLockProvider getResourceLockProvider()
-
-