Interface NotificationType
- All Superinterfaces:
BambooPluginModule,Comparable
- All Known Implementing Classes:
AbstractNotificationType,AfterXFailedNotificationType,AllBuildsNotificationType,AllChainNotificationType,AllStageNotificationType,BuildErrorNotificationType,BuildFailedAndFirstFixedNotificationType,BuildHungNotificationType,BuildMissingCapableAgentNotificationType,BuildQueueTimeoutNotificationType,BuildStatusChangeNotificationType,ChainFailedAndFirstFixedNotificationType,ChainStatusChangeNotificationType,ChangeInResponsibilityNotificationType,CommentNotificationType,DeploymentFailedNotificationType,DeploymentFinishedNotificationType,DeploymentStartedFinishedNotificationType,FirstJobFailedNotificationType
Represents a type of notification. This is used for the creation of notification rules and determining if the
notification should be sent.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@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 dataMethods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
init
void init(@NotNull @NotNull com.atlassian.plugin.web.api.descriptors.WeightedDescriptor moduleDescriptor) initialises the notification type plugin object with its module descriptor- Parameters:
moduleDescriptor- for this plugin object
-
getModuleDescriptor
@Nullable @Nullable com.atlassian.plugin.web.api.descriptors.WeightedDescriptor getModuleDescriptor()returns the moduleDescriptor for this plugin object if it exists.- Returns:
-
setConfigurationData
initalises the notification type object with its data based on the config string retrieved from the database- Parameters:
data- string representation of configurable data
-
getConfigurationData
Returns the string representation of the configurable data of the notification type to be persisted to the db- Returns:
- String of config data. Empty string if no config data
-
getName
Returns a short name of the notification type- Returns:
-
getDescription
Returns generic string description of this notification type- Returns:
- string description - can not be null
-
getKey
returns key for this condition object- Returns:
- string key (as in plugin definition), can not be null
-
populate
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
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
Returns the html to be displayed on the edit screen (to input data into notification type)- Returns:
- String of html
-
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.
-
isNotificationRequired
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.
-
getScope
NotificationType.Scope getScope()- Returns:
- The scope of the notification type, e.g. "plan" or "system" or "chain" or "deployment".
-