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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @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.String
getKey()
TheTriggerReason
keyString
getName()
Gives the trigger reasonString
getNameForSentence()
Gives the trigger reason in a format that can be used in a sentence eg.void
init(String key, @NotNull ResultsSummary resultsSummary)
Initializes theTriggerReason
using data from theResultsSummary
void
init(String key, Map<String,String> fields)
Initializes theTriggerReason
using data from theMap
void
updateCustomData(@NotNull BambooCustomDataAware customDataAware)
Updates theTriggerReason
given aBambooCustomDataAware
-
-
-
Method Detail
-
init
void init(String key, Map<String,String> fields)
Initializes theTriggerReason
using data from theMap
- Parameters:
key
-fields
-
-
init
void init(String key, @NotNull @NotNull ResultsSummary resultsSummary)
Initializes theTriggerReason
using data from theResultsSummary
- Parameters:
key
-resultsSummary
-
-
updateCustomData
void updateCustomData(@NotNull @NotNull BambooCustomDataAware customDataAware)
Updates theTriggerReason
given aBambooCustomDataAware
- Parameters:
customDataAware
-- Since:
- 5.0
-
getKey
String getKey()
TheTriggerReason
key- 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:
-
-