Interface NotificationQueueMessage.Builder
- Enclosing interface:
- NotificationQueueMessage
public static interface NotificationQueueMessage.Builder
Builder for creating a
NotificationQueueMessage object.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theNotificationQueueMessage.Sets the email message body for the notification.withNotificationText(String notificationText) Sets the content of the notification.withSubject(String subject) Sets the email subject line for the notification.withTemplateName(String templateName) Sets the name of the template to use.withTokenRequest(TokenRequest tokenRequest) Supplies a TokenRequest to resolve tokens within the message.
-
Method Details
-
withTemplateName
Sets the name of the template to use. Cannot be used in conjunction with withSubject, withBody, or withNotificationText- Parameters:
templateName- exact name of the template- Returns:
- this Builder instance
-
withNotificationText
Sets the content of the notification. Cannot be used in conjunction with withTemplateName- Parameters:
notificationText- plain text notification body- Returns:
- this Builder instance
-
withSubject
Sets the email subject line for the notification. Cannot be used in conjunction with withTemplateName- Parameters:
subject- email subject line- Returns:
- this Builder instance
-
withBody
Sets the email message body for the notification. Cannot be used in conjunction with withTemplateName- Parameters:
message- main message content- Returns:
- this Builder instance
-
withTokenRequest
Supplies a TokenRequest to resolve tokens within the message. Will get overridden by any values returned byNotificationQueueOperation.onResolveLanguages(Function)- Parameters:
tokenRequest- token request holding variable mappings- Returns:
- this Builder instance
-
build
NotificationQueueMessage build()Builds theNotificationQueueMessage.- Returns:
- the configured NotificationQueueMessage
-