public abstract class Project<P extends Project<P,B>,B extends Build<P,B>> extends AbstractProject<P,B> implements SCMTriggerItem, Saveable, Maven.ProjectWithMaven, BuildableItemWithBuildWrappers
AbstractProject.AbstractProjectDescriptor, AbstractProject.BecauseOfBuildInProgress, AbstractProject.BecauseOfDownstreamBuildInProgress, AbstractProject.BecauseOfUpstreamBuildInProgress, AbstractProject.LabelValidator
Job.LastItemListener
SCMTriggerItem.SCMTriggerItems
ExtensionPoint.LegacyInstancesAreScopedToHudson
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem
ABORT, blockBuildWhenDownstreamBuilding, blockBuildWhenUpstreamBuilding, BUILD_NOW_TEXT, builds, disabled, transientActions, triggers
HISTORY_ADAPTER, nextBuildNumber, properties
description, displayName, name, PRONOUN
Constructor and Description |
---|
Project(ItemGroup parent,
String name)
Creates a new project.
|
Modifier and Type | Method and Description |
---|---|
void |
addPublisher(Publisher buildStep)
Deprecated.
as of 1.290
Use
getPublishersList().add(x) |
Item |
asItem()
Should be
this . |
AbstractProject<?,?> |
asProject()
BuildableItemWithBuildWrappers needs to be an instance of
AbstractProject . |
protected void |
buildDependencyGraph(DependencyGraph graph)
Builds the dependency graph.
|
protected List<Action> |
createTransientActions() |
List<Builder> |
getBuilders() |
DescribableList<Builder,Descriptor<Builder>> |
getBuildersList() |
Map<Descriptor<BuildWrapper>,BuildWrapper> |
getBuildWrappers() |
DescribableList<BuildWrapper,Descriptor<BuildWrapper>> |
getBuildWrappersList()
BuildWrapper s associated with this AbstractProject . |
Publisher |
getPublisher(Descriptor<Publisher> descriptor) |
Map<Descriptor<Publisher>,Publisher> |
getPublishers()
Deprecated.
as of 1.463
We will be soon removing the restriction that only one instance of publisher is allowed per type.
Use
getPublishersList() instead. |
DescribableList<Publisher,Descriptor<Publisher>> |
getPublishersList()
Returns the live list of all
Publisher s configured for this project. |
protected Set<ResourceActivity> |
getResourceActivities()
Set of child resource activities of the build of this project (override in child projects).
|
Collection<? extends SCM> |
getSCMs()
Obtains all active SCMs.
|
SCMTrigger |
getSCMTrigger() |
Maven.MavenInstallation |
inferMavenInstallation()
Gets the
Maven.MavenInstallation associated with the project. |
boolean |
isFingerprintConfigured()
True if the builds of this project produces
Fingerprint records. |
void |
onLoad(ItemGroup<? extends Item> parent,
String name)
Called right after when a
Item is loaded from disk. |
void |
removePublisher(Descriptor<Publisher> descriptor)
Deprecated.
as of 1.290
Use
getPublishersList().remove(x) |
QueueTaskFuture<?> |
scheduleBuild2(int quietPeriod,
Action... actions) |
protected void |
submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Derived class can override this to perform additional config submission
work.
|
_getRuns, addProperty, addToList, addTrigger, blockBuildWhenDownstreamBuilding, blockBuildWhenUpstreamBuilding, buildDescribable, buildDescribable, checkAbortPermission, checkout, createExecutable, createHistoryWidget, disable, doBuild, doBuild, doBuildWithParameters, doBuildWithParameters, doCancelQueue, doCheckRetryCount, doConfigSubmit, doDisable, doDoWipeOutWorkspace, doEnable, doPolling, doRssChangelog, doWs, enable, findNearest, findNearest, getActions, getAssignedLabel, getAssignedLabelString, getAuthToken, getBuild, getBuildByNumber, getBuildClass, getBuildingDownstream, getBuildingUpstream, getBuildNowText, getBuildTriggerUpstreamProjects, getCauseOfBlockage, getCustomWorkspace, getDefaultAuthentication, getDelay, getDownstreamProjects, getEnvironment, getFirstBuild, getHasCustomQuietPeriod, getIconColor, getJDK, getLastBuild, getLastBuiltOn, getLazyBuildMixIn, getModuleRoot, getModuleRoots, getNearestBuild, getNearestOldBuild, getOwnerTask, getProminentActions, getPronoun, getQueueItem, getQuietPeriod, getRelationship, getRelevantLabels, getResourceList, getRootProject, getSameNodeConstraint, getScm, getScmCheckoutRetryCount, getScmCheckoutStrategy, getSomeBuildWithWorkspace, getSomeWorkspace, getSubTasks, getTransitiveDownstreamProjects, getTransitiveUpstreamProjects, getTrigger, getTriggers, getUpstreamProjects, getWhyBlocked, getWorkspace, getWorkspaceResource, hasAbortPermission, hasCustomScmCheckoutRetryCount, hasParticipant, isBuildable, isBuildBlocked, isConcurrentBuild, isConfigurable, isDisabled, isInQueue, isParameterized, loadBuild, makeDisabled, makeSearchIndex, newBuild, onCreatedFromScratch, performDelete, poll, pollSCMChanges, removeFromList, removeRun, removeTrigger, resolveForCLI, save, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild2, scheduleBuild2, scheduleBuild2, scheduleBuild2, schedulePolling, setAssignedLabel, setAssignedNode, setBlockBuildWhenDownstreamBuilding, setBlockBuildWhenUpstreamBuilding, setConcurrentBuild, setCustomWorkspace, setJDK, setQuietPeriod, setScm, setScmCheckoutStrategy, supportsMakeDisabled, triggers, updateTransientActions
assignBuildNumber, delete, doBuildStatus, doChildrenContextMenu, doDescription, doDoRename, doRssAll, doRssFailed, getACL, getAllJobs, getAllProperties, getBuildDir, getBuildDiscarder, getBuildForCLI, getBuildHealth, getBuildHealthReports, getBuilds, getBuilds, getBuildsAsMap, getBuildsByTimestamp, getBuildStatusIconClassName, getBuildStatusUrl, getBuildTimeGraph, getCharacteristicEnvVars, getDynamic, getEstimatedDuration, getEstimatedDurationCandidates, getLastBuildsOverThreshold, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLastUnstableBuild, getLastUnsuccessfulBuild, getLogRotator, getNewBuilds, getNextBuildNumber, getOverrides, getPermalinks, getProperties, getProperty, getProperty, getTimeline, getWidgets, isBuilding, isHoldOffBuildUntilSave, isKeepDependencies, isLogUpdated, isNameEditable, logRotate, onCopiedFrom, removeProperty, removeProperty, renameTo, saveNextBuildNumber, setBuildDiscarder, setLogRotator, supportsLogRotator, updateNextBuildNumber
checkPermission, delete, doConfigDotXml, doDoDelete, doReload, doSetName, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDescriptorByName, getDisplayName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFrom, getRelativeNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getUrl, hasPermission, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml
addAction, doContextMenu, getAction, getAction, getActions, getAllActions, replaceAction
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNextBuildNumber, getQuietPeriod, poll
scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild
delete, getAbsoluteUrl, getAllJobs, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch
getRootDir
getSearch
getSearchIndex, getSearchName, getSearchUrl
checkPermission, getACL, hasPermission
checkAbortPermission, getCauseOfBlockage, getDefaultAuthentication, getFullDisplayName, getName, getSubTasks, getUrl, getWhyBlocked, hasAbortPermission, isBuildBlocked, isConcurrentBuild
createExecutable, getAssignedLabel, getEstimatedDuration, getLastBuiltOn, getOwnerTask, getSameNodeConstraint
getDisplayName, getResourceList
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException
AbstractItem
Item
is loaded from disk.
This is an opportunity to do a post load processing.public AbstractProject<?,?> asProject()
BuildableItemWithBuildWrappers
BuildableItemWithBuildWrappers
needs to be an instance of
AbstractProject
.
This method must be always implemented as (AbstractProject)this
, but
defining this method emphasizes the fact that this cast must be doable.
asProject
in interface BuildableItemWithBuildWrappers
public Item asItem()
SCMTriggerItem
this
.asItem
in interface SCMTriggerItem
public QueueTaskFuture<?> scheduleBuild2(int quietPeriod, Action... actions)
scheduleBuild2
in interface SCMTriggerItem
ParameterizedJobMixIn.scheduleBuild2(int, hudson.model.Action...)
public SCMTrigger getSCMTrigger()
getSCMTrigger
in interface SCMTriggerItem
public Collection<? extends SCM> getSCMs()
SCMTriggerItem
getSCMs
in interface SCMTriggerItem
public Map<Descriptor<Publisher>,Publisher> getPublishers()
getPublishersList()
instead.public DescribableList<Builder,Descriptor<Builder>> getBuildersList()
public DescribableList<Publisher,Descriptor<Publisher>> getPublishersList()
AbstractProject
Publisher
s configured for this project.
This method couldn't be called getPublishers() because existing methods in sub-classes return different inconsistent types.
getPublishersList
in class AbstractProject<P extends Project<P,B>,B extends Build<P,B>>
public Map<Descriptor<BuildWrapper>,BuildWrapper> getBuildWrappers()
public DescribableList<BuildWrapper,Descriptor<BuildWrapper>> getBuildWrappersList()
BuildableItemWithBuildWrappers
BuildWrapper
s associated with this AbstractProject
.getBuildWrappersList
in interface BuildableItemWithBuildWrappers
protected Set<ResourceActivity> getResourceActivities()
AbstractProject
getResourceActivities
in class AbstractProject<P extends Project<P,B>,B extends Build<P,B>>
public void addPublisher(Publisher buildStep) throws IOException
getPublishersList().add(x)
IOException
public void removePublisher(Descriptor<Publisher> descriptor) throws IOException
getPublishersList().remove(x)
IOException
public Publisher getPublisher(Descriptor<Publisher> descriptor)
protected void buildDependencyGraph(DependencyGraph graph)
AbstractProject
AbstractProject.triggers()
.buildDependencyGraph
in class AbstractProject<P extends Project<P,B>,B extends Build<P,B>>
public boolean isFingerprintConfigured()
AbstractProject
Fingerprint
records.isFingerprintConfigured
in class AbstractProject<P extends Project<P,B>,B extends Build<P,B>>
public Maven.MavenInstallation inferMavenInstallation()
Maven.ProjectWithMaven
Maven.MavenInstallation
associated with the project.
Can be null.
If the Maven installation can not be uniquely determined, it's often better to return just one of them, rather than returning null, since this method is currently ultimately only used to decide where to parse conf/settings.xml from.
inferMavenInstallation
in interface Maven.ProjectWithMaven
protected void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException
Job
submit
in class AbstractProject<P extends Project<P,B>,B extends Build<P,B>>
IOException
javax.servlet.ServletException
Descriptor.FormException
Copyright © 2016. All rights reserved.