Package com.atlassian.jira.notification
Interface NotificationType
- All Known Implementing Classes:
AbstractNotificationType
,AllWatchers
,ComponentLead
,CurrentAssignee
,CurrentReporter
,ErrorNotificationType
,GroupCFValue
,GroupDropdown
,ProjectLead
,ProjectRoleSecurityAndNotificationType
,RemoteUser
,SingleEmailAddress
,SingleUser
,TypeForTesting
,TypeForTesting2
,UserCFValue
public interface NotificationType
Type of notification recipient; single user, group, assignee, etc.
Notification types are registered in notification-event-types.xml.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
doValidation
(String key, Map parameters) Validate the configuration (the argument ingetRecipients(com.atlassian.jira.event.issue.IssueEvent, String)
) when it is entered in the "Add Notification" page.getArgumentDisplay
(String argument) Obtains the user-friendly display for the argument.getArgumentValue
(String displayValue) Obtains the raw parameter value to save for the given user entry user-friendly display value.Text to display for this type, on the "Add Notification" page.getRecipients
(IssueEvent event, String argument) Who is to be notified of an event.getType()
Type identifier (currently unused).
-
Method Details
-
getRecipients
Who is to be notified of an event.- Parameters:
event
- The event, eg. issue createdargument
- Configuration from notification scheme, eg. group name, custom field id.- Returns:
- A list of
NotificationRecipient
s.
-
getDisplayName
String getDisplayName()Text to display for this type, on the "Add Notification" page.- Returns:
- (Internationalized) text to display, eg. "Group".
-
getType
String getType()Type identifier (currently unused).- Returns:
- Eg. "group"
-
doValidation
Validate the configuration (the argument ingetRecipients(com.atlassian.jira.event.issue.IssueEvent, 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 parametersparameters
- HTML form parameters (only the keyed entry is relevant).- Returns:
- Whether the entered value is valid for this type.
-
getArgumentDisplay
Obtains the user-friendly display for the argument. For example, returns a username for a key.- Parameters:
argument
- Raw configuration value- Returns:
- Formatted configuration value.
-
getArgumentValue
Obtains the raw parameter value to save for the given user entry user-friendly display value. For example, the user picker displays a username, but this needs to be stored in the configuration parameter as the user's key, instead.- Parameters:
displayValue
- Value entered into the form (username, for example)- Returns:
- raw configuration value.
-