com.atlassian.bamboo.v2.build.trigger
Interface TriggerReason

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractTriggerReason, ChildDependencyTriggerReason, CodeChangedTriggerReason, DependencyTriggerReason, InitialBuildTriggerReason, JIRAReleaseTriggerReason, ManualBuildTriggerReason, ScheduledTriggerReason, UnknownTriggerReason

public interface TriggerReason
extends java.io.Serializable

Interface that encapsulates the reason a build was triggered. Implementors may hold additional information


Method Summary
 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.
 java.lang.String getKey()
          The TriggerReason key
 java.lang.String getName()
          Gives the trigger reason
 java.lang.String getNameForSentence()
          Gives the trigger reason in a format that can be used in a sentence eg.
 void init(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> fields)
          Initializes the TriggerReason using data from the Map
 void init(java.lang.String key, ResultsSummary resultsSummary)
          Initializes the TriggerReason using data from the ResultsSummary
 void updateBuildResultsSummary(ResultsSummary resultsSummary)
          Updates the TriggerReason given a ResultsSummary
 

Method Detail

init

void init(java.lang.String key,
          java.util.Map<java.lang.String,java.lang.String> fields)
Initializes the TriggerReason using data from the Map

Parameters:
key -
fields -

init

void init(java.lang.String key,
          ResultsSummary resultsSummary)
Initializes the TriggerReason using data from the ResultsSummary

Parameters:
key -
resultsSummary -

updateBuildResultsSummary

void updateBuildResultsSummary(ResultsSummary resultsSummary)
Updates the TriggerReason given a ResultsSummary

Parameters:
resultsSummary -

getKey

java.lang.String getKey()
The TriggerReason key

Returns:
key

getName

java.lang.String getName()
Gives the trigger reason

Returns:
{String} - the trigger reason

getNameForSentence

java.lang.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
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:


Copyright © 2012 Atlassian. All Rights Reserved.