com.atlassian.jira.notification
Class NotificationFilterManagerImpl

java.lang.Object
  extended by com.atlassian.jira.notification.NotificationFilterManagerImpl
All Implemented Interfaces:
NotificationFilterManager

public class NotificationFilterManagerImpl
extends Object
implements NotificationFilterManager

Since:
v6.0

Constructor Summary
NotificationFilterManagerImpl(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationFilterManagerImpl

public NotificationFilterManagerImpl(com.atlassian.plugin.PluginAccessor pluginAccessor,
                                     com.atlassian.plugin.event.PluginEventManager pluginEventManager)
Method Detail

recomputeRecipients

public Iterable<NotificationRecipient> recomputeRecipients(Iterable<NotificationRecipient> recipients,
                                                           NotificationFilterContext context)
Description copied from interface: NotificationFilterManager
This will invoke plugins of NotificationFilter and recompute the possible recipients of the notification.

Adds are invoked for all plugins first and then removes.

Specified by:
recomputeRecipients in interface NotificationFilterManager
Parameters:
recipients - the starting set of recipients
context - a context object to pass to NotificationFilters
Returns:
the enhanced and filtered set of recipients

filtered

public boolean filtered(NotificationRecipient recipient,
                        NotificationFilterContext context)
Description copied from interface: NotificationFilterManager
This will invoke plugins of NotificationFilter and filter (only) a recipient of a notification

Specified by:
filtered in interface NotificationFilterManager
Parameters:
recipient - the target recipient
context - a context object to pass to NotificationFilters
Returns:
whether the receipient should get the notification

makeContextFrom

public NotificationFilterContext makeContextFrom(NotificationReason reason)
Description copied from interface: NotificationFilterManager
Creates a context for the specified reason

Specified by:
makeContextFrom in interface NotificationFilterManager
Parameters:
reason - the reason for the notification
Returns:
a context

makeContextFrom

public NotificationFilterContext makeContextFrom(NotificationReason reason,
                                                 Issue issue)
Description copied from interface: NotificationFilterManager
Creates a context for the specified reason and for the issue

Specified by:
makeContextFrom in interface NotificationFilterManager
Parameters:
reason - the reason for the notification
issue - the issue in play
Returns:
a context

makeContextFrom

public NotificationFilterContext makeContextFrom(NotificationReason reason,
                                                 IssueEvent issueEvent)
Description copied from interface: NotificationFilterManager
Creates a context for the specified reason and issue event

Specified by:
makeContextFrom in interface NotificationFilterManager
Parameters:
reason - the reason for the notification
issueEvent - the issue event in play
Returns:
a context

makeContextFrom

public NotificationFilterContext makeContextFrom(NotificationFilterContext copy,
                                                 NotificationType notificationType)
Description copied from interface: NotificationFilterManager
Creates a context with a new NotificationType

Specified by:
makeContextFrom in interface NotificationFilterManager
Parameters:
copy - copies state from a past one
notificationType - the notification type in play
Returns:
a context


Copyright © 2002-2014 Atlassian. All Rights Reserved.