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
 boolean filtered(NotificationRecipient recipient, NotificationFilterContext context)
          This will invoke plugins of NotificationFilter and filter (only) a recipient of a notification
 NotificationFilterContext makeContextFrom(NotificationFilterContext copy, NotificationType notificationType)
          Creates a context with a new NotificationType
 NotificationFilterContext makeContextFrom(NotificationReason reason)
          Creates a context for the specified reason
 NotificationFilterContext makeContextFrom(NotificationReason reason, Issue issue)
          Creates a context for the specified reason and for the issue
 NotificationFilterContext makeContextFrom(NotificationReason reason, IssueEvent issueEvent)
          Creates a context for the specified reason and issue event
 Iterable<NotificationRecipient> recomputeRecipients(Iterable<NotificationRecipient> recipients, NotificationFilterContext context)
          This will invoke plugins of NotificationFilter and recompute the possible recipients of the notification.
 

Method Detail

recomputeRecipients

Iterable<NotificationRecipient> recomputeRecipients(Iterable<NotificationRecipient> recipients,
                                                    NotificationFilterContext context)
This will invoke plugins of NotificationFilter and recompute the possible recipients of the notification.

Adds are invoked for all plugins first and then removes.

Parameters:
recipients - the starting set of recipients
context - a context object to pass to NotificationFilters
Returns:
the enhanced and filtered set of recipients

filtered

boolean filtered(NotificationRecipient recipient,
                 NotificationFilterContext context)
This will invoke plugins of NotificationFilter and filter (only) a recipient of a notification

Parameters:
recipient - the target recipient
context - a context object to pass to NotificationFilters
Returns:
whether the receipient should get the notification

makeContextFrom

NotificationFilterContext makeContextFrom(NotificationReason reason)
Creates a context for the specified reason

Parameters:
reason - the reason for the notification
Returns:
a context

makeContextFrom

NotificationFilterContext makeContextFrom(NotificationReason reason,
                                          Issue issue)
Creates a context for the specified reason and for the issue

Parameters:
reason - the reason for the notification
issue - the issue in play
Returns:
a context

makeContextFrom

NotificationFilterContext makeContextFrom(NotificationReason reason,
                                          IssueEvent issueEvent)
Creates a context for the specified reason and issue event

Parameters:
reason - the reason for the notification
issueEvent - 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 one
notificationType - the notification type in play
Returns:
a context


Copyright © 2002-2014 Atlassian. All Rights Reserved.