com.atlassian.jira.notification
Interface NotificationType

All Known Implementing Classes:
AbstractNotificationType, AllWatchers, ComponentLead, CurrentAssignee, CurrentReporter, ErrorNotificationType, GroupCFValue, GroupDropdown, ProjectLead, ProjectRoleSecurityAndNotificationType, RemoteUser, SingleEmailAddress, SingleUser, UserCFValue

public interface NotificationType

Type of notification recipient; single user, group, assignee, etc.

Notification types are registered in notification-event-types.xml


Method Summary
 boolean doValidation(java.lang.String key, java.util.Map parameters)
          Validate the configuration (the argument in getRecipients(com.atlassian.jira.event.issue.IssueEvent, java.lang.String)) when it is entered in the "Add Notification" page.
 java.lang.String getArgumentDisplay(java.lang.String argument)
          Displays the type's configuration in the notification scheme.
 java.lang.String getDisplayName()
          Text to display for this type, on the "Add Notification" page.
 java.util.List<NotificationRecipient> getRecipients(IssueEvent event, java.lang.String argument)
          Who is to be notified of an event.
 java.lang.String getType()
          Type identifier (currently unused).
 

Method Detail

getRecipients

java.util.List<NotificationRecipient> getRecipients(IssueEvent event,
                                                    java.lang.String argument)
Who is to be notified of an event.

Parameters:
event - The event, eg. issue created
argument - Configuration from notification scheme, eg. group name, custom field id.
Returns:
A list of NotificationRecipients.

getDisplayName

java.lang.String getDisplayName()
Text to display for this type, on the "Add Notification" page.

Returns:
(Internationalized) text to display, eg. "Group".

getType

java.lang.String getType()
Type identifier (currently unused).

Returns:
Eg. "group"

doValidation

boolean doValidation(java.lang.String key,
                     java.util.Map parameters)
Validate the configuration (the argument in getRecipients(com.atlassian.jira.event.issue.IssueEvent, java.lang.String)) when it is entered in the "Add Notification" page. For instance, a group notification type might check if the entered group exists.

Parameters:
key - Key of relevant value in parameters
parameters - HTML form parameters (only the keyed entry is relevant).
Returns:
Whether the entered value is valid for this type.

getArgumentDisplay

java.lang.String getArgumentDisplay(java.lang.String argument)
Displays the type's configuration in the notification scheme. Eg. shows the group name, or custom field name.

Parameters:
argument - Raw configuration value
Returns:
Formatted configuration value.


Copyright © 2002-2010 Atlassian. All Rights Reserved.