Interface NotificationService
- All Superinterfaces:
Service
Send Vault notifications.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newNotificationMessageobject to set subject, message, notification text, and tokens to use in a notification.Creates a newNotificationParametersobject to set the parameters of the notification.Creates a newNotificationTemplateobject to set the template to use and tokens to resolve for a notification.voidsend(NotificationParameters parameters, NotificationMessage message) Sends a notification with message content.voidsend(NotificationParameters parameters, NotificationTemplate template) Sends a notification with pre-defined template content.
-
Method Details
-
newNotificationParameters
NotificationParameters newNotificationParameters()Creates a newNotificationParametersobject to set the parameters of the notification. For example, it can be used to specify the sender ID, a set of recipient IDs, and whether an in-app notification is displayed in the Vault UI.- Returns:
- a new NotificationParameters
-
newNotificationTemplate
NotificationTemplate newNotificationTemplate()Creates a newNotificationTemplateobject to set the template to use and tokens to resolve for a notification.- Returns:
- a new NotificationTemplate object
-
newNotificationMessage
NotificationMessage newNotificationMessage()Creates a newNotificationMessageobject to set subject, message, notification text, and tokens to use in a notification.- Returns:
- a new NotificationMessage object
-
send
Sends a notification with message content. Any missing or invalid parameters in theNotificationParametersorNotificationMessageare caught here.If
send()is called beforeNotificationParametershas set recipients withsetRecipientsByUserIds(),setRecipientsByGroups(), orsetRecipientsByRecordRoles(), an error will occur.If at least one of these
setRecipientsBy###methods has been called with a non-null Set/List, an error will not occur.- Parameters:
parameters- notification parameters set for the notificationmessage- message content
-
send
Sends a notification with pre-defined template content. Any missing or invalid parameters in theNotificationParametersorNotificationTemplateare caught here.If
send()is called beforeNotificationParametershas set recipients withsetRecipientsByUserIds(),setRecipientsByGroups(), orsetRecipientsByRecordRoles(), an error will occur.If at least one of these
setRecipientsBy###methods has been called with a non-null Set/List, an error will not occur.- Parameters:
parameters- notification parameters set for the notificationtemplate- content from a template
-