Class NotificationFulfillmentCancelledMessageListener
java.lang.Object
com.broadleafcommerce.notification.service.messaging.AbstractEmailNotificationMessageListener
com.broadleafcommerce.notification.service.messaging.AbstractNotificationFulfillmentStatusChangeMessageListener
com.broadleafcommerce.notification.service.messaging.NotificationFulfillmentCancelledMessageListener
public class NotificationFulfillmentCancelledMessageListener
extends AbstractNotificationFulfillmentStatusChangeMessageListener
A message listener that triggers when a fulfillment has been fulfilled. Sends the order or items
shipped notifications.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected static final String
protected static final String
Fields inherited from class com.broadleafcommerce.notification.service.messaging.AbstractNotificationFulfillmentStatusChangeMessageListener
APPLICATION_ID_PATH, COMPLETE_ORDER_STATUS_CHANGED, COMPLETE_ORDER_STATUS_CHANGED_PATH, CUSTOMER_CONTEXT_ID_PATH, CUSTOMER_EMAIL_PATH, CUSTOMER_ID_PATH, CUSTOMER_NAME_PATH, FULFILLMENT_ITEM_ORDER_ITEM_IDS_PATH, FULFILLMENT_ITEM_QUANTITIES_PATH, FULFILLMENT_ORDER_ITEM_QUANTITIES, LOCALE, ORDER_ITEM_IDS_PATH, ORDER_ITEM_QUANTITIES_PATH, TENANT_ID_PATH
Fields inherited from class com.broadleafcommerce.notification.service.messaging.AbstractEmailNotificationMessageListener
EMAIL_DELIVERY, messages, notificationService, tenantProvider, typeFactory, userResolver
-
Constructor Summary
ConstructorsConstructorDescriptionNotificationFulfillmentCancelledMessageListener
(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, NotificationService<Notification> notificationService, org.springframework.context.MessageSource messages, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Get the class name to identify this listener for handling message idempotency.protected String
getMessageType
(com.jayway.jsonpath.DocumentContext jsonContext) Determine which message type should be sent.protected String
getNotificationSubject
(com.jayway.jsonpath.DocumentContext jsonContext) Determine the subject to use for the email notification.void
handleMessage
(org.springframework.messaging.Message<String> message) Methods inherited from class com.broadleafcommerce.notification.service.messaging.AbstractNotificationFulfillmentStatusChangeMessageListener
buildNotificationContext, getCustomerId, getLocale, getPayload, getRecipientCommunicationPreferences, getRecipients, isCompleteOrderStatusChanged, validateShouldSendNotification
Methods inherited from class com.broadleafcommerce.notification.service.messaging.AbstractEmailNotificationMessageListener
buildNotification, buildNotification, getDocumentContext, getIdempotentConsumptionService, getMessages, getNotificationService, getObjectMapper, getTenantProvider, getTypeFactory, getUserResolver, handleMessageInternal, modifyNotification, modifyNotification, processMessage, resolveApplicationById, setTenantProvider, setUserResolver
-
Field Details
-
ORDER_CANCELLED
- See Also:
-
ITEMS_CANCELLED
- See Also:
-
SUBJECT_MESSAGE_FULL
- See Also:
-
SUBJECT_MESSAGE_PARTIAL
- See Also:
-
ORDER_NUMBER_PATH
- See Also:
-
-
Constructor Details
-
NotificationFulfillmentCancelledMessageListener
public NotificationFulfillmentCancelledMessageListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, NotificationService<Notification> notificationService, org.springframework.context.MessageSource messages, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
handleMessage
@StreamListener("fulfillmentCancelledInputNotification") public void handleMessage(org.springframework.messaging.Message<String> message) -
getClassName
Description copied from class:AbstractEmailNotificationMessageListener
Get the class name to identify this listener for handling message idempotency.- Specified by:
getClassName
in classAbstractEmailNotificationMessageListener
- Returns:
- the listener's class name
-
getMessageType
Description copied from class:AbstractEmailNotificationMessageListener
Determine which message type should be sent.- Specified by:
getMessageType
in classAbstractEmailNotificationMessageListener
- Parameters:
jsonContext
- the message payload- Returns:
- the message type to send
-
getNotificationSubject
Description copied from class:AbstractEmailNotificationMessageListener
Determine the subject to use for the email notification.- Specified by:
getNotificationSubject
in classAbstractEmailNotificationMessageListener
- Parameters:
jsonContext
- the message payload- Returns:
- the subject to use for the email notification
-