com.atlassian.jira.notification.type
Class GroupCFValue

java.lang.Object
  extended by com.atlassian.jira.notification.type.AbstractNotificationType
      extended by com.atlassian.jira.notification.type.GroupCFValue
All Implemented Interfaces:
NotificationType

public class GroupCFValue
extends AbstractNotificationType

Group Custom Field notification type. Configured with a custom field, it interprets the custom field's value as a group name, and then notifies members of that group.

Since:
3.6

Field Summary
static java.lang.String ID
           
 
Constructor Summary
GroupCFValue(JiraAuthenticationContext jiraAuthenticationContext, GroupSelectorUtils groupSelectorUtils)
           
 
Method Summary
 boolean doValidation(java.lang.String key, java.util.Map parameters)
          Validate the configuration (the argument in NotificationType.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 getFields()
           
 java.util.List getRecipients(IssueEvent event, java.lang.String customFieldId)
          Who is to be notified of an event.
 java.lang.String getType()
          Type identifier (currently unused).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values
Constructor Detail

GroupCFValue

public GroupCFValue(JiraAuthenticationContext jiraAuthenticationContext,
                    GroupSelectorUtils groupSelectorUtils)
Method Detail

getRecipients

public java.util.List getRecipients(IssueEvent event,
                                    java.lang.String customFieldId)
Description copied from interface: NotificationType
Who is to be notified of an event.

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

getDisplayName

public java.lang.String getDisplayName()
Description copied from interface: NotificationType
Text to display for this type, on the "Add Notification" page.

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

getType

public java.lang.String getType()
Description copied from interface: NotificationType
Type identifier (currently unused).

Specified by:
getType in interface NotificationType
Overrides:
getType in class AbstractNotificationType
Returns:
Eg. "group"

getFields

public java.util.List getFields()

doValidation

public boolean doValidation(java.lang.String key,
                            java.util.Map parameters)
Description copied from interface: NotificationType
Validate the configuration (the argument in NotificationType.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.

Specified by:
doValidation in interface NotificationType
Overrides:
doValidation in class AbstractNotificationType
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

public java.lang.String getArgumentDisplay(java.lang.String argument)
Description copied from interface: NotificationType
Displays the type's configuration in the notification scheme. Eg. shows the group name, or custom field name.

Specified by:
getArgumentDisplay in interface NotificationType
Overrides:
getArgumentDisplay in class AbstractNotificationType
Parameters:
argument - Raw configuration value
Returns:
Formatted configuration value.


Copyright © 2002-2010 Atlassian. All Rights Reserved.