Interface TriggerReason
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractTriggerReason,ChildDependencyTriggerReason,CodeChangedTriggerReason,CompletedStageTriggerReason,CustomRevisionBuildTriggerReason,DependencyTriggerReason,EnvironmentDependencyTriggerReason,InitialBuildTriggerReason,JIRAReleaseTriggerReason,ManualBuildTriggerReason,RerunBuildTriggerReason,RssChangedTriggerReason,ScheduledTriggerReason,TagBuildTriggerReason,UnknownTriggerReason
Interface that encapsulates the reason a build was triggered. Implementors may hold additional information
-
Method Summary
Modifier and TypeMethodDescription@NotNull TriggerReasongetChildTriggerReason(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.getKey()TheTriggerReasonkeygetName()Gives the trigger reasonGives the trigger reason in a format that can be used in a sentence eg.voidinit(String key, @NotNull ResultsSummary resultsSummary) Initializes theTriggerReasonusing data from theResultsSummaryvoidInitializes theTriggerReasonusing data from theMapvoidupdateCustomData(@NotNull BambooCustomDataAware customDataAware) Updates theTriggerReasongiven aBambooCustomDataAware
-
Method Details
-
init
Initializes theTriggerReasonusing data from theMap- Parameters:
key-fields-
-
init
Initializes theTriggerReasonusing data from theResultsSummary- Parameters:
key-resultsSummary-
-
updateCustomData
Updates theTriggerReasongiven aBambooCustomDataAware- Parameters:
customDataAware-- Since:
- 5.0
-
getKey
String getKey()TheTriggerReasonkey- 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
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:
-