au.com.centrumsystems.hudson.plugin.buildpipeline
Class BuildPipelineView

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.View
          extended by hudson.model.AllView
              extended by au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.model.View>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled

public class BuildPipelineView
extends hudson.model.AllView

This view displays the set of jobs that are related based on their upstream\downstream relationships as a pipeline. Each build pipeline becomes a row on the view.

Author:
Centrum Systems

Nested Class Summary
static class BuildPipelineView.DescriptorImpl
          This descriptor class is required to configure the View Page
 
Nested classes/interfaces inherited from class hudson.model.View
hudson.model.View.People, hudson.model.View.UserInfo
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.View
CONFIGURE, CREATE, DELETE, description, filterExecutors, filterQueue, LIST, name, owner, PERMISSIONS, SORTER, transientActions
 
Constructor Summary
BuildPipelineView(java.lang.String name, java.lang.String buildViewTitle, java.lang.String selectedJob, java.lang.String noOfDisplayedBuilds)
           
 
Method Summary
 void doManualExecution(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Invoke this method when the URL(/manualExecution/) is called
 java.lang.String getBuildResultURL(hudson.model.AbstractBuild<?,?> build)
          Build a URL of a particular build
 java.util.List<java.util.List> getBuildsHistory()
          Gets the collection of pipelines (rows in the view).
 java.lang.String getBuildViewTitle()
           
 HudsonResult getHudsonResult(hudson.model.AbstractBuild<?,?> build)
          Get the hudson result
 hudson.model.Job<?,?> getJob()
          get the selected job
 hudson.model.AbstractBuild<?,?> getLastBuildOfAPipeline()
           
 hudson.model.AbstractProject<?,?> getNextProject(hudson.model.AbstractBuild<?,?> currentBuild)
          Get the downstream project.
 java.lang.String getNoOfDisplayedBuilds()
           
 java.util.List<hudson.model.AbstractProject<?,?>> getProjectPipeline()
          Get Project Pipeline
 java.lang.String getSelectedJob()
           
 java.lang.String getSVNRefvisionNo(java.util.List<hudson.model.AbstractBuild<?,?>> builds)
          Get the SVN revision no of a particular build
 boolean isNextBuildRequire()
          Check whether the next Build is required in a build pipeline
 void setBuildViewTitle(java.lang.String buildViewTitle)
           
 void setLastBuildOfAPipeline(hudson.model.AbstractBuild<?,?> lastBuildOfAPipeline)
           
 void setNoOfDisplayedBuilds(java.lang.String noOfDisplayedBuilds)
           
 void setSelectedJob(java.lang.String selectedJob)
           
protected  void submit(org.kohsuke.stapler.StaplerRequest req)
          Handles the configuration submission
 
Methods inherited from class hudson.model.AllView
contains, doCreateItem, doSubmitDescription, getDescription, getItems, getPostConstructLandingPage, isEditable, onJobRenamed
 
Methods inherited from class hudson.model.View
all, checkPermission, create, doConfigSubmit, doDoDelete, doRssAll, doRssFailed, doRssLatest, getAbsoluteUrl, getACL, getActions, getApi, getBuilds, getComputers, getDescriptor, getDisplayName, getDynamic, getItem, getItemCreatePermission, getJob, getOwner, getPeople, getQueueItems, getSearchUrl, getTimeline, getUrl, getViewName, getViewUrl, getWidgets, hasPeople, hasPermission, isDefault, isFilterExecutors, isFilterQueue, makeSearchIndex, rename
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildPipelineView

@DataBoundConstructor
public BuildPipelineView(java.lang.String name,
                                              java.lang.String buildViewTitle,
                                              java.lang.String selectedJob,
                                              java.lang.String noOfDisplayedBuilds)
Parameters:
name - the name of the pipeline build view.
buildViewTitle - the build view title.
selectedJob - the first job in the build pipeline.
noOfDisplayedBuilds - a count of the number of builds displayed on the view
Method Detail

submit

protected void submit(org.kohsuke.stapler.StaplerRequest req)
               throws java.io.IOException,
                      javax.servlet.ServletException,
                      hudson.model.Descriptor.FormException
Handles the configuration submission

Overrides:
submit in class hudson.model.AllView
Parameters:
req - Stapler Request
Throws:
hudson.model.Descriptor.FormException - Form Exception
java.io.IOException - IO Exception
javax.servlet.ServletException - Servlet Exception

getJob

public hudson.model.Job<?,?> getJob()
get the selected job

Returns:
JOB

getProjectPipeline

public java.util.List<hudson.model.AbstractProject<?,?>> getProjectPipeline()
Get Project Pipeline

Returns:
list of project name

isNextBuildRequire

public boolean isNextBuildRequire()
Check whether the next Build is required in a build pipeline

Returns:
True : if the next build is require

getNextProject

public hudson.model.AbstractProject<?,?> getNextProject(hudson.model.AbstractBuild<?,?> currentBuild)
Get the downstream project. This assume that we only have one downstream project

Parameters:
currentBuild - current build
Returns:
abstract project

getSVNRefvisionNo

public java.lang.String getSVNRefvisionNo(java.util.List<hudson.model.AbstractBuild<?,?>> builds)
Get the SVN revision no of a particular build

Parameters:
builds - build
Returns:
the revision number

getBuildsHistory

public java.util.List<java.util.List> getBuildsHistory()
Gets the collection of pipelines (rows in the view). The number returned is dependant on the number configured to be displayed on that view.

Returns:
List of build pipe lines

getHudsonResult

public HudsonResult getHudsonResult(hudson.model.AbstractBuild<?,?> build)
Get the hudson result

Parameters:
build - build
Returns:
HudsonResult HudsonResult

getBuildResultURL

public java.lang.String getBuildResultURL(hudson.model.AbstractBuild<?,?> build)
Build a URL of a particular build

Parameters:
build - the build
Returns:
URL of the build

doManualExecution

public void doManualExecution(org.kohsuke.stapler.StaplerRequest req,
                              org.kohsuke.stapler.StaplerResponse rsp)
Invoke this method when the URL(/manualExecution/) is called

Parameters:
req - Stapler Request
rsp - Stapler Response

getLastBuildOfAPipeline

public hudson.model.AbstractBuild<?,?> getLastBuildOfAPipeline()

setLastBuildOfAPipeline

public void setLastBuildOfAPipeline(hudson.model.AbstractBuild<?,?> lastBuildOfAPipeline)

getBuildViewTitle

public java.lang.String getBuildViewTitle()

setBuildViewTitle

public void setBuildViewTitle(java.lang.String buildViewTitle)

getNoOfDisplayedBuilds

public java.lang.String getNoOfDisplayedBuilds()

setNoOfDisplayedBuilds

public void setNoOfDisplayedBuilds(java.lang.String noOfDisplayedBuilds)

getSelectedJob

public java.lang.String getSelectedJob()

setSelectedJob

public void setSelectedJob(java.lang.String selectedJob)


Copyright © 2004-2011. All Rights Reserved.