Class NotificationSignal
java.lang.Object
com.kingsrook.qqq.backend.core.alerts.NotificationSignal
- All Implemented Interfaces:
Serializable
One user notification from a producer, passed to QAlerts.notify: "tell
these people this". Unlike an AlertSignal it is not a problem to fix; it
is a message for a person's bell (and, by their preference, email): a job
that failed or finished, a share, a security notice, a release note.
title and audience are required. Bounds: at most MAX_ATTRIBUTES attributes
(extras are ignored).
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for attributesGetter for audiencegetBody()Getter for bodyGetter for categoryGetter for expireAtgetLink()Getter for linkGetter for occurredAtGetter for publishAtGetter for severityGetter for sourceKeyGetter for sourceNameGetter for sourceRecordIdGetter for sourceTableNameGetter for stickygetTitle()Getter for titlevoidsetAttributes(Map<String, String> attributes) Setter for attributesvoidsetAudience(NotificationAudience audience) Setter for audiencevoidSetter for bodyvoidsetCategory(NotificationCategory category) Setter for categoryvoidsetExpireAt(Instant expireAt) Setter for expireAtvoidSetter for linkvoidsetOccurredAt(Instant occurredAt) Setter for occurredAtvoidsetPublishAt(Instant publishAt) Setter for publishAtvoidsetSeverity(NotificationSeverity severity) Setter for severityvoidsetSourceKey(String sourceKey) Setter for sourceKeyvoidsetSourceName(String sourceName) Setter for sourceNamevoidsetSourceRecordId(String sourceRecordId) Setter for sourceRecordIdvoidsetSourceTableName(String sourceTableName) Setter for sourceTableNamevoidSetter for stickyvoidSetter for titlewithAttribute(String key, String value) Add a routing label (not displayed by default).withAudience(NotificationAudience audience) Fluent setter for audience (who it is for; required)Fluent setter for body (the message, markdown (rendered safely, no raw HTML))withCategory(NotificationCategory category) Fluent setter for category (default SYSTEM)withExpireAt(Instant expireAt) Fluent setter for expireAt (hidden after this time)Fluent setter for link (a deep link to where the user acts on it)withOccurredAt(Instant occurredAt) Fluent setter for occurredAt (default: when QAlerts.notify is called)withPublishAt(Instant publishAt) Fluent setter for publishAt (not shown before this time)withSeverity(NotificationSeverity severity) Fluent setter for severity (default INFO)withSourceKey(String sourceKey) Fluent setter for sourceKey (dedup key: a second notify with the same key and audience updates the first)withSourceName(String sourceName) Fluent setter for sourceName (who emitted it: a qbit or app name)withSourceRecordId(String sourceRecordId) Fluent setter for sourceRecordId (the id of the record it is about)withSourceTableName(String sourceTableName) Fluent setter for sourceTableName (the table of the record it is about)withSticky(Boolean sticky) Fluent setter for sticky (a banner until dismissed (meant for CRITICAL))Fluent setter for title (the headline, plain text; required)
-
Field Details
-
MAX_ATTRIBUTES
public static final int MAX_ATTRIBUTES- See Also:
-
-
Constructor Details
-
NotificationSignal
public NotificationSignal()Constructor -
NotificationSignal
Constructor
-
-
Method Details
-
getTitle
Getter for title -
setTitle
Setter for title -
withTitle
Fluent setter for title (the headline, plain text; required) -
getBody
Getter for body -
setBody
Setter for body -
withBody
Fluent setter for body (the message, markdown (rendered safely, no raw HTML)) -
getSeverity
Getter for severity -
setSeverity
Setter for severity -
withSeverity
Fluent setter for severity (default INFO) -
getCategory
Getter for category -
setCategory
Setter for category -
withCategory
Fluent setter for category (default SYSTEM) -
getSourceName
Getter for sourceName -
setSourceName
Setter for sourceName -
withSourceName
Fluent setter for sourceName (who emitted it: a qbit or app name) -
getSourceKey
Getter for sourceKey -
setSourceKey
Setter for sourceKey -
withSourceKey
Fluent setter for sourceKey (dedup key: a second notify with the same key and audience updates the first) -
getSourceTableName
Getter for sourceTableName -
setSourceTableName
Setter for sourceTableName -
withSourceTableName
Fluent setter for sourceTableName (the table of the record it is about) -
getSourceRecordId
Getter for sourceRecordId -
setSourceRecordId
Setter for sourceRecordId -
withSourceRecordId
Fluent setter for sourceRecordId (the id of the record it is about) -
getLink
Getter for link -
setLink
Setter for link -
withLink
Fluent setter for link (a deep link to where the user acts on it) -
getAudience
Getter for audience -
setAudience
Setter for audience -
withAudience
Fluent setter for audience (who it is for; required) -
getPublishAt
Getter for publishAt -
setPublishAt
Setter for publishAt -
withPublishAt
Fluent setter for publishAt (not shown before this time) -
getExpireAt
Getter for expireAt -
setExpireAt
Setter for expireAt -
withExpireAt
Fluent setter for expireAt (hidden after this time) -
getSticky
Getter for sticky -
setSticky
Setter for sticky -
withSticky
Fluent setter for sticky (a banner until dismissed (meant for CRITICAL)) -
getAttributes
-
setAttributes
-
withAttribute
Add a routing label (not displayed by default). At most MAX_ATTRIBUTES keys; a new key beyond that is ignored (replacing an existing key is fine). -
getOccurredAt
Getter for occurredAt -
setOccurredAt
Setter for occurredAt -
withOccurredAt
Fluent setter for occurredAt (default: when QAlerts.notify is called)
-