public class SingleSCMSource extends SCMSource
| Modifier and Type | Class and Description |
|---|---|
static class |
SingleSCMSource.DescriptorImpl
Our descriptor.
|
SCMSource.SourceByItemExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
SingleSCMSource(String name,
SCM scm)
Our constructor.
|
SingleSCMSource(String id,
String name,
SCM scm)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
SCM |
build(SCMHead head,
SCMRevision revision)
Builds a
SCM instance for the specified head and revision, no validation of the
head is performed, a revision for a different head or source will be treated as equivalent to a
null revision. |
String |
getName() |
SCM |
getScm() |
protected void |
retrieve(SCMSourceCriteria criteria,
SCMHeadObserver observer,
SCMHeadEvent<?> event,
TaskListener listener)
SPI: Fetches the latest heads and corresponding revisions that are originating from the supplied event.
|
String |
toString() |
afterSave, build, canProbe, checkInterrupt, createProbe, defaultListener, equals, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchActions, fetchActions, fetchActions, fetchRevisions, fromSCMFileSystem, getCategories, getCriteria, getDescriptor, getId, getOwner, getPronoun, getTraits, getTrustedRevision, hashCode, hasId, isCategoryEnabled, newProbe, parentHeads, parentRevisions, retrieve, retrieve, retrieve, retrieve, retrieve, retrieve, retrieveActions, retrieveActions, retrieveActions, retrieveRevisions, setId, setOwner, setTraits, withId@DataBoundConstructor public SingleSCMSource(String name, SCM scm)
name - the name of the branch.scm - the configuration.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="2.2.0") @Deprecated public SingleSCMSource(String id, String name, SCM scm)
SingleSCMSource(String, SCM) and SCMSource.setId(String).id - source id.name - the name of the branch.scm - the configuration.public String getName()
public SCM getScm()
protected void retrieve(@CheckForNull
SCMSourceCriteria criteria,
@NonNull
SCMHeadObserver observer,
@CheckForNull
SCMHeadEvent<?> event,
@NonNull
TaskListener listener)
throws IOException,
InterruptedException
SCMSource
It is vitally important that implementations must periodically call SCMSource.checkInterrupt()
otherwise it will be impossible for users to interrupt the operation.
The default implementation wraps the SCMHeadObserver using
SCMHeadEvent.filter(SCMSource, SCMHeadObserver) and delegates to
SCMSource.retrieve(SCMSourceCriteria, SCMHeadObserver, TaskListener)
retrieve in class SCMSourcecriteria - the criteria to use, if non-null them implementations mustfilter all
SCMHead instances against the
SCMSourceCriteria.isHead(SCMSourceCriteria.Probe, TaskListener)
before passing through to the SCMHeadObserver.observer - an observer of interim results, if the event is non-null then the observer will already
have been filtered with SCMHeadEvent.filter(SCMSource, SCMHeadObserver).event - the (optional) event from which the operation should be scoped.listener - the task listener.IOException - if an error occurs while performing the operation.InterruptedException - if any thread has interrupted the current thread.@NonNull public SCM build(@NonNull SCMHead head, @CheckForNull SCMRevision revision)
SCM instance for the specified head and revision, no validation of the
head is performed, a revision for a different head or source will be treated as equivalent to a
null revision.Copyright © 2016–2019. All rights reserved.