Class NotificationFulfillmentFulfilledMessageListener
java.lang.Object
com.broadleafcommerce.notification.service.messaging.AbstractEmailNotificationMessageListener
com.broadleafcommerce.notification.service.messaging.AbstractNotificationFulfillmentStatusChangeMessageListener
com.broadleafcommerce.notification.service.messaging.NotificationFulfillmentFulfilledMessageListener
public class NotificationFulfillmentFulfilledMessageListener
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 Stringprotected static final Stringprotected static final Stringprotected static final StringFields 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, ORDER_NUMBER_PATH, TENANT_ID_PATHFields inherited from class com.broadleafcommerce.notification.service.messaging.AbstractEmailNotificationMessageListener
EMAIL_DELIVERY, messages, notificationService, tenantProvider, typeFactory, userResolver -
Constructor Summary
ConstructorsConstructorDescriptionNotificationFulfillmentFulfilledMessageListener(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 StringGet the class name to identify this listener for handling message idempotency.protected StringgetMessageType(com.jayway.jsonpath.DocumentContext jsonContext) Determine which message type should be sent.protected StringgetNotificationSubject(com.jayway.jsonpath.DocumentContext jsonContext) Determine the subject to use for the email notification.voidhandleMessage(org.springframework.messaging.Message<String> message) Methods inherited from class com.broadleafcommerce.notification.service.messaging.AbstractNotificationFulfillmentStatusChangeMessageListener
buildNotificationContext, getCustomerId, getLocale, getPayload, getRecipientCommunicationPreferences, getRecipients, isCompleteOrderStatusChanged, validateShouldSendNotificationMethods 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_SHIPPED
- See Also:
-
ITEMS_SHIPPED
- See Also:
-
SUBJECT_MESSAGE_FULL
- See Also:
-
SUBJECT_MESSAGE_PARTIAL
- See Also:
-
-
Constructor Details
-
NotificationFulfillmentFulfilledMessageListener
public NotificationFulfillmentFulfilledMessageListener(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("fulfillmentFulfilledInputNotification") public void handleMessage(org.springframework.messaging.Message<String> message) -
getClassName
Description copied from class:AbstractEmailNotificationMessageListenerGet the class name to identify this listener for handling message idempotency.- Specified by:
getClassNamein classAbstractEmailNotificationMessageListener- Returns:
- the listener's class name
-
getMessageType
Description copied from class:AbstractEmailNotificationMessageListenerDetermine which message type should be sent.- Specified by:
getMessageTypein classAbstractEmailNotificationMessageListener- Parameters:
jsonContext- the message payload- Returns:
- the message type to send
-
getNotificationSubject
Description copied from class:AbstractEmailNotificationMessageListenerDetermine the subject to use for the email notification.- Specified by:
getNotificationSubjectin classAbstractEmailNotificationMessageListener- Parameters:
jsonContext- the message payload- Returns:
- the subject to use for the email notification
-