Package com.atlassian.jira.notification
Class NotificationFilterManagerImpl
java.lang.Object
com.atlassian.jira.notification.NotificationFilterManagerImpl
- All Implemented Interfaces:
NotificationFilterManager
- Since:
- v6.0
-
Constructor Summary
ConstructorsConstructorDescriptionNotificationFilterManagerImpl
(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.event.PluginEventManager pluginEventManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.atlassian.plugin.tracker.PluginModuleTracker<NotificationFilter,
NotificationFilterModuleDescriptor> createTracker
(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.event.PluginEventManager pluginEventManager) protected Iterable<NotificationFilter>
boolean
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.
-
Constructor Details
-
NotificationFilterManagerImpl
public NotificationFilterManagerImpl(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
-
Method Details
-
createTracker
protected com.atlassian.plugin.tracker.PluginModuleTracker<NotificationFilter,NotificationFilterModuleDescriptor> createTracker(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.event.PluginEventManager pluginEventManager) -
recomputeRecipients
public Iterable<NotificationRecipient> recomputeRecipients(Iterable<NotificationRecipient> recipients, NotificationFilterContext context) Description copied from interface:NotificationFilterManager
This will invoke plugins ofNotificationFilter
and recompute the possible recipients of the notification.Adds are invoked for all plugins first and then removes.
- Specified by:
recomputeRecipients
in interfaceNotificationFilterManager
- Parameters:
recipients
- the starting set of recipientscontext
- a context object to pass toNotificationFilter
s- Returns:
- the enhanced and filtered set of recipients
-
filtered
Description copied from interface:NotificationFilterManager
This will invoke plugins ofNotificationFilter
and filter (only) a recipient of a notification- Specified by:
filtered
in interfaceNotificationFilterManager
- 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
Description copied from interface:NotificationFilterManager
Creates a context for the specified reason- Specified by:
makeContextFrom
in interfaceNotificationFilterManager
- Parameters:
reason
- the reason for the notification- Returns:
- a context
-
makeContextFrom
Description copied from interface:NotificationFilterManager
Creates a context for the specified reason and for the issue- Specified by:
makeContextFrom
in interfaceNotificationFilterManager
- Parameters:
reason
- the reason for the notificationissue
- the issue in play- Returns:
- a context
-
makeContextFrom
Description copied from interface:NotificationFilterManager
Creates a context for the specified reason and issue event- Specified by:
makeContextFrom
in interfaceNotificationFilterManager
- Parameters:
reason
- the reason for the notificationissueEvent
- 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 interfaceNotificationFilterManager
- Parameters:
copy
- copies state from a past onenotificationType
- the notification type in play- Returns:
- a context
-
enabledNotificationFilters
-