Package com.atlassian.jira.notification
Interface NotificationFilterManager
- All Known Implementing Classes:
NotificationFilterManagerImpl
public interface NotificationFilterManager
This allows notifications to filter before they are sent out. Calls out to
NotificationFilter
plugin point
as part of this.- Since:
- v6.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
filtered
(NotificationRecipient recipient, NotificationFilterContext context) This will invoke plugins ofNotificationFilter
and filter (only) a recipient of a notificationmakeContextFrom
(NotificationFilterContext copy, NotificationType notificationType) Creates a context with a new NotificationTypemakeContextFrom
(NotificationReason reason) Creates a context for the specified reasonmakeContextFrom
(NotificationReason reason, IssueEvent issueEvent) Creates a context for the specified reason and issue eventmakeContextFrom
(NotificationReason reason, Issue issue) Creates a context for the specified reason and for the issuerecomputeRecipients
(Iterable<NotificationRecipient> recipients, NotificationFilterContext context) This will invoke plugins ofNotificationFilter
and recompute the possible recipients of the notification.
-
Method Details
-
recomputeRecipients
Iterable<NotificationRecipient> recomputeRecipients(Iterable<NotificationRecipient> recipients, NotificationFilterContext context) This will invoke plugins ofNotificationFilter
and recompute the possible recipients of the notification.Adds are invoked for all plugins first and then removes.
- Parameters:
recipients
- the starting set of recipientscontext
- a context object to pass toNotificationFilter
s- Returns:
- the enhanced and filtered set of recipients
-
filtered
This will invoke plugins ofNotificationFilter
and filter (only) a recipient of a notification- Parameters:
recipient
- the target recipientcontext
- a context object to pass toNotificationFilter
s- Returns:
- true if the recipient is filtered out by at least one plugin (i.e., the recipient should not receive the notification)
-
makeContextFrom
Creates a context for the specified reason- Parameters:
reason
- the reason for the notification- Returns:
- a context
-
makeContextFrom
Creates a context for the specified reason and for the issue- Parameters:
reason
- the reason for the notificationissue
- the issue in play- Returns:
- a context
-
makeContextFrom
Creates a context for the specified reason and issue event- Parameters:
reason
- the reason for the notificationissueEvent
- the issue event in play- Returns:
- a context
-
makeContextFrom
NotificationFilterContext makeContextFrom(NotificationFilterContext copy, NotificationType notificationType) Creates a context with a new NotificationType- Parameters:
copy
- copies state from a past onenotificationType
- the notification type in play- Returns:
- a context
-