public class BuildPipelineView
extends hudson.model.View
Modifier and Type | Class and Description |
---|---|
static class |
BuildPipelineView.DescriptorImpl
This descriptor class is required to configure the View Page
|
Constructor and Description |
---|
BuildPipelineView(String name,
String buildViewTitle,
ProjectGridBuilder gridBuilder,
String noOfDisplayedBuilds,
boolean triggerOnlyLatestJob,
boolean alwaysAllowManualTrigger,
boolean showPipelineParameters,
boolean showPipelineParametersInHeaders,
boolean showPipelineDefinitionHeader,
int refreshFrequency,
String cssUrl,
String selectedJob) |
BuildPipelineView(String name,
String buildViewTitle,
ProjectGridBuilder gridBuilder,
String noOfDisplayedBuilds,
boolean triggerOnlyLatestJob,
String cssUrl) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(hudson.model.TopLevelItem item) |
hudson.model.Item |
doCreateItem(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
String |
getAlwaysAllowManualTrigger() |
BuildPipelineForm |
getBuildPipelineForm()
Returns BuildPipelineForm containing the build pipeline to display.
|
String |
getBuildViewTitle() |
String |
getConsoleOutputLinkStyle() |
String |
getCssUrl() |
List<hudson.model.AbstractProject<?,?>> |
getDownstreamProjects(hudson.model.AbstractProject<?,?> currentProject)
Get a List of downstream projects.
|
ProjectGridBuilder |
getGridBuilder() |
Collection<hudson.model.TopLevelItem> |
getItems() |
String |
getNoOfDisplayedBuilds() |
String |
getProjectURL(hudson.model.AbstractProject<?,?> project)
Retrieves the project URL
|
int |
getRefreshFrequency() |
int |
getRefreshFrequencyInMillis() |
String |
getShowPipelineDefinitionHeader() |
String |
getShowPipelineParameters() |
String |
getShowPipelineParametersInHeaders() |
String |
getTriggerOnlyLatestJob() |
boolean |
hasBuildPermission()
Checks whether the user has a permission to start a new instance of the pipeline.
|
boolean |
hasConfigurePermission()
Checks whether the user has Configure permission for the current project.
|
boolean |
hasDownstreamProjects(hudson.model.AbstractProject<?,?> currentProject)
Determines if the current project has any downstream projects
|
boolean |
hasPermission(hudson.security.Permission p) |
boolean |
isAlwaysAllowManualTrigger() |
boolean |
isNewWindowConsoleOutputLinkStyle() |
boolean |
isProjectParameterized()
Checks if this build starts with parameters
|
boolean |
isShowPipelineDefinitionHeader() |
boolean |
isShowPipelineParameters() |
boolean |
isShowPipelineParametersInHeaders() |
boolean |
isThisWindowConsoleOutputLinkStyle() |
boolean |
isTriggerOnlyLatestJob() |
void |
onJobRenamed(hudson.model.Item item,
String oldName,
String newName)
If a project name is changed we check if the selected job for this view also needs to be changed.
|
protected Object |
readResolve() |
int |
rerunBuild(String externalizableId)
Re-run a project, passing in the CauseActions from the previous completed
Run so
that the new run will appear in the same pipeline. |
void |
setAlwaysAllowManualTrigger(boolean alwaysAllowManualTrigger) |
void |
setBuildViewTitle(String buildViewTitle) |
void |
setConsoleOutputLinkStyle(String consoleOutputLinkStyle) |
void |
setCssUrl(String cssUrl) |
void |
setGridBuilder(ProjectGridBuilder gridBuilder) |
void |
setNoOfDisplayedBuilds(String noOfDisplayedBuilds) |
void |
setRefreshFrequency(int refreshFrequency) |
void |
setShowPipelineDefinitionHeader(boolean showPipelineDefinitionHeader) |
void |
setShowPipelineParameters(boolean showPipelineParameters) |
void |
setShowPipelineParametersInHeaders(boolean showPipelineParametersInHeaders) |
void |
setTriggerOnlyLatestJob(boolean triggerOnlyLatestJob) |
protected void |
submit(org.kohsuke.stapler.StaplerRequest req)
Handles the configuration submission
|
int |
triggerManualBuild(Integer upstreamBuildNumber,
String triggerProjectName,
String upstreamProjectName)
Trigger a manual build
|
all, allInstantiable, checkPermission, create, createViewFromXML, doChildrenContextMenu, doConfigDotXml, doConfigSubmit, doDoDelete, doRssAll, doRssFailed, doRssLatest, doSubmitDescription, getAbsoluteUrl, getACL, getActions, getAllItems, getAllProperties, getApi, getApplicablePropertyDescriptors, getApproximateQueueItemsQuickly, getAsynchPeople, getBuilds, getColumns, getComputers, getDescription, getDescriptor, getDisplayName, getDynamic, getIndenter, getItem, getItemCreatePermission, getJob, getNewPronoun, getOwner, getOwnerItemGroup, getOwnerPrimaryView, getOwnerViewActions, getPeople, getPostConstructLandingPage, getProperties, getQueueItems, getSearchUrl, getTimeline, getUrl, getViewName, getViewUrl, getWidgets, hasPeople, isAutomaticRefreshEnabled, isDefault, isEditable, isFilterExecutors, isFilterQueue, makeSearchIndex, rename, save, toString, updateByXml, updateTransientActions, writeXml
public BuildPipelineView(String name, String buildViewTitle, ProjectGridBuilder gridBuilder, String noOfDisplayedBuilds, boolean triggerOnlyLatestJob, String cssUrl)
name
- the name of the pipeline build view.buildViewTitle
- the build view title.gridBuilder
- controls the data to be displayed.noOfDisplayedBuilds
- a count of the number of builds displayed on the viewtriggerOnlyLatestJob
- Indicates whether only the latest job will be triggered.cssUrl
- URL for the custom CSS file.@DataBoundConstructor public BuildPipelineView(String name, String buildViewTitle, ProjectGridBuilder gridBuilder, String noOfDisplayedBuilds, boolean triggerOnlyLatestJob, boolean alwaysAllowManualTrigger, boolean showPipelineParameters, boolean showPipelineParametersInHeaders, boolean showPipelineDefinitionHeader, int refreshFrequency, String cssUrl, String selectedJob)
name
- the name of the pipeline build view.buildViewTitle
- the build view title.gridBuilder
- controls the data to be displayed.noOfDisplayedBuilds
- a count of the number of builds displayed on the viewtriggerOnlyLatestJob
- Indicates whether only the latest job will be triggered.alwaysAllowManualTrigger
- Indicates whether manual trigger will always be available.showPipelineParameters
- Indicates whether pipeline parameter values should be shown.showPipelineParametersInHeaders
- Indicates whether the pipeline headers should show the
pipeline parameter values for the last successful instance.showPipelineDefinitionHeader
- Indicates whether the pipeline headers should be shown.refreshFrequency
- Frequency at which the build pipeline plugin refreshes build cardscssUrl
- URL for the custom CSS file.selectedJob
- the first job name in the pipeline. it can be set to null when gridBuilder is passed.protected Object readResolve()
protected void submit(org.kohsuke.stapler.StaplerRequest req) throws IOException, javax.servlet.ServletException, hudson.model.Descriptor.FormException
submit
in class hudson.model.View
req
- Stapler Requesthudson.model.Descriptor.FormException
- Form ExceptionIOException
- IO Exceptionjavax.servlet.ServletException
- Servlet Exceptionpublic boolean hasBuildPermission()
Item
public boolean isProjectParameterized()
public boolean hasConfigurePermission()
public ProjectGridBuilder getGridBuilder()
public void setGridBuilder(ProjectGridBuilder gridBuilder)
public List<hudson.model.AbstractProject<?,?>> getDownstreamProjects(hudson.model.AbstractProject<?,?> currentProject)
currentProject
- - The project from which we want the downstream projectspublic boolean hasDownstreamProjects(hudson.model.AbstractProject<?,?> currentProject)
currentProject
- - The project from which we are testing.public BuildPipelineForm getBuildPipelineForm()
public String getProjectURL(hudson.model.AbstractProject<?,?> project) throws URISyntaxException
project
- - The projectURISyntaxException
URISyntaxException
- URISyntaxException
@JavaScriptMethod public int triggerManualBuild(Integer upstreamBuildNumber, String triggerProjectName, String upstreamProjectName)
upstreamBuildNumber
- upstream build numbertriggerProjectName
- project that is triggeredupstreamProjectName
- upstream project@JavaScriptMethod public int rerunBuild(String externalizableId)
Run
so
that the new run will appear in the same pipeline.externalizableId
- the externalizableId of the Run. See Run.getExternalizableId()
public String getBuildViewTitle()
public void setBuildViewTitle(String buildViewTitle)
public String getCssUrl()
public void setCssUrl(String cssUrl)
public String getNoOfDisplayedBuilds()
public void setNoOfDisplayedBuilds(String noOfDisplayedBuilds)
public String getConsoleOutputLinkStyle()
public void setConsoleOutputLinkStyle(String consoleOutputLinkStyle)
public boolean isNewWindowConsoleOutputLinkStyle()
public boolean isThisWindowConsoleOutputLinkStyle()
public boolean isTriggerOnlyLatestJob()
public String getTriggerOnlyLatestJob()
public void setTriggerOnlyLatestJob(boolean triggerOnlyLatestJob)
public boolean isAlwaysAllowManualTrigger()
public String getAlwaysAllowManualTrigger()
public void setAlwaysAllowManualTrigger(boolean alwaysAllowManualTrigger)
public boolean isShowPipelineParameters()
public String getShowPipelineParameters()
public void setShowPipelineParameters(boolean showPipelineParameters)
public boolean isShowPipelineParametersInHeaders()
public String getShowPipelineParametersInHeaders()
public void setShowPipelineParametersInHeaders(boolean showPipelineParametersInHeaders)
public int getRefreshFrequency()
public void setRefreshFrequency(int refreshFrequency)
public int getRefreshFrequencyInMillis()
public boolean isShowPipelineDefinitionHeader()
public String getShowPipelineDefinitionHeader()
public void setShowPipelineDefinitionHeader(boolean showPipelineDefinitionHeader)
public Collection<hudson.model.TopLevelItem> getItems()
getItems
in class hudson.model.View
public boolean contains(hudson.model.TopLevelItem item)
contains
in class hudson.model.View
public void onJobRenamed(hudson.model.Item item, String oldName, String newName)
onJobRenamed
in class hudson.model.View
item
- - The Item that has been renamedoldName
- - The old name of the ItemnewName
- - The new name of the Itempublic hudson.model.Item doCreateItem(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
doCreateItem
in class hudson.model.View
IOException
javax.servlet.ServletException
public boolean hasPermission(hudson.security.Permission p)
hasPermission
in interface hudson.security.AccessControlled
hasPermission
in class hudson.model.View
Copyright © 2004–2016. All rights reserved.