@java.lang.SuppressWarnings("unused") public interface NotificationMessage extends java.ioSerializable
Modifiers | Name | Description |
---|---|---|
enum |
NotificationMessage.NotificationType |
Type Params | Return Type | Name and description |
---|---|---|
|
public NotificationMessage |
alertNoAutoHide(boolean noAutoHide) |
|
public NotificationMessage |
emailMessageSave(java.lang.Boolean save) |
|
public NotificationMessage |
emailTemplateId(java.lang.String id) |
|
public java.util.Map<java.lang.String, java.lang.String> |
getEmailMessageIdByUserId() Call after send() to get emailMessageId values (if emailMessageSave is true) |
|
public java.lang.String |
getEmailTemplateId() |
|
public java.lang.String |
getLink() Get the link to detail/source, expanded using the message Map; if not set and topic has a NotificationTopic record will default to value there |
|
public java.lang.String |
getMessageJson() |
|
public java.util.Map<java.lang.String, java.lang.Object> |
getMessageMap() |
|
public java.lang.String |
getNotificationMessageId() |
|
public java.util.Set<java.lang.String> |
getNotifyUserIds() Get userId for all users associated with this notification, directly or through the UserGroup, and who have NotificationTopicUser.receiveNotifications=Y, which if not set (or there is no NotificationTopicUser record) defaults to NotificationTopic.receiveNotifications (if not set defaults to Y) |
|
public java.lang.String |
getTitle() Get the title, expanded using the message Map; if not set and topic has a NotificationTopic record will default to value there |
|
public java.lang.String |
getTopic() |
|
public java.lang.String |
getType() Get the type as a String; if not set and topic has a NotificationTopic record will default to value there |
|
public java.lang.String |
getUserGroupId() |
|
public java.util.Set<java.lang.String> |
getUserIds() |
|
public java.lang.String |
getWrappedMessageJson() Result of getWrappedMessageMap() as a JSON String |
|
public java.util.Map<java.lang.String, java.lang.Object> |
getWrappedMessageMap() Get a Map with: topic, sentDate, notificationMessageId, message, title, link, type, and showAlert using the get method for each |
|
public boolean |
isAlertNoAutoHide() |
|
public boolean |
isEmailMessageSave() |
|
public boolean |
isPersistOnSend() |
|
public boolean |
isShowAlert() Show an alert for this notification? |
|
public NotificationMessage |
link(java.lang.String link) Set the link to get more detail about the notification or go to its source, a GString (${} syntax) expanded using the message Map |
|
public NotificationMessage |
markSent(java.lang.String userId) |
|
public NotificationMessage |
markViewed(java.lang.String userId) |
|
public NotificationMessage |
message(java.lang.String messageJson) Set the message as a JSON String. |
|
public NotificationMessage |
message(java.util.Map<java.lang.String, java.lang.Object> message) Set the message as a JSON String. |
|
public NotificationMessage |
persistOnSend(java.lang.Boolean persist) |
|
public NotificationMessage |
send(boolean persist) Send this Notification Message. |
|
public NotificationMessage |
send() Send this Notification Message using persistOnSend setting (defaults to false). |
|
public NotificationMessage |
showAlert(boolean show) |
|
public NotificationMessage |
title(java.lang.String title) Set the title to display, a GString (${} syntax) that will be expanded using the message Map; may be a localization template name |
|
public NotificationMessage |
topic(java.lang.String topic) |
|
public NotificationMessage |
type(NotificationMessage.NotificationType type) |
|
public NotificationMessage |
type(java.lang.String type) Must be a String for a valid NotificationType (ie info, success, warning, or danger) |
|
public NotificationMessage |
userGroupId(java.lang.String userGroupId) |
|
public NotificationMessage |
userId(java.lang.String userId) |
|
public NotificationMessage |
userIds(java.util.Set<java.lang.String> userIds) |
Call after send() to get emailMessageId values (if emailMessageSave is true)
Get the link to detail/source, expanded using the message Map; if not set and topic has a NotificationTopic record will default to value there
Get userId for all users associated with this notification, directly or through the UserGroup, and who have NotificationTopicUser.receiveNotifications=Y, which if not set (or there is no NotificationTopicUser record) defaults to NotificationTopic.receiveNotifications (if not set defaults to Y)
Get the title, expanded using the message Map; if not set and topic has a NotificationTopic record will default to value there
Get the type as a String; if not set and topic has a NotificationTopic record will default to value there
Result of getWrappedMessageMap() as a JSON String
Get a Map with: topic, sentDate, notificationMessageId, message, title, link, type, and showAlert using the get method for each
Show an alert for this notification? If not set and topic has a NotificationTopic record will default to value there
Set the link to get more detail about the notification or go to its source, a GString (${} syntax) expanded using the message Map
Set the message as a JSON String. The top-level should be a Map (JSON Object).
messageJson
- The message as a JSON string containing a Map (JSON Object)Set the message as a JSON String. The top-level should be a Map (JSON Object).
message
- The message as a Map (JSON Object), must be convertible to JSON StringSend this Notification Message.
persist
- If true this is persisted and message received is tracked. If false this is sent to active topic
listeners only.Send this Notification Message using persistOnSend setting (defaults to false).
Set the title to display, a GString (${} syntax) that will be expanded using the message Map; may be a localization template name
Must be a String for a valid NotificationType (ie info, success, warning, or danger)