|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.Descriptor<SCM>
hudson.scm.SCMDescriptor<T>
T
- The 'self' type that represents the type of SCM
that
this descriptor describes.public abstract class SCMDescriptor<T extends SCM>
Descriptor
for SCM
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class hudson.model.Descriptor |
---|
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self |
Field Summary | |
---|---|
int |
generation
Incremented every time a new SCM instance is created from this descriptor. |
Class<? extends RepositoryBrowser> |
repositoryBrowser
If this SCM has corresponding RepositoryBrowser ,
that type. |
Fields inherited from class hudson.model.Descriptor |
---|
clazz |
Fields inherited from interface hudson.model.Saveable |
---|
NOOP |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
List<Descriptor<RepositoryBrowser<?>>> |
getBrowserDescriptors()
Returns the list of RepositoryBrowser Descriptor
that can be used with this SCM. |
boolean |
isApplicable(AbstractProject project)
Allows SCMDescriptor s to choose which projects it wants to be configurable against. |
boolean |
isBrowserReusable(T x,
T y)
Optional method used by the automatic SCM browser inference. |
void |
load()
Loads the data from the disk into this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final transient Class<? extends RepositoryBrowser> repositoryBrowser
RepositoryBrowser
,
that type. Otherwise this SCM will not have any repository browser.
public volatile int generation
SCM
instance is created from this descriptor.
This is used to invalidate cache. 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.
Constructor Detail |
---|
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.
Method Detail |
---|
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>
public boolean isBrowserReusable(T x, T y)
Implementing this method allows Hudson to reuse RepositoryBrowser
configured for one project to be used for other "compatible" projects.
RepositoryBrowser
between them.public boolean isApplicable(AbstractProject 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 method always return true.
public List<Descriptor<RepositoryBrowser<?>>> getBrowserDescriptors()
RepositoryBrowser
Descriptor
that can be used with this SCM.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |