Class AfterXFailedNotificationType
- java.lang.Object
-
- com.atlassian.bamboo.notification.AbstractNotificationType
-
- com.atlassian.bamboo.notification.chain.AfterXFailedNotificationType
-
- All Implemented Interfaces:
NotificationType
,BambooPluginModule
,Comparable
public class AfterXFailedNotificationType extends AbstractNotificationType
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.bamboo.notification.NotificationType
NotificationType.Scope
-
-
Field Summary
Fields Modifier and Type Field Description static int
MINIMUM_FAILURES
-
Fields inherited from class com.atlassian.bamboo.notification.AbstractNotificationType
notificationTypeModuleDescriptor
-
-
Constructor Summary
Constructors Constructor Description AfterXFailedNotificationType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
getConfigurationData()
Returns the string representation of the configurable data of the notification type to be persisted to the db@NotNull String
getEditHtml()
Returns the html to be displayed on the edit screen (to input data into notification type)@NotNull String
getViewHtml()
Returns the HTML representing the notification type for the notificationboolean
isNotificationRequired(@NotNull Object event)
Determines whether or not a notification should be sent based on the event.void
populate(@NotNull Map<String,String[]> config)
takes the map of config data from action and extracts the parameters it needsvoid
setConfigurationData(@Nullable String data)
initalises the notification type object with its data based on the config string retrieved from the database@NotNull ErrorCollection
validate(@NotNull Map<String,String[]> params)
validate the user inputed data-
Methods inherited from class com.atlassian.bamboo.notification.AbstractNotificationType
compareTo, getDescription, getKey, getModuleDescriptor, getName, getScope, init
-
-
-
-
Field Detail
-
MINIMUM_FAILURES
public static final int MINIMUM_FAILURES
- See Also:
- Constant Field Values
-
-
Method Detail
-
setConfigurationData
public void setConfigurationData(@Nullable @Nullable 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 interfaceNotificationType
- Overrides:
setConfigurationData
in classAbstractNotificationType
- Parameters:
data
- string representation of configurable data
-
getConfigurationData
@NotNull public @NotNull 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 interfaceNotificationType
- Overrides:
getConfigurationData
in classAbstractNotificationType
- Returns:
- String of config data. Empty string if no config data
-
isNotificationRequired
public boolean isNotificationRequired(@NotNull @NotNull Object 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.- Specified by:
isNotificationRequired
in interfaceNotificationType
- Overrides:
isNotificationRequired
in classAbstractNotificationType
- Returns:
- true or false - to send or not to send.
-
populate
public void populate(@NotNull @NotNull Map<String,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 interfaceNotificationType
- Overrides:
populate
in classAbstractNotificationType
- Parameters:
config
- map of key (String), value (String []) pairs from action
-
validate
@NotNull public @NotNull ErrorCollection validate(@NotNull @NotNull Map<String,String[]> params)
Description copied from interface:NotificationType
validate the user inputed data- Specified by:
validate
in interfaceNotificationType
- Overrides:
validate
in classAbstractNotificationType
- 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 @NotNull 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 interfaceNotificationType
- Overrides:
getEditHtml
in classAbstractNotificationType
- Returns:
- String of html
-
getViewHtml
@NotNull public @NotNull String getViewHtml()
Description copied from interface:NotificationType
Returns the HTML representing the notification type for the notification- Specified by:
getViewHtml
in interfaceNotificationType
- Overrides:
getViewHtml
in classAbstractNotificationType
- Returns:
- HTML of data for view configuration. If this returns null the description will be used.
-
-