Interface TriggerReason

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractTriggerReason, ChildDependencyTriggerReason, CodeChangedTriggerReason, CompletedStageTriggerReason, CustomRevisionBuildTriggerReason, DependencyTriggerReason, EnvironmentDependencyTriggerReason, InitialBuildTriggerReason, JIRAReleaseTriggerReason, ManualBuildTriggerReason, RerunBuildTriggerReason, RssChangedTriggerReason, ScheduledTriggerReason, TagBuildTriggerReason, UnknownTriggerReason

public interface TriggerReason extends Serializable
Interface that encapsulates the reason a build was triggered. Implementors may hold additional information
  • Method Details

    • init

      void init(String key, Map<String,String> fields)
      Initializes the TriggerReason using data from the Map
      Parameters:
      key -
      fields -
    • init

      void init(String key, @NotNull @NotNull ResultsSummary resultsSummary)
      Initializes the TriggerReason using data from the ResultsSummary
      Parameters:
      key -
      resultsSummary -
    • updateCustomData

      void updateCustomData(@NotNull @NotNull BambooCustomDataAware customDataAware)
      Parameters:
      customDataAware -
      Since:
      5.0
    • getKey

      String getKey()
      Returns:
      key
    • getName

      String getName()
      Gives the trigger reason
      Returns:
      {String} - the trigger reason
    • getNameForSentence

      String getNameForSentence()
      Gives the trigger reason in a format that can be used in a sentence eg. "was triggered at the scheduled time of 6:34 PM"
      Returns:
      {String} - the trigger reason, must be HTML escaped.
    • getChildTriggerReason

      @NotNull @NotNull TriggerReason getChildTriggerReason(BuildContext child, ImmutablePlan plan)
      If build A (triggered because of this TriggerReason) caused builds of plans X,Y,Z to trigger, this method will be called to determine trigger reasons for plans X, Y, Z.
      Parameters:
      child -
      plan -
      Returns: