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
-
Method Summary
Modifier and TypeMethodDescription@NotNull String
Returns the string representation of the configurable data of the notification type to be persisted to the db@NotNull String
Returns generic string description of this notification type@NotNull String
Returns the html to be displayed on the edit screen (to input data into notification type)@NotNull String
getKey()
returns key for this condition object@Nullable com.atlassian.plugin.web.api.descriptors.WeightedDescriptor
returns the moduleDescriptor for this plugin object if it exists.@NotNull String
getName()
Returns a short name of the notification typegetScope()
@NotNull String
Returns the HTML representing the notification type for the notificationvoid
init
(@NotNull com.atlassian.plugin.web.api.descriptors.WeightedDescriptor moduleDescriptor) initialises the notification type plugin object with its module descriptorboolean
isNotificationRequired
(@NotNull Object event) Determines whether or not a notification should be sent based on the event.void
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 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".
-