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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
@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 data
-
Field Details
-
notificationTypeModuleDescriptor
-
-
Constructor Details
-
AbstractNotificationType
public AbstractNotificationType()
-
-
Method Details
-
setConfigurationData
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
- Parameters:
data
- string representation of configurable data
-
isNotificationRequired
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
- 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:NotificationType
initialises the notification type plugin object with its module descriptor- Specified by:
init
in interfaceNotificationType
- Parameters:
moduleDescriptor
- for this plugin object
-
getModuleDescriptor
@Nullable public @Nullable com.atlassian.plugin.web.api.descriptors.WeightedDescriptor getModuleDescriptor()Description copied from interface:NotificationType
returns the moduleDescriptor for this plugin object if it exists.- Specified by:
getModuleDescriptor
in interfaceNotificationType
- Returns:
-
getKey
Description copied from interface:NotificationType
returns key for this condition object- Specified by:
getKey
in interfaceNotificationType
- Returns:
- string key (as in plugin definition), can not be null
-
getName
Description copied from interface:NotificationType
Returns a short name of the notification type- Specified by:
getName
in interfaceNotificationType
- Returns:
-
getDescription
Description copied from interface:NotificationType
Returns generic string description of this notification type- Specified by:
getDescription
in interfaceNotificationType
- Returns:
- string description - can not be null
-
getScope
- Specified by:
getScope
in interfaceNotificationType
- Returns:
- The scope of the notification type, e.g. "plan" or "system" or "chain" or "deployment".
-
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
- Returns:
- String of config data. Empty string if no config data
-
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
- Returns:
- String of html
-
getViewHtml
Description copied from interface:NotificationType
Returns the HTML representing the notification type for the notification- Specified by:
getViewHtml
in interfaceNotificationType
- Returns:
- HTML of data for view configuration. If this returns null the description will be used.
-
validate
Description copied from interface:NotificationType
validate the user inputed data- Specified by:
validate
in 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:NotificationType
takes the map of config data from action and extracts the parameters it needs- Specified by:
populate
in interfaceNotificationType
- Parameters:
config
- map of key (String), value (String []) pairs from action
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-