com.atlassian.bamboo.notification
Interface NotificationRecipient

All Superinterfaces:
java.lang.Comparable
All Known Implementing Classes:
AbstractNotificationRecipient, CommitterRecipient, EmailRecipient, GroupRecipient, ImRecipient, UserRecipient, WatcherRecipient

public interface NotificationRecipient
extends java.lang.Comparable

Representation of a recipient of notifications. Knows how to evaluate the mediums the recipient is to retrieve.


Method Summary
 java.lang.String getDescription()
          Returns generic string description of this notification type
 java.lang.String getEditHtml()
          Returns the html to be displayed on the edit screen (to input data into notification type)
 java.lang.String getKey()
          returns full key for this condition object
 com.atlassian.plugin.web.descriptors.WeightedDescriptor getModuleDescriptor()
          returns the moduleDescriptor for this plugin object if it exists.
 java.lang.String getRecipientConfig()
          Retrieve string representation of data - if none exists retrun empty string
 java.util.List<NotificationTransport> getTransports()
          Evaluates the appropriate mediums for sending notificaions for this recipient, returning a list of appropriate transports.
 java.lang.String getViewHtml()
          Returns the HTML representing the notification type for the notification
 void init(java.lang.String configurationData)
          Initialise recipient with string based represention of its configuration data
 void init(com.atlassian.plugin.web.descriptors.WeightedDescriptor moduleDescriptor)
          initialises the notification type plugin object with its module descriptor
 void populate(java.util.Map<java.lang.String,java.lang.String[]> params)
          takes the map of config data from action and extracts the parameters it needs
 ErrorCollection validate(java.util.Map<java.lang.String,java.lang.String[]> params)
          validate the user inputed data
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getTransports

@NotNull
java.util.List<NotificationTransport> getTransports()
Evaluates the appropriate mediums for sending notificaions for this recipient, returning a list of appropriate transports.

Returns:

init

void init(@NotNull
          com.atlassian.plugin.web.descriptors.WeightedDescriptor moduleDescriptor)
initialises the notification type plugin object with its module descriptor

Parameters:
moduleDescriptor - for this plugin object

init

void init(@Nullable
          java.lang.String configurationData)
Initialise recipient with string based represention of its configuration data

Parameters:
configurationData -

getRecipientConfig

@NotNull
java.lang.String getRecipientConfig()
Retrieve string representation of data - if none exists retrun empty string

Returns:

getDescription

@NotNull
java.lang.String getDescription()
Returns generic string description of this notification type

Returns:
string description - can not be null

getKey

@NotNull
java.lang.String getKey()
returns full key for this condition object

Returns:
string key (as in plugin definition), can not be null

populate

void populate(@NotNull
              java.util.Map<java.lang.String,java.lang.String[]> params)
takes the map of config data from action and extracts the parameters it needs

Parameters:
params - map of key (String), value (String []) pairs from action

validate

@NotNull
ErrorCollection validate(@NotNull
                                 java.util.Map<java.lang.String,java.lang.String[]> params)
validate the user inputed data

Parameters:
params - map of key (String), value (String []) pairs from action
Returns:
error collection of any errors to be reported back to the user

getEditHtml

@NotNull
java.lang.String getEditHtml()
Returns the html to be displayed on the edit screen (to input data into notification type)

Returns:
String of html

getViewHtml

@NotNull
java.lang.String getViewHtml()
Returns the HTML representing the notification type for the notification

Returns:
HTML of data for view configuration. If this returns null the description will be used.

getModuleDescriptor

@Nullable
com.atlassian.plugin.web.descriptors.WeightedDescriptor getModuleDescriptor()
returns the moduleDescriptor for this plugin object if it exists.

Returns:


Copyright © 2010 Atlassian. All Rights Reserved.