public abstract static class SCMFileSystem.Builder extends Object implements ExtensionPoint
SCMFileSystem classes for the same SCM
or SCMSource and let Jenkins pick the most capable for any specific SCM implementation.ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
abstract SCMFileSystem |
build(Item owner,
SCM scm,
SCMRevision rev)
Given a
SCM this should try to build a corresponding SCMFileSystem instance that
reflects the content at the specified SCMRevision. |
SCMFileSystem |
build(SCMSource source,
SCMHead head,
SCMRevision rev)
Given a
SCMSource, a SCMHead and a SCMRevision this method should try to build a
corresponding SCMFileSystem instance that reflects the content of the specified SCMHead at
the specified SCMRevision. |
abstract boolean |
supports(SCM source)
Checks if this
SCMFileSystem.Builder supports the supplied SCM. |
boolean |
supports(SCMDescriptor<?> descriptor)
Checks if this
SCMFileSystem.Builder supports the supplied SCMDescriptor. |
abstract boolean |
supports(SCMSource source)
Checks if this
SCMFileSystem.Builder supports the supplied SCMSource. |
boolean |
supports(SCMSourceDescriptor descriptor)
Checks if this
SCMFileSystem.Builder supports the supplied SCMSourceDescriptor. |
protected abstract boolean |
supportsDescriptor(SCMDescriptor descriptor)
Checks if this
SCMFileSystem.Builder supports the supplied SCMDescriptor. |
protected abstract boolean |
supportsDescriptor(SCMSourceDescriptor descriptor)
Checks if this
SCMFileSystem.Builder supports the supplied SCMSourceDescriptor. |
public abstract boolean supports(SCM source)
SCMFileSystem.Builder supports the supplied SCM.source - the SCM.true if and only if the supplied SCM is supported by this SCMFileSystem.Builder,
false if build(Item, SCM, SCMRevision) will always return null.public abstract boolean supports(SCMSource source)
SCMFileSystem.Builder supports the supplied SCMSource.source - the SCMSource.true if and only if the supplied SCMSource is supported by this SCMFileSystem.Builder,
false if build(SCMSource, SCMHead, SCMRevision) will always return
null.public final boolean supports(SCMDescriptor<?> descriptor)
SCMFileSystem.Builder supports the supplied SCMDescriptor.descriptor - the SCMDescriptorsupportsDescriptor(SCMDescriptor) if implemented, otherwise, it
will return true if one of the following is true: the SCM for the descriptor is the enclosing
class of this builder class, the builder and SCM are in the same package, or the builder is in
a child package of the SCM.protected abstract boolean supportsDescriptor(SCMDescriptor descriptor)
SCMFileSystem.Builder supports the supplied SCMDescriptor.descriptor - the SCMDescriptortrue if and only if the supplied SCMSourceDescriptor's SCMDescriptor class is
supported by this SCMFileSystem.Builder.public final boolean supports(SCMSourceDescriptor descriptor)
SCMFileSystem.Builder supports the supplied SCMSourceDescriptor.descriptor - the SCMSourceDescriptorsupportsDescriptor(SCMSourceDescriptor) if implemented, otherwise, it
will return true if one of the following is true: the SCMSource for the descriptor is the enclosing
class of this builder class, the builder and SCMSource are in the same package, or the builder is in
a child package of the SCMSource.protected abstract boolean supportsDescriptor(SCMSourceDescriptor descriptor)
SCMFileSystem.Builder supports the supplied SCMSourceDescriptor.descriptor - the SCMSourceDescriptortrue if and only if the supplied SCMSourceDescriptor's SCMSource class is
supported by this SCMFileSystem.Builder, false if build(SCMSource, SCMHead, SCMRevision) will
always return null, and false by default for compatibility.@CheckForNull public abstract SCMFileSystem build(@NonNull Item owner, @NonNull SCM scm, @CheckForNull SCMRevision rev) throws IOException, InterruptedException
SCM this should try to build a corresponding SCMFileSystem instance that
reflects the content at the specified SCMRevision. If the SCM is supported but not
for a fixed revision, best effort is acceptable as the most capable SCMFileSystem will be returned
to the caller.owner - the owner of the SCMscm - the SCM.rev - the specified SCMRevision.SCMFileSystem or null if this builder cannot create a SCMFileSystem for the specified SCM.IOException - if the attempt to create a SCMFileSystem failed due to an IO error
(such as the remote system being unavailable)InterruptedException - if the attempt to create a SCMFileSystem was interrupted.@CheckForNull public SCMFileSystem build(@NonNull SCMSource source, @NonNull SCMHead head, @CheckForNull SCMRevision rev) throws IOException, InterruptedException
SCMSource, a SCMHead and a SCMRevision this method should try to build a
corresponding SCMFileSystem instance that reflects the content of the specified SCMHead at
the specified SCMRevision. If the SCMSource is supported but not for a fixed revision,
best effort is acceptable as the most capable SCMFileSystem will be returned
to the caller.source - the SCMSource.head - the specified SCMHead.rev - the specified SCMRevision.SCMFileSystem or null if there is none.IOException - if the attempt to create a SCMFileSystem failed due to an IO error
(such as the remote system being unavailable)InterruptedException - if the attempt to create a SCMFileSystem was interrupted.Copyright © 2016–2019. All rights reserved.