Package jenkins.scm.impl
Class SingleSCMSource
java.lang.Object
hudson.model.AbstractDescribableImpl<SCMSource>
jenkins.scm.api.SCMSource
jenkins.scm.impl.SingleSCMSource
- All Implemented Interfaces:
 ExtensionPoint,Describable<SCMSource>
A single fixed branch using a legacy SCM implementation.
- 
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class jenkins.scm.api.SCMSource
SCMSource.SourceByItemNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson - 
Field Summary
 - 
Constructor Summary
ConstructorsConstructorDescriptionSingleSCMSource(String name, SCM scm) Our constructor.SingleSCMSource(String id, String name, SCM scm) Deprecated. - 
Method Summary
Modifier and TypeMethodDescriptionbuild(SCMHead head, SCMRevision revision) Builds aSCMinstance 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 anullrevision.getName()getScm()protected voidretrieve(SCMSourceCriteria criteria, SCMHeadObserver observer, SCMHeadEvent<?> event, TaskListener listener) SPI: Fetches the latest heads and corresponding revisions that are originating from the supplied event.toString()Methods inherited from class jenkins.scm.api.SCMSource
afterSave, build, canProbe, checkInterrupt, createProbe, defaultListener, equals, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchActions, fetchActions, fetchActions, fetchRevisions, fetchRevisions, fromSCMFileSystem, getCategories, getCriteria, getDescriptor, getId, getOwner, getPronoun, getTraits, getTrustedRevision, hashCode, hasId, isCategoryEnabled, newProbe, parentHeads, parentRevisions, retrieve, retrieve, retrieve, retrieve, retrieve, retrieve, retrieve, retrieveActions, retrieveActions, retrieveActions, retrieveRevisions, retrieveRevisions, setId, setOwner, setTraits, withId 
- 
Constructor Details
- 
SingleSCMSource
Our constructor.- Parameters:
 name- the name of the branch.scm- the configuration.- Since:
 - 2.2.0
 
 - 
SingleSCMSource
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince("2.2.0") @Deprecated public SingleSCMSource(String id, String name, SCM scm) Deprecated.Legacy constructor.- Parameters:
 id- source id.name- the name of the branch.scm- the configuration.
 
 - 
 - 
Method Details
- 
getName
 - 
getScm
 - 
retrieve
protected void retrieve(@CheckForNull SCMSourceCriteria criteria, @NonNull SCMHeadObserver observer, @CheckForNull SCMHeadEvent<?> event, @NonNull TaskListener listener) throws IOException, InterruptedException Description copied from class:SCMSourceSPI: Fetches the latest heads and corresponding revisions that are originating from the supplied event. If the supplied event is one that the implementer trusts, then the implementer may be able to optimize retrieval to minimize round trips. Implementers are free to cache intermediary results but the call must always check the validity of any intermediary caches.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
SCMHeadObserverusingSCMHeadEvent.filter(SCMSource, SCMHeadObserver)and delegates toSCMSource.retrieve(SCMSourceCriteria, SCMHeadObserver, TaskListener)- Specified by:
 retrievein classSCMSource- Parameters:
 criteria- the criteria to use, if non-nullthem implementations mustfilter allSCMHeadinstances against theSCMSourceCriteria.isHead(SCMSourceCriteria.Probe, TaskListener)before passing through to theSCMHeadObserver.observer- an observer of interim results, if the event is non-nullthen the observer will already have been filtered withSCMHeadEvent.filter(SCMSource, SCMHeadObserver).event- the (optional) event from which the operation should be scoped.listener- the task listener.- Throws:
 IOException- if an error occurs while performing the operation.InterruptedException- if any thread has interrupted the current thread.
 - 
build
Builds aSCMinstance 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 anullrevision. - 
toString
 
 - 
 
SingleSCMSource(String, SCM)andSCMSource.setId(String).