com.atlassian.bamboo.notification.builderror
Class BuildErrorNotificationType

java.lang.Object
  extended by com.atlassian.bamboo.notification.AbstractNotificationType
      extended by com.atlassian.bamboo.notification.builderror.BuildErrorNotificationType
All Implemented Interfaces:
NotificationType, BambooPluginModule, java.lang.Comparable

public class BuildErrorNotificationType
extends AbstractNotificationType


Field Summary
 
Fields inherited from class com.atlassian.bamboo.notification.AbstractNotificationType
notificationTypeModuleDescriptor
 
Constructor Summary
BuildErrorNotificationType()
           
 
Method Summary
 java.lang.String getConfigurationData()
          Returns the string representation of the configurable data of the notification type to be persisted to the db
 java.lang.String getEditHtml()
          Returns the html to be displayed on the edit screen (to input data into notification type)
 java.lang.String getViewHtml()
          Returns the HTML representing the notification type for the notification
 boolean isNotificationRequired(com.atlassian.event.Event event)
          Determines whether or not a notification should be sent based on the event.
 void populate(java.util.Map<java.lang.String,java.lang.String[]> config)
          takes the map of config data from action and extracts the parameters it needs
 void setConfigurationData(java.lang.String data)
          initalises the notification type object with its data based on the config string retrieved from the database
 void setTemplateRenderer(TemplateRenderer templateRenderer)
           
 ErrorCollection validate(java.util.Map<java.lang.String,java.lang.String[]> params)
          validate the user inputed data
 
Methods inherited from class com.atlassian.bamboo.notification.AbstractNotificationType
compareTo, getDescription, getKey, getModuleDescriptor, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildErrorNotificationType

public BuildErrorNotificationType()
Method Detail

setConfigurationData

public void setConfigurationData(@Nullable
                                 java.lang.String data)
Description copied from interface: NotificationType
initalises the notification type object with its data based on the config string retrieved from the database

Specified by:
setConfigurationData in interface NotificationType
Overrides:
setConfigurationData in class AbstractNotificationType
Parameters:
data - string representation of configurable data

getConfigurationData

@NotNull
public java.lang.String getConfigurationData()
Description copied from interface: NotificationType
Returns the string representation of the configurable data of the notification type to be persisted to the db

Specified by:
getConfigurationData in interface NotificationType
Overrides:
getConfigurationData in class AbstractNotificationType
Returns:
String of config data. Empty string if no config data

isNotificationRequired

public boolean isNotificationRequired(@NotNull
                                      com.atlassian.event.Event event)
Description copied from interface: NotificationType
Determines whether or not a notification should be sent based on the event. Can look for context specific information as well as user configuration.

Returns:
true or false - to send or not to send.

populate

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

Specified by:
populate in interface NotificationType
Overrides:
populate in class AbstractNotificationType
Parameters:
config - map of key (String), value (String []) pairs from action

validate

@NotNull
public ErrorCollection validate(@NotNull
                                        java.util.Map<java.lang.String,java.lang.String[]> params)
Description copied from interface: NotificationType
validate the user inputed data

Specified by:
validate in interface NotificationType
Overrides:
validate in class AbstractNotificationType
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
public java.lang.String getEditHtml()
Description copied from interface: NotificationType
Returns the html to be displayed on the edit screen (to input data into notification type)

Specified by:
getEditHtml in interface NotificationType
Overrides:
getEditHtml in class AbstractNotificationType
Returns:
String of html

getViewHtml

@NotNull
public java.lang.String getViewHtml()
Description copied from interface: NotificationType
Returns the HTML representing the notification type for the notification

Specified by:
getViewHtml in interface NotificationType
Overrides:
getViewHtml in class AbstractNotificationType
Returns:
HTML of data for view configuration. If this returns null the description will be used.

setTemplateRenderer

public void setTemplateRenderer(TemplateRenderer templateRenderer)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.