hudson.plugins.downstream_ext
Class DownstreamTrigger

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Publisher
          extended by hudson.tasks.Recorder
              extended by hudson.plugins.downstream_ext.DownstreamTrigger
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.matrix.MatrixAggregatable, hudson.model.DependecyDeclarer, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep

public class DownstreamTrigger
extends hudson.tasks.Recorder
implements hudson.model.DependecyDeclarer, hudson.matrix.MatrixAggregatable

Triggers builds of other projects. Note that this class is in large parts copied & pasted from BuildTrigger (rev. 21890)


Nested Class Summary
static class DownstreamTrigger.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Field Summary
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
DownstreamTrigger(java.lang.String childProjects, boolean evenIfUnstable, boolean onlyIfSCMChanges)
           
DownstreamTrigger(java.lang.String childProjects, hudson.model.Result threshold, boolean onlyIfSCMChanges)
           
 
Method Summary
 void buildDependencyGraph(hudson.model.AbstractProject owner, hudson.model.DependencyGraph graph)
           
 hudson.matrix.MatrixAggregator createAggregator(hudson.matrix.MatrixBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 java.util.List<hudson.model.AbstractProject> getChildProjects()
           
 java.lang.String getChildProjectsValue()
           
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
           
 hudson.model.Result getThreshold()
           
 boolean isOnlyIfSCMChanges()
           
 boolean needsToRunAfterFinalized()
           
 boolean onJobRenamed(java.lang.String oldName, java.lang.String newName)
          Called from Job.renameTo(String) when a job is renamed.
 boolean perform(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 
Methods inherited from class hudson.tasks.Recorder
getDescriptor
 
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, prebuild
 

Constructor Detail

DownstreamTrigger

@DataBoundConstructor
public DownstreamTrigger(java.lang.String childProjects,
                                              boolean evenIfUnstable,
                                              boolean onlyIfSCMChanges)

DownstreamTrigger

public DownstreamTrigger(java.lang.String childProjects,
                         hudson.model.Result threshold,
                         boolean onlyIfSCMChanges)
Method Detail

getChildProjectsValue

public java.lang.String getChildProjectsValue()

getThreshold

public hudson.model.Result getThreshold()

isOnlyIfSCMChanges

public boolean isOnlyIfSCMChanges()

getChildProjects

public java.util.List<hudson.model.AbstractProject> getChildProjects()

getRequiredMonitorService

public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
Specified by:
getRequiredMonitorService in interface hudson.tasks.BuildStep

perform

public boolean perform(hudson.model.AbstractBuild build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer

buildDependencyGraph

public void buildDependencyGraph(hudson.model.AbstractProject owner,
                                 hudson.model.DependencyGraph graph)
Specified by:
buildDependencyGraph in interface hudson.model.DependecyDeclarer

needsToRunAfterFinalized

public boolean needsToRunAfterFinalized()
Overrides:
needsToRunAfterFinalized in class hudson.tasks.Publisher

createAggregator

public hudson.matrix.MatrixAggregator createAggregator(hudson.matrix.MatrixBuild build,
                                                       hudson.Launcher launcher,
                                                       hudson.model.BuildListener listener)
Specified by:
createAggregator in interface hudson.matrix.MatrixAggregatable

onJobRenamed

public boolean onJobRenamed(java.lang.String oldName,
                            java.lang.String newName)
Called from Job.renameTo(String) when a job is renamed.

Returns:
true if this DownstreamTrigger is changed and needs to be saved.


Copyright © 2009. All Rights Reserved.