@PublicSpi
public interface NotificationFilter
NotificationRecipient
s to a notification event.
addRecipient(NotificationFilterContext, Iterable)
is always called first for all plugins and then removeRecipient(NotificationRecipient, NotificationFilterContext)
is called after that to remove any recipients that are not
needed.
You are very likely to be called multiple times during an issue event (depending on circumstances) and hence you need
to manager your side effects. The NotificationFilterContext
object passed to you has a state map where you
can place stateful information and perhaps prevent multiple effects happening (if need be).
Modifier and Type | Method and Description |
---|---|
Iterable<NotificationRecipient> |
addRecipient(NotificationFilterContext context,
Iterable<NotificationRecipient> intendedRecipients)
This called called to add possible new
NotificationRecipient s to a notification event. |
boolean |
removeRecipient(NotificationRecipient recipient,
NotificationFilterContext context)
This called called to remove
NotificationRecipient s from a notification event. |
Iterable<NotificationRecipient> addRecipient(NotificationFilterContext context, Iterable<NotificationRecipient> intendedRecipients)
NotificationRecipient
s to a notification event. Its possible that
event is null in which case this means that there is no JIRA issue event in play but rather some other adhoc call
to the JIRA AdhocNotificationService
.context
- the context of this possible notificationintendedRecipients
- this list of recipients that has been build up to this point.boolean removeRecipient(NotificationRecipient recipient, NotificationFilterContext context)
NotificationRecipient
s from a notification event. Its possible that event
is null in which case this means that tyhere is no JIRA issue event in play but rather some other ahoc call to
the JIRA AdhocNotificationService
.
This is ALWAYS called after addRecipient(NotificationFilterContext, Iterable)
has been called for all plugins.
context
- the context of this possible notificationCopyright © 2002-2019 Atlassian. All Rights Reserved.