org.jenkins_ci.plugins.build_cause_run_condition
Class ExtendedCauseCondition
java.lang.Object
org.jenkins_ci.plugins.run_condition.RunCondition
org.jenkins_ci.plugins.run_condition.common.AlwaysPrebuildRunCondition
org.jenkins_ci.plugins.build_cause_run_condition.ExtendedCauseCondition
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<org.jenkins_ci.plugins.run_condition.RunCondition>
@Extension
public class ExtendedCauseCondition
- extends org.jenkins_ci.plugins.run_condition.common.AlwaysPrebuildRunCondition
Run condition to use the reason that the build was started,
the actual conditions are subclasses that can be extended using the BuildCauseCondition
- Author:
- Chris Johnson
Nested classes/interfaces inherited from class org.jenkins_ci.plugins.run_condition.RunCondition |
org.jenkins_ci.plugins.run_condition.RunCondition.RunConditionDescriptor |
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
Method Summary |
BuildCauseCondition |
getCondition()
Returns the condition for the UI to display |
boolean |
isExclusiveCause()
Returns the exclusiveCause for the UI to display |
boolean |
runPerform(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
Performs the check of the condition and exclusiveCause. |
Methods inherited from class org.jenkins_ci.plugins.run_condition.common.AlwaysPrebuildRunCondition |
runPrebuild |
Methods inherited from class org.jenkins_ci.plugins.run_condition.RunCondition |
all, getDescriptor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtendedCauseCondition
@DataBoundConstructor
public ExtendedCauseCondition(BuildCauseCondition condition,
boolean exclusiveCause)
- Data bound constructor taking a condition and exclusive cause
- Parameters:
condition
- Build condition to useexclusiveCause
- flag to indicate whether builds started by multiple causes are allowed.
ExtendedCauseCondition
public ExtendedCauseCondition()
getCondition
public BuildCauseCondition getCondition()
- Returns the condition for the UI to display
- Returns:
- Condition that is current.
isExclusiveCause
public boolean isExclusiveCause()
- Returns the exclusiveCause for the UI to display
- Returns:
- true if only a single cause can trigger this condition.
runPerform
public boolean runPerform(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
throws InterruptedException
- Performs the check of the condition and exclusiveCause.
- Specified by:
runPerform
in class org.jenkins_ci.plugins.run_condition.RunCondition
- Returns:
- false if more than single cause for the build
Otherwise the result of the condition runPerform @see BuildCauseCondition
- Throws:
InterruptedException
Copyright © 2004-2012. All Rights Reserved.