Class ProjectGridBuilder
java.lang.Object
hudson.model.AbstractDescribableImpl<ProjectGridBuilder>
au.com.centrumsystems.hudson.plugin.buildpipeline.ProjectGridBuilder
- All Implemented Interfaces:
Describable<ProjectGridBuilder>
- Direct Known Subclasses:
DownstreamProjectGridBuilder
Encapsulates the definition of how to layout projects into a
ProjectGrid.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ProjectGridbuild(BuildPipelineView owner) Builds the grid.abstract org.kohsuke.stapler.HttpResponsedoBuild(org.kohsuke.stapler.StaplerRequest req, BuildPipelineView owner) Called to start a new pipeline instance (normally by triggering some job.)abstract 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.abstract booleanIf the first job of the grid produced by this builder has parameters
-
Constructor Details
-
ProjectGridBuilder
public ProjectGridBuilder()
-
-
Method Details
-
build
Builds the grid.- 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 Called byBuildPipelineViewwhen one of its members are renamed.- Parameters:
owner- View that this builder is operating under.oldName- Old short name of the jobnewName- New short name of the jobitem- Job being renamed.- Throws:
IOException
-
hasBuildPermission
If 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.- Parameters:
owner- View that this builder is operating under.- Returns:
- True if the user has a permission.
-
startsWithParameters
If the first job of the grid produced by this builder has parameters- Parameters:
owner- View that this builder is operating under.- Returns:
- True if the first job has parameters.
-
doBuild
public abstract org.kohsuke.stapler.HttpResponse doBuild(org.kohsuke.stapler.StaplerRequest req, @AncestorInPath BuildPipelineView owner) throws IOException Called to start a new pipeline instance (normally by triggering some job.)- Parameters:
req- Current HTTP requestowner- View that this builder is operating under.- Returns:
- The HTTP response.
- Throws:
IOException
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<ProjectGridBuilder>- Overrides:
getDescriptorin classAbstractDescribableImpl<ProjectGridBuilder>
-