Package jenkins.scm.api
Class SCMFileSystem.Builder
java.lang.Object
jenkins.scm.api.SCMFileSystem.Builder
- All Implemented Interfaces:
- ExtensionPoint
- Enclosing class:
- SCMFileSystem
Extension point that allows different plugins to implement 
SCMFileSystem classes for the same SCM
 or SCMSource and let Jenkins pick the most capable for any specific SCM implementation.- 
Nested Class SummaryNested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild(Item owner, SCM scm, SCMRevision rev) Given aSCMthis should try to build a correspondingSCMFileSysteminstance that reflects the content at the specifiedSCMRevision.build(Item owner, SCM scm, SCMRevision rev, Run<?, ?> _build) Given aSCMthis should try to build a correspondingSCMFileSysteminstance that reflects the content at the specifiedSCMRevision.build(SCMSource source, SCMHead head, SCMRevision rev) Given aSCMSource, aSCMHeadand aSCMRevisionthis method should try to build a correspondingSCMFileSysteminstance that reflects the content of the specifiedSCMHeadat the specifiedSCMRevision.abstract booleanChecks if thisSCMFileSystem.Buildersupports the suppliedSCM.final booleansupports(SCMDescriptor<?> descriptor) Checks if thisSCMFileSystem.Buildersupports the suppliedSCMDescriptor.abstract booleanChecks if thisSCMFileSystem.Buildersupports the suppliedSCMSource.final booleansupports(SCMSourceDescriptor descriptor) Checks if thisSCMFileSystem.Buildersupports the suppliedSCMSourceDescriptor.protected abstract booleansupportsDescriptor(SCMDescriptor descriptor) Checks if thisSCMFileSystem.Buildersupports the suppliedSCMDescriptor.protected abstract booleansupportsDescriptor(SCMSourceDescriptor descriptor) Checks if thisSCMFileSystem.Buildersupports the suppliedSCMSourceDescriptor.
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
supportsChecks if thisSCMFileSystem.Buildersupports the suppliedSCM.- Parameters:
- source- the- SCM.
- Returns:
- trueif and only if the supplied- SCMis supported by this- SCMFileSystem.Builder,- falseif- build(Item, SCM, SCMRevision)will always return- null.
 
- 
supportsChecks if thisSCMFileSystem.Buildersupports the suppliedSCMSource.- Parameters:
- source- the- SCMSource.
- Returns:
- trueif and only if the supplied- SCMSourceis supported by this- SCMFileSystem.Builder,- falseif- build(SCMSource, SCMHead, SCMRevision)will always return- null.
 
- 
supportsChecks if thisSCMFileSystem.Buildersupports the suppliedSCMDescriptor.- Parameters:
- descriptor- the- SCMDescriptor
- Returns:
- the return value of supportsDescriptor(SCMDescriptor)if implemented, otherwise, it will return true if one of the following is true: theSCMfor the descriptor is the enclosing class of this builder class, the builder andSCMare in the same package, or the builder is in a child package of theSCM.
- Since:
- 2.3.0
 
- 
supportsDescriptorChecks if thisSCMFileSystem.Buildersupports the suppliedSCMDescriptor.- Parameters:
- descriptor- the- SCMDescriptor
- Returns:
- trueif and only if the supplied- SCMSourceDescriptor's- SCMDescriptorclass is supported by this- SCMFileSystem.Builder.
- Since:
- 2.3.0
 
- 
supportsChecks if thisSCMFileSystem.Buildersupports the suppliedSCMSourceDescriptor.- Parameters:
- descriptor- the- SCMSourceDescriptor
- Returns:
- the return value of supportsDescriptor(SCMSourceDescriptor)if implemented, otherwise, it will return true if one of the following is true: theSCMSourcefor the descriptor is the enclosing class of this builder class, the builder andSCMSourceare in the same package, or the builder is in a child package of theSCMSource.
- Since:
- 2.3.0
 
- 
supportsDescriptorChecks if thisSCMFileSystem.Buildersupports the suppliedSCMSourceDescriptor.- Parameters:
- descriptor- the- SCMSourceDescriptor
- Returns:
- trueif and only if the supplied- SCMSourceDescriptor's- SCMSourceclass is supported by this- SCMFileSystem.Builder,- falseif- build(SCMSource, SCMHead, SCMRevision)will always return- null, and- falseby default for compatibility.
- Since:
- 2.3.0
 
- 
build@CheckForNull public SCMFileSystem build(@NonNull Item owner, @NonNull SCM scm, @CheckForNull SCMRevision rev) throws IOException, InterruptedException Given aSCMthis should try to build a correspondingSCMFileSysteminstance that reflects the content at the specifiedSCMRevision. If theSCMis supported but not for a fixed revision, best effort is acceptable as the most capableSCMFileSystemwill be returned to the caller.- Parameters:
- owner- the owner of the- SCM
- scm- the- SCM.
- rev- the specified- SCMRevision.
- Returns:
- the corresponding SCMFileSystemornullif this builder cannot create aSCMFileSystemfor the specifiedSCM.
- Throws:
- IOException- if the attempt to create a- SCMFileSystemfailed due to an IO error (such as the remote system being unavailable)
- InterruptedException- if the attempt to create a- SCMFileSystemwas interrupted.
 
- 
build@CheckForNull public SCMFileSystem build(@NonNull SCMSource source, @NonNull SCMHead head, @CheckForNull SCMRevision rev) throws IOException, InterruptedException Given aSCMSource, aSCMHeadand aSCMRevisionthis method should try to build a correspondingSCMFileSysteminstance that reflects the content of the specifiedSCMHeadat the specifiedSCMRevision. If theSCMSourceis supported but not for a fixed revision, best effort is acceptable as the most capableSCMFileSystemwill be returned to the caller.- Parameters:
- source- the- SCMSource.
- head- the specified- SCMHead.
- rev- the specified- SCMRevision.
- Returns:
- the corresponding SCMFileSystemornullif there is none.
- Throws:
- IOException- if the attempt to create a- SCMFileSystemfailed due to an IO error (such as the remote system being unavailable)
- InterruptedException- if the attempt to create a- SCMFileSystemwas interrupted.
 
- 
build@CheckForNull public SCMFileSystem build(@NonNull Item owner, @NonNull SCM scm, @CheckForNull SCMRevision rev, @CheckForNull Run<?, ?> _build) throws IOException, InterruptedExceptionGiven aSCMthis should try to build a correspondingSCMFileSysteminstance that reflects the content at the specifiedSCMRevision. If theSCMis supported but not for a fixed revision, best effort is acceptable as the most capableSCMFileSystemwill be returned to the caller. If theRunis provided, it can be used to alter the behavior. For example, variables in the branch name can be expanded based on current build properties, etc.- Parameters:
- owner- the owner of the- SCM
- scm- the- SCM.
- rev- the specified- SCMRevision.
- _build- the specified- Run.
- Returns:
- the corresponding SCMFileSystemornullif this builder cannot create aSCMFileSystemfor the specifiedSCM.
- Throws:
- IOException- if the attempt to create a- SCMFileSystemfailed due to an IO error (such as the remote system being unavailable)
- InterruptedException- if the attempt to create a- SCMFileSystemwas interrupted.
 
 
-