...
withRecipient(Long id)
withRecipient(String loginName)
withRecipient(List<Long> ids)
withRecipientLogin(List<String> loginNames)
Other possibility possibilities to set recipients are via user groups with similar inputs, group’s uniqueName, or ID.
withUserGroupId(Long id)
withUserGroupId(List<Long> ids)
withUserGroupUqName(String uniqueName)
withUserGroupUqName(List<String> uniqueNames)
...
INFO
.withInfoStatus()
Provide additional information to users that may not be tied to their current action or task
Does not require immediate action and can be dismissed on a timer or persist, depending on the content
SUCCESS
withSuccessStatus()
Confirm a task was completed as expected
Typically do not require further action and can be dismissed automatically or persist in a nonintrusive manner
WARNING
withWarningStatus()
Inform users that they are taking actions that are not desirable or might have unexpected results
Often persist until the user dismisses the notification or continues in their task
ERROR
withErrorStatus()
Inform users of an error or critical failure, and optionally block the user from proceeding until the issue has been resolved
Always persist until the user dismisses them or resolves error
...
Context Link
.withContextLink("See more", AppPages.QC_DETAILS_PAGE, [id: "2147493269", tpTab:'messages'])
here the parameters are: link label, target page and target page state.
context links for notifications are similar to Context Linking
see with
withContextLink
methods in API documentation
DOWNLOAD
withDownloadAction(String action)
action is command for BE, ; you have to know the filename you want to download.
LINK
withLinkAction(String action)
Link for fronted when tou you can’t or don’t want to use context linking.
Messsage LINK
withMessageLinkAction(String action)
link to CLIC messages
INFO_MESSAGE
withNoAction()
means notification serves the purpose as info message only. There is no intended action for a user behind this notification.
...
with
withActionLabel(String actionLabel)
you can define your action label text, ; by default, the source field is used.
Send it
When all needed properties are set call
send()
method on notificationApi.These fields are validated when saving before the actual send is called:
title
message
source
action and action label
status
InvalidNotificationException
can be thrown
...