public abstract class MultiBranchProjectDescriptor
extends com.cloudbees.hudson.plugins.folder.AbstractFolderDescriptor
The Descriptor
for MultiBranchProject
s.
Compatible SCM
s displayed by SingleSCMSource
(via their
SCMDescriptor
) can be defined by overriding TopLevelItemDescriptor.isApplicable(Descriptor)
:
@Override public boolean isApplicable(Descriptor descriptor) { if (descriptor instanceof SCMDescriptor) { SCMDescriptor d = (SCMDescriptor) descriptor; // Your logic } return super.isApplicable(descriptor); }
Modifier | Constructor and Description |
---|---|
protected |
MultiBranchProjectDescriptor()
Fully inferring constructor to use when the descriptor is an inner class of the
MultiBranchProject
and type parameter inference works because it just should work. |
protected |
MultiBranchProjectDescriptor(Class<? extends MultiBranchProject<?,?>> clazz)
Semi explicit constructor to use when the descriptor is not an inner class of the
MultiBranchProject . |
protected |
MultiBranchProjectDescriptor(Class<? extends MultiBranchProject<?,?>> clazz,
Class<? extends hudson.model.Job> projectClass)
Explicit constructor to use when type inference fails.
|
Modifier and Type | Method and Description |
---|---|
hudson.model.Descriptor<BranchSource> |
getBranchSourceDescriptor()
Returns the
BranchSource.DescriptorImpl . |
Class<? extends MultiBranchProject> |
getClazz()
We have to extend
TopLevelItemDescriptor but we want to be able to access Descriptor.clazz as a
MultiBranchProject based type. |
List<com.cloudbees.hudson.plugins.folder.FolderIconDescriptor> |
getIconDescriptors() |
Class<? extends hudson.model.Job> |
getProjectClass()
Returns the base class of the projects that are produced by this factory.
|
List<BranchProjectFactoryDescriptor> |
getProjectFactoryDescriptors()
Returns the
BranchProjectFactoryDescriptor s. |
List<jenkins.scm.api.SCMSourceDescriptor> |
getSCMSourceDescriptors(boolean onlyUserInstantiable)
Gets the
SCMSourceDescriptor s. |
boolean |
isIconConfigurable() |
getCategoryId, getDescription, getDisplayName, getHealthMetricDescriptors, getIconClassName, getIconFilePathPattern, getPropertyDescriptors, isLookAndFeelConfigurable, isTabBarConfigurable
all, checkApplicableIn, isApplicable, isApplicableIn, newInstance, newInstance, newInstance, testInstance
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
protected MultiBranchProjectDescriptor(Class<? extends MultiBranchProject<?,?>> clazz, Class<? extends hudson.model.Job> projectClass)
clazz
- the MultiBranchProject
that this descriptor is for.projectClass
- the Job
type that the MultiBranchProject
creates.protected MultiBranchProjectDescriptor(Class<? extends MultiBranchProject<?,?>> clazz)
MultiBranchProject
.clazz
- the MultiBranchProject
that this descriptor is for.protected MultiBranchProjectDescriptor()
MultiBranchProject
and type parameter inference works because it just should work.@NonNull public Class<? extends hudson.model.Job> getProjectClass()
@NonNull public Class<? extends MultiBranchProject> getClazz()
TopLevelItemDescriptor
but we want to be able to access Descriptor.clazz
as a
MultiBranchProject
based type.Descriptor.clazz
@NonNull public List<jenkins.scm.api.SCMSourceDescriptor> getSCMSourceDescriptors(boolean onlyUserInstantiable)
SCMSourceDescriptor
s.onlyUserInstantiable
- true
retains only those SCMSource
types that
are instantiable by the user.SCMSourceDescriptor
s.@NonNull public List<BranchProjectFactoryDescriptor> getProjectFactoryDescriptors()
BranchProjectFactoryDescriptor
s.BranchProjectFactoryDescriptor
s.@NonNull public hudson.model.Descriptor<BranchSource> getBranchSourceDescriptor()
BranchSource.DescriptorImpl
.BranchSource.DescriptorImpl
.public List<com.cloudbees.hudson.plugins.folder.FolderIconDescriptor> getIconDescriptors()
getIconDescriptors
in class com.cloudbees.hudson.plugins.folder.AbstractFolderDescriptor
public boolean isIconConfigurable()
isIconConfigurable
in class com.cloudbees.hudson.plugins.folder.AbstractFolderDescriptor
Copyright © 2016–2017. All rights reserved.