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

public abstract class AbstractNotificationType extends Object implements NotificationType
  • Field Details

  • Constructor Details

    • AbstractNotificationType

      public AbstractNotificationType()
  • Method Details

    • 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 interface NotificationType
      Parameters:
      data - string representation of configurable 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 interface NotificationType
      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 interface NotificationType
      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 interface NotificationType
      Returns:
    • getKey

      @NotNull public @NotNull String getKey()
      Description copied from interface: NotificationType
      returns key for this condition object
      Specified by:
      getKey in interface NotificationType
      Returns:
      string key (as in plugin definition), can not be null
    • getName

      @NotNull public @NotNull String getName()
      Description copied from interface: NotificationType
      Returns a short name of the notification type
      Specified by:
      getName in interface NotificationType
      Returns:
    • getDescription

      @NotNull public @NotNull String getDescription()
      Description copied from interface: NotificationType
      Returns generic string description of this notification type
      Specified by:
      getDescription in interface NotificationType
      Returns:
      string description - can not be null
    • getScope

      public NotificationType.Scope getScope()
      Specified by:
      getScope in interface NotificationType
      Returns:
      The scope of the notification type, e.g. "plan" or "system" or "chain" or "deployment".
    • 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 interface NotificationType
      Returns:
      String of config data. Empty string if no config data
    • 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 interface NotificationType
      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 interface NotificationType
      Returns:
      HTML of data for view configuration. If this returns null the description will be used.
    • 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 interface NotificationType
      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

      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 interface NotificationType
      Parameters:
      config - map of key (String), value (String []) pairs from action
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable