public class

NotificationFilterManagerImpl

extends Object
implements NotificationFilterManager
java.lang.Object
   ↳ com.atlassian.jira.notification.NotificationFilterManagerImpl

Summary

Public Constructors
NotificationFilterManagerImpl(PluginAccessor pluginAccessor, PluginEventManager pluginEventManager)
Public Methods
boolean filtered(NotificationRecipient recipient, NotificationFilterContext context)
This will invoke plugins of NotificationFilter and filter (only) a recipient of a notification
NotificationFilterContext makeContextFrom(NotificationReason reason)
Creates a context for the specified reason
NotificationFilterContext makeContextFrom(NotificationReason reason, IssueEvent issueEvent)
Creates a context for the specified reason and issue event
NotificationFilterContext makeContextFrom(NotificationFilterContext copy, NotificationType notificationType)
Creates a context with a new NotificationType
NotificationFilterContext makeContextFrom(NotificationReason reason, Issue issue)
Creates a context for the specified reason and for the issue
Iterable<NotificationRecipient> recomputeRecipients(Iterable<NotificationRecipient> recipients, NotificationFilterContext context)
This will invoke plugins of NotificationFilter and recompute the possible recipients of the notification.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.notification.NotificationFilterManager

Public Constructors

public NotificationFilterManagerImpl (PluginAccessor pluginAccessor, PluginEventManager pluginEventManager)

Public Methods

public 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

public NotificationFilterContext makeContextFrom (NotificationReason reason)

Creates a context for the specified reason

Parameters
reason the reason for the notification
Returns
  • a context

public 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

public 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

public 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

public 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