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 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.StringgetKey()TheTriggerReasonkeyStringgetName()Gives the trigger reasonStringgetNameForSentence()Gives the trigger reason in a format that can be used in a sentence eg.voidinit(String key, @NotNull ResultsSummary resultsSummary)Initializes theTriggerReasonusing data from theResultsSummaryvoidinit(String key, Map<String,String> fields)Initializes theTriggerReasonusing data from theMapvoidupdateCustomData(@NotNull BambooCustomDataAware customDataAware)Updates theTriggerReasongiven aBambooCustomDataAware
-
-
-
Method Detail
-
init
void init(String key, Map<String,String> fields)
Initializes theTriggerReasonusing data from theMap- Parameters:
key-fields-
-
init
void init(String key, @NotNull @NotNull ResultsSummary resultsSummary)
Initializes theTriggerReasonusing data from theResultsSummary- Parameters:
key-resultsSummary-
-
updateCustomData
void updateCustomData(@NotNull @NotNull BambooCustomDataAware customDataAware)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
@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:
-
-