P
- the project typeR
- the run typepublic abstract class MultiBranchProject<P extends hudson.model.Job<P,R> & hudson.model.TopLevelItem,R extends hudson.model.Run<P,R>>
extends com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<P>
implements jenkins.scm.api.SCMSourceOwner, org.jenkins.ui.icon.IconSpec
Modifier and Type | Class and Description |
---|---|
static class |
MultiBranchProject.BranchIndexing<P extends hudson.model.Job<P,R> & hudson.model.TopLevelItem,R extends hudson.model.Run<P,R>>
Represents the branch indexing job.
|
static class |
MultiBranchProject.SCMEventListenerImpl
Our event listener.
|
static class |
MultiBranchProject.StateActionFactory
Adds the
MultiBranchProject.State.sourceActions to Actionable.getAllActions() . |
com.cloudbees.hudson.plugins.folder.AbstractFolder.ItemListenerImpl, com.cloudbees.hudson.plugins.folder.AbstractFolder.RunListenerImpl
Modifier | Constructor and Description |
---|---|
protected |
MultiBranchProject(hudson.model.ItemGroup parent,
String name)
Constructor, mandated by
TopLevelItem . |
Modifier and Type | Method and Description |
---|---|
protected void |
computeChildren(com.cloudbees.hudson.plugins.folder.computed.ChildObserver<P> observer,
hudson.model.TaskListener listener) |
protected com.cloudbees.hudson.plugins.folder.computed.FolderComputation<P> |
createComputation(com.cloudbees.hudson.plugins.folder.computed.FolderComputation<P> previous) |
hudson.security.ACL |
getACL() |
P |
getBranch(String name)
Deprecated.
use
getItem(String) or AbstractFolder.getJob(String) directly |
BranchPropertyStrategy |
getBranchPropertyStrategy(jenkins.scm.api.SCMSource source)
Returns the
BranchPropertyStrategy for a specific SCMSource . |
File |
getComputationDir()
Returns the directory that branch indexing is stored in.
|
String |
getDescription() |
MultiBranchProjectDescriptor |
getDescriptor() |
String |
getDisplayName() |
String |
getIconClassName() |
MultiBranchProject.BranchIndexing<P,R> |
getIndexing()
Returns the current/most recent indexing details.
|
P |
getItem(String name)
Returns the named child job or
null if no such job exists. |
File |
getJobsDir()
Returns the directory that all branches are stored in.
|
Class<P> |
getProjectClass()
Returns the base class of the projects that are managed by this
MultiBranchProject . |
BranchProjectFactory<P,R> |
getProjectFactory()
Returns the
BranchProjectFactory . |
String |
getPronoun() |
File |
getRootDirFor(P child) |
jenkins.scm.api.SCMSource |
getSCMSource(String sourceId) |
jenkins.scm.api.SCMSourceCriteria |
getSCMSourceCriteria(jenkins.scm.api.SCMSource source) |
List<jenkins.scm.api.SCMSource> |
getSCMSources() |
List<BranchSource> |
getSources()
The sources of branches.
|
hudson.util.PersistedList<BranchSource> |
getSourcesList()
Offers direct access to the configurable list of branch sources.
|
hudson.model.View |
getView(String name) |
protected hudson.model.View |
getWelcomeView()
Creates a place-holder view when there's no active branch indexed.
|
boolean |
isBuildable() |
boolean |
isHasEvents() |
protected com.cloudbees.hudson.plugins.folder.FolderIcon |
newDefaultFolderIcon() |
protected com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder |
newFolderViewHolder() |
protected abstract BranchProjectFactory<P,R> |
newProjectFactory()
Creates a new instance of the default project factory to be used for a new instance of the project type.
|
void |
onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent,
String name) |
void |
onSCMSourceUpdated(jenkins.scm.api.SCMSource source) |
protected Collection<P> |
orphanedItems(Collection<P> orphaned,
hudson.model.TaskListener listener) |
static String |
rawDecode(String s)
Inverse function of
Util.rawEncode(String) |
void |
setProjectFactory(BranchProjectFactory<P,R> projectFactory)
Sets the
BranchProjectFactory . |
protected void |
submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
addTrigger, checkAbortPermission, createEventsChildObserver, createExecutable, doBuild, doConfigSubmit, getActions, getAssignedLabel, getCauseOfBlockage, getComputation, getDefaultAuthentication, getDefaultAuthentication, getEstimatedDuration, getLastBuiltOn, getOrphanedItemStrategy, getOrphanedItemStrategyDescriptors, getOwnerTask, getResourceList, getSameNodeConstraint, getSubTasks, getSuccessfulDestination, getTriggers, getWhyBlocked, hasAbortPermission, init, isBuildBlocked, isConcurrentBuild, recalculateAfterSubmitted, renameBlocker, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild2, setOrphanedItemStrategy
addAction, addOrReplaceAction, addProperty, addView, canDelete, delete, deleteView, doChildrenContextMenu, doCreateView, doDoRename, doLastBuild, doSubmitDescription, doViewExistsCheck, getAllJobs, getBuildHealth, getBuildHealthReports, getFolderViews, getHealthMetrics, getIcon, getIconColor, getItemGroup, getItems, getJob, getOverrides, getPrimaryView, getProperties, getRootDirFor, getStaplerFallback, getUrlChildPrefix, getViewActions, getViews, getViewsTabBar, initViews, invalidateBuildHealthReports, loadJobTotal, makeSearchIndex, newDefaultViewsTabBar, onDeleted, onRenamed, onViewRenamed, removeAction, removeActions, renameTo, replaceAction, replaceActions, resetFolderViews, save, setIcon, setPrimaryView
checkPermission, delete, doConfigDotXml, doDoDelete, doReload, doSetName, getAbsoluteUrl, getApi, getConfigFile, getDescriptorByName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFrom, getRelativeNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getUrl, hasPermission, movedTo, onCopiedFrom, onCreatedFromScratch, performDelete, resolveForCLI, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml
doContextMenu, getAction, getAction, getActions, getAllActions, getDynamic
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
delete, getAbsoluteUrl, getAllJobs, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch, save
protected MultiBranchProject(hudson.model.ItemGroup parent, String name)
TopLevelItem
.parent
- the parent of this multibranch job.name
- the name of the multibranch job.public void onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent, String name) throws IOException
onLoad
in interface hudson.model.Item
onLoad
in class com.cloudbees.hudson.plugins.folder.AbstractFolder<P extends hudson.model.Job<P,R> & hudson.model.TopLevelItem>
IOException
protected com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder newFolderViewHolder()
protected com.cloudbees.hudson.plugins.folder.FolderIcon newDefaultFolderIcon()
public String getIconClassName()
getIconClassName
in interface org.jenkins.ui.icon.IconSpec
public String getPronoun()
@NonNull public BranchProjectFactory<P,R> getProjectFactory()
BranchProjectFactory
. ˜BranchProjectFactory
.public final Class<P> getProjectClass()
MultiBranchProject
.MultiBranchProject
.public void setProjectFactory(BranchProjectFactory<P,R> projectFactory)
BranchProjectFactory
.projectFactory
- the new BranchProjectFactory
.@NonNull protected abstract BranchProjectFactory<P,R> newProjectFactory()
BranchProjectFactory
.@NonNull public List<BranchSource> getSources()
@NonNull public hudson.util.PersistedList<BranchSource> getSourcesList()
@NonNull public List<jenkins.scm.api.SCMSource> getSCMSources()
getSCMSources
in interface jenkins.scm.api.SCMSourceOwner
@CheckForNull public jenkins.scm.api.SCMSource getSCMSource(@CheckForNull String sourceId)
getSCMSource
in interface jenkins.scm.api.SCMSourceOwner
@CheckForNull public BranchPropertyStrategy getBranchPropertyStrategy(@NonNull jenkins.scm.api.SCMSource source)
BranchPropertyStrategy
for a specific SCMSource
.source
- the specific SCMSource
.BranchPropertyStrategy
to use.@CheckForNull public jenkins.scm.api.SCMSourceCriteria getSCMSourceCriteria(@NonNull jenkins.scm.api.SCMSource source)
getSCMSourceCriteria
in interface jenkins.scm.api.SCMSourceOwner
public void onSCMSourceUpdated(@NonNull jenkins.scm.api.SCMSource source)
onSCMSourceUpdated
in interface jenkins.scm.api.SCMSourceOwner
public boolean isHasEvents()
protected void computeChildren(com.cloudbees.hudson.plugins.folder.computed.ChildObserver<P> observer, hudson.model.TaskListener listener) throws IOException, InterruptedException
computeChildren
in class com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<P extends hudson.model.Job<P,R> & hudson.model.TopLevelItem>
IOException
InterruptedException
protected Collection<P> orphanedItems(Collection<P> orphaned, hudson.model.TaskListener listener) throws IOException, InterruptedException
orphanedItems
in class com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<P extends hudson.model.Job<P,R> & hudson.model.TopLevelItem>
IOException
InterruptedException
@CheckForNull public P getItem(String name)
null
if no such job exists.getItem
in interface hudson.model.ItemGroup<P extends hudson.model.Job<P,R> & hudson.model.TopLevelItem>
getItem
in class com.cloudbees.hudson.plugins.folder.AbstractFolder<P extends hudson.model.Job<P,R> & hudson.model.TopLevelItem>
name
- the name of the child job.null
if no such job exists.@Deprecated @CheckForNull public P getBranch(String name)
getItem(String)
or AbstractFolder.getJob(String)
directlynull
if no such branch exists.name
- the name of the branchnull
if no such branch exists.public hudson.security.ACL getACL()
getACL
in interface hudson.security.AccessControlled
getACL
in class hudson.model.AbstractItem
public String getDescription()
getDescription
in class hudson.model.AbstractItem
public String getDisplayName()
getDisplayName
in interface hudson.model.Item
getDisplayName
in interface hudson.model.ModelObject
getDisplayName
in interface hudson.model.ResourceActivity
getDisplayName
in class hudson.model.AbstractItem
@NonNull public File getJobsDir()
@NonNull public File getComputationDir()
@NonNull public MultiBranchProjectDescriptor getDescriptor()
getDescriptor
in interface hudson.model.Describable<hudson.model.TopLevelItem>
getDescriptor
in interface hudson.model.TopLevelItem
getDescriptor
in class com.cloudbees.hudson.plugins.folder.AbstractFolder<P extends hudson.model.Job<P,R> & hudson.model.TopLevelItem>
public MultiBranchProject.BranchIndexing<P,R> getIndexing()
protected void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, hudson.model.Descriptor.FormException
submit
in class com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<P extends hudson.model.Job<P,R> & hudson.model.TopLevelItem>
IOException
javax.servlet.ServletException
hudson.model.Descriptor.FormException
protected hudson.model.View getWelcomeView()
public hudson.model.View getView(String name)
public boolean isBuildable()
protected com.cloudbees.hudson.plugins.folder.computed.FolderComputation<P> createComputation(com.cloudbees.hudson.plugins.folder.computed.FolderComputation<P> previous)
Copyright © 2016–2017. All rights reserved.