Interface NotificationQueueRequest.Builder
- Enclosing interface:
- NotificationQueueRequest
public static interface NotificationQueueRequest.Builder
Builder for creating a
NotificationQueueRequest object.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theNotificationQueueRequest.withNotificationMode(List<NotificationMode> notificationModes) Sets one or more delivery modes for the notification.Attaches message content to the request.withRecipientsByGroups(List<Group> recipientGroups) Adds groups as notification recipients.withRecipientsByPersons(List<String> recipientPersons) Adds Persons as notification recipients.withRecipientsByRecordRoles(List<RecordRole> recipientRecordRoles) Adds record roles as notification recipients.withRecipientsByUsers(List<String> recipientIds) Adds users as notification recipients.withReplyToByPersonId(String replyToPersonId) Sets the reply-to address based on a Person ID.withReplyToByUserId(String replyToId) Sets the reply-to address based on a User ID.withSenderId(String senderId) Sets the ID of the sender to appear on the notification.
-
Method Details
-
withRecipientsByUsers
Adds users as notification recipients.- Parameters:
recipientIds- list of user IDs to receive the notification- Returns:
- this Builder instance
-
withRecipientsByGroups
Adds groups as notification recipients.- Parameters:
recipientGroups- list ofGroupobjects to receive the notification- Returns:
- this Builder instance
-
withRecipientsByRecordRoles
Adds record roles as notification recipients.- Parameters:
recipientRecordRoles- list ofRecordRoleobjects to receive the notification- Returns:
- this Builder instance
-
withRecipientsByPersons
Adds Persons as notification recipients. Person recipients can only receive emails, not in-app notifications. If a person is also a Vault user, you must add them viawithRecipientsByUsers(java.util.List)to queue an in-app notification for them.- Parameters:
recipientPersons- list of Person IDs to receive the notification- Returns:
- this Builder instance
-
withSenderId
Sets the ID of the sender to appear on the notification.- Parameters:
senderId- user ID of the sender- Returns:
- this Builder instance
-
withReplyToByUserId
Sets the reply-to address based on a User ID. Setting both a user and a person reply-to recipient viawithReplyToByPersonId(String)will cause an error duringNotificationService.queueNotification(NotificationQueueRequest).- Parameters:
replyToId- user ID for the reply-to field- Returns:
- this Builder instance
-
withReplyToByPersonId
Sets the reply-to address based on a Person ID. Setting both a user and a person reply-to recipient viawithReplyToByUserId(String)will cause an error duringNotificationService.queueNotification(NotificationQueueRequest).- Parameters:
replyToPersonId- Person ID for the reply-to field- Returns:
- this Builder instance
-
withNotificationMode
Sets one or more delivery modes for the notification. For example,EMAILorAPPLICATION. By default, notifications are sent as both an email and an in-app notification.- Parameters:
notificationModes- chosen notification delivery modes- Returns:
- this Builder instance
-
withNotificationQueueMessage
Attaches message content to the request.- Parameters:
content-NotificationQueueMessagedefining the content- Returns:
- this Builder instance
-
build
NotificationQueueRequest build()Builds theNotificationQueueRequest.- Returns:
- the configured
NotificationQueueRequest
-