T
- The 'self' type that represents the type of SCM
that
this descriptor describes.public abstract class SCMDescriptor<T extends SCM> extends Descriptor<SCM>
Descriptor
for SCM
.Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
Modifier and Type | Field and Description |
---|---|
Class<? extends RepositoryBrowser> |
repositoryBrowser
If this SCM has corresponding
RepositoryBrowser ,
that type. |
clazz
Modifier | Constructor and Description |
---|---|
protected |
SCMDescriptor(Class<? extends RepositoryBrowser> repositoryBrowser)
Infers the type of the corresponding
SCM from the outer class. |
protected |
SCMDescriptor(Class<T> clazz,
Class<? extends RepositoryBrowser> repositoryBrowser) |
Modifier and Type | Method and Description |
---|---|
List<Descriptor<RepositoryBrowser<?>>> |
getBrowserDescriptors()
Returns the list of
RepositoryBrowser Descriptor
that can be used with this SCM. |
int |
getGeneration()
Deprecated.
No longer used by default.
|
void |
incrementGeneration()
Deprecated.
No longer used by default.
|
boolean |
isApplicable(AbstractProject project)
Deprecated.
|
boolean |
isApplicable(Job project)
Allows
SCMDescriptor s to choose which projects it wants to be configurable against. |
boolean |
isBrowserReusable(T x,
T y)
Deprecated.
No longer used by default.
SCM.getKey() could be used to implement similar features if needed. |
void |
load()
Loads the data from the disk into this object.
|
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
public final transient Class<? extends RepositoryBrowser> repositoryBrowser
RepositoryBrowser
,
that type. Otherwise this SCM will not have any repository browser.protected SCMDescriptor(Class<T> clazz, Class<? extends RepositoryBrowser> repositoryBrowser)
protected SCMDescriptor(Class<? extends RepositoryBrowser> repositoryBrowser)
SCM
from the outer class.
This version works when you follow the common convention, where a descriptor
is written as the static nested class of the describable class.@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="2.209") public int getGeneration()
SCM
instance is created from this descriptor.
This is used to invalidate cache of SCM.getEffectiveBrowser()
. Due to the lack of synchronization and serialization,
this field doesn't really count the # of instances created to date,
but it's good enough for the cache invalidation.@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="2.209") public void incrementGeneration()
getGeneration()
by one atomically.public void load()
Descriptor
The constructor of the derived class must call this method. (If we do that in the base class, the derived class won't get a chance to set default values.)
load
in class Descriptor<SCM>
@Deprecated public boolean isBrowserReusable(T x, T y)
SCM.getKey()
could be used to implement similar features if needed.
Implementing this method allows Hudson to reuse RepositoryBrowser
configured for one project to be used for other "compatible" projects.
SCM.guessBrowser()
is more robust since it does not require another project.
RepositoryBrowser
between them.public boolean isApplicable(Job project)
SCMDescriptor
s to choose which projects it wants to be configurable against.
When this method returns false, this SCM
will not appear in the configuration screen
for the given project. The default is true for AbstractProject
but false for Job
.
@Deprecated public boolean isApplicable(AbstractProject project)
public List<Descriptor<RepositoryBrowser<?>>> getBrowserDescriptors()
RepositoryBrowser
Descriptor
that can be used with this SCM.Copyright © 2004–2022. All rights reserved.