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

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractTriggerReason, ChildDependencyTriggerReason, CodeChangedTriggerReason, DependencyTriggerReason, InitialBuildTriggerReason, 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, Job job)
          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 updateBuildResultsSummay(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 -

updateBuildResultsSummay

void updateBuildResultsSummay(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

getChildTriggerReason

@NotNull
TriggerReason getChildTriggerReason(BuildContext child,
                                            Job job)
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 -
job -
Returns:


Copyright © 2011 Atlassian. All Rights Reserved.