Class AbstractNotificationType
java.lang.Object
com.atlassian.bamboo.notification.AbstractNotificationType
- All Implemented Interfaces:
NotificationType,BambooPluginModule,Comparable
- Direct Known Subclasses:
AfterXFailedNotificationType,AllBuildsNotificationType,AllChainNotificationType,AllStageNotificationType,BuildErrorNotificationType,BuildFailedAndFirstFixedNotificationType,BuildHungNotificationType,BuildMissingCapableAgentNotificationType,BuildQueueTimeoutNotificationType,BuildStatusChangeNotificationType,ChainStatusChangeNotificationType,ChangeInResponsibilityNotificationType,CommentNotificationType,DeploymentFailedNotificationType,DeploymentFinishedNotificationType,DeploymentStartedFinishedNotificationType,FirstJobFailedNotificationType
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.notification.NotificationType
NotificationType.Scope -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint@NotNull StringReturns the string representation of the configurable data of the notification type to be persisted to the db@NotNull StringReturns generic string description of this notification type@NotNull StringReturns the html to be displayed on the edit screen (to input data into notification type)@NotNull StringgetKey()returns key for this condition object@Nullable com.atlassian.plugin.web.api.descriptors.WeightedDescriptorreturns the moduleDescriptor for this plugin object if it exists.@NotNull StringgetName()Returns a short name of the notification typegetScope()@NotNull StringReturns the HTML representing the notification type for the notificationvoidinit(@NotNull com.atlassian.plugin.web.api.descriptors.WeightedDescriptor moduleDescriptor) initialises the notification type plugin object with its module descriptorbooleanisNotificationRequired(@NotNull Object event) Determines whether or not a notification should be sent based on the event.voidtakes the map of config data from action and extracts the parameters it needsvoidsetConfigurationData(@Nullable String data) initalises the notification type object with its data based on the config string retrieved from the database@NotNull ErrorCollectionvalidate the user inputed data
-
Field Details
-
notificationTypeModuleDescriptor
-
-
Constructor Details
-
AbstractNotificationType
public AbstractNotificationType()
-
-
Method Details
-
setConfigurationData
Description copied from interface:NotificationTypeinitalises the notification type object with its data based on the config string retrieved from the database- Specified by:
setConfigurationDatain interfaceNotificationType- Parameters:
data- string representation of configurable data
-
isNotificationRequired
Description copied from interface:NotificationTypeDetermines 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:
isNotificationRequiredin interfaceNotificationType- Returns:
- true or false - to send or not to send.
-
init
public void init(@NotNull @NotNull com.atlassian.plugin.web.api.descriptors.WeightedDescriptor moduleDescriptor) Description copied from interface:NotificationTypeinitialises the notification type plugin object with its module descriptor- Specified by:
initin interfaceNotificationType- Parameters:
moduleDescriptor- for this plugin object
-
getModuleDescriptor
@Nullable public @Nullable com.atlassian.plugin.web.api.descriptors.WeightedDescriptor getModuleDescriptor()Description copied from interface:NotificationTypereturns the moduleDescriptor for this plugin object if it exists.- Specified by:
getModuleDescriptorin interfaceNotificationType- Returns:
-
getKey
Description copied from interface:NotificationTypereturns key for this condition object- Specified by:
getKeyin interfaceNotificationType- Returns:
- string key (as in plugin definition), can not be null
-
getName
Description copied from interface:NotificationTypeReturns a short name of the notification type- Specified by:
getNamein interfaceNotificationType- Returns:
-
getDescription
Description copied from interface:NotificationTypeReturns generic string description of this notification type- Specified by:
getDescriptionin interfaceNotificationType- Returns:
- string description - can not be null
-
getScope
- Specified by:
getScopein interfaceNotificationType- Returns:
- The scope of the notification type, e.g. "plan" or "system" or "chain" or "deployment".
-
getConfigurationData
Description copied from interface:NotificationTypeReturns the string representation of the configurable data of the notification type to be persisted to the db- Specified by:
getConfigurationDatain interfaceNotificationType- Returns:
- String of config data. Empty string if no config data
-
getEditHtml
Description copied from interface:NotificationTypeReturns the html to be displayed on the edit screen (to input data into notification type)- Specified by:
getEditHtmlin interfaceNotificationType- Returns:
- String of html
-
getViewHtml
Description copied from interface:NotificationTypeReturns the HTML representing the notification type for the notification- Specified by:
getViewHtmlin interfaceNotificationType- Returns:
- HTML of data for view configuration. If this returns null the description will be used.
-
validate
Description copied from interface:NotificationTypevalidate the user inputed data- Specified by:
validatein interfaceNotificationType- Parameters:
params- map of key (String), value (String []) pairs from action- Returns:
- error collection of any errors to be reported back to the user
-
populate
Description copied from interface:NotificationTypetakes the map of config data from action and extracts the parameters it needs- Specified by:
populatein interfaceNotificationType- Parameters:
config- map of key (String), value (String []) pairs from action
-
compareTo
- Specified by:
compareToin interfaceComparable
-