Class DownstreamProjectGridBuilder
java.lang.Object
hudson.model.AbstractDescribableImpl<ProjectGridBuilder>
au.com.centrumsystems.hudson.plugin.buildpipeline.ProjectGridBuilder
au.com.centrumsystems.hudson.plugin.buildpipeline.DownstreamProjectGridBuilder
- All Implemented Interfaces:
Describable<ProjectGridBuilder>
ProjectGridBuilder based on the upstream/downstream relationship.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDescriptor. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(BuildPipelineView owner) Builds the grid.org.kohsuke.stapler.HttpResponsedoBuild(org.kohsuke.stapler.StaplerRequest req, BuildPipelineView owner) Called to start a new pipeline instance (normally by triggering some job.)AbstractProject<?,?> getFirstJob(BuildPipelineView owner) The job that's configured as the head of the pipeline.booleanIf the grid produced by this builder supports the notion of "starting a new pipeline instance", and if the current user has a permission to do so, then return true.voidonJobRenamed(BuildPipelineView owner, Item item, String oldName, String newName) Called byBuildPipelineViewwhen one of its members are renamed.booleanIf the first job of the grid produced by this builder has parametersMethods inherited from class au.com.centrumsystems.hudson.plugin.buildpipeline.ProjectGridBuilder
getDescriptor
-
Constructor Details
-
DownstreamProjectGridBuilder
- Parameters:
firstJob- Name of the job to lead the piepline.
-
-
Method Details
-
getFirstJob
-
getFirstJobLink
-
getFirstJob
The job that's configured as the head of the pipeline.- Parameters:
owner- View that this builder is operating under.- Returns:
- possibly null
-
hasBuildPermission
Description copied from class:ProjectGridBuilderIf the grid produced by this builder supports the notion of "starting a new pipeline instance", and if the current user has a permission to do so, then return true.- Specified by:
hasBuildPermissionin classProjectGridBuilder- Parameters:
owner- View that this builder is operating under.- Returns:
- True if the user has a permission.
-
startsWithParameters
Description copied from class:ProjectGridBuilderIf the first job of the grid produced by this builder has parameters- Specified by:
startsWithParametersin classProjectGridBuilder- Parameters:
owner- View that this builder is operating under.- Returns:
- True if the first job has parameters.
-
doBuild
public org.kohsuke.stapler.HttpResponse doBuild(org.kohsuke.stapler.StaplerRequest req, @AncestorInPath BuildPipelineView owner) throws IOException Description copied from class:ProjectGridBuilderCalled to start a new pipeline instance (normally by triggering some job.)- Specified by:
doBuildin classProjectGridBuilder- Parameters:
req- Current HTTP requestowner- View that this builder is operating under.- Returns:
- The HTTP response.
- Throws:
IOException
-
build
Description copied from class:ProjectGridBuilderBuilds the grid.- Specified by:
buildin classProjectGridBuilder- Parameters:
owner- The view for which this builder is working. Never null. If theProjectGridBuildertakes user-supplied job name, this parameter should be used as a context to resolve relative names. SeeJenkins.getItem(String, hudson.model.ItemGroup)(where you obtainItemGroupbyView.getOwnerItemGroup().- Returns:
- Never null, although the obtained
ProjectGridcan be empty.
-
onJobRenamed
public void onJobRenamed(BuildPipelineView owner, Item item, String oldName, String newName) throws IOException Description copied from class:ProjectGridBuilderCalled byBuildPipelineViewwhen one of its members are renamed.- Overrides:
onJobRenamedin classProjectGridBuilder- Parameters:
owner- View that this builder is operating under.item- Job being renamed.oldName- Old short name of the jobnewName- New short name of the job- Throws:
IOException
-