Interface NotificationService
- All Superinterfaces:
Service
Send Vault notifications.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newNotificationMessage
object to set subject, message, notification text, and tokens to use in a notification.Creates a newNotificationParameters
object to set the parameters of the notification.Creates a newNotificationTemplate
object to set the template to use and tokens to resolve for a notification.void
send
(NotificationParameters parameters, NotificationMessage message) Sends a notification with message content.void
send
(NotificationParameters parameters, NotificationTemplate template) Sends a notification with pre-defined template content.
-
Method Details
-
newNotificationParameters
NotificationParameters newNotificationParameters()Creates a newNotificationParameters
object 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 newNotificationTemplate
object to set the template to use and tokens to resolve for a notification.- Returns:
- a new NotificationTemplate object
-
newNotificationMessage
NotificationMessage newNotificationMessage()Creates a newNotificationMessage
object 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 theNotificationParameters
orNotificationMessage
are caught here.If
send()
is called beforeNotificationParameters
has 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 theNotificationParameters
orNotificationTemplate
are caught here.If
send()
is called beforeNotificationParameters
has 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
-