Package jenkins.plugins.git.traits
Class RemoteNameSCMSourceTrait
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<T>
-
- jenkins.scm.api.trait.SCMTrait<jenkins.scm.api.trait.SCMSourceTrait>
-
- jenkins.scm.api.trait.SCMSourceTrait
-
- jenkins.plugins.git.traits.RemoteNameSCMSourceTrait
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.scm.api.trait.SCMSourceTrait>
public class RemoteNameSCMSourceTrait extends jenkins.scm.api.trait.SCMSourceTrait
Exposes the remote name used for the fetch in aAbstractGitSCMSource
as aSCMSourceTrait
. When not provided in theAbstractGitSCMSource.getTraits()
the remote name should default toAbstractGitSCMSource.DEFAULT_REMOTE_NAME
- Since:
- 3.4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RemoteNameSCMSourceTrait.DescriptorImpl
OurDescriptor
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description RemoteNameSCMSourceTrait(String remoteName)
Stapler constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
decorateBuilder(jenkins.scm.api.trait.SCMBuilder<?,?> builder)
protected void
decorateContext(jenkins.scm.api.trait.SCMSourceContext<?,?> context)
String
getRemoteName()
Gets the remote name.
-
-
-
Constructor Detail
-
RemoteNameSCMSourceTrait
@DataBoundConstructor public RemoteNameSCMSourceTrait(@CheckForNull String remoteName)
Stapler constructor.- Parameters:
remoteName
- the remote name.
-
-
Method Detail
-
getRemoteName
@NonNull public String getRemoteName()
Gets the remote name.- Returns:
- the remote name.
-
decorateContext
protected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?,?> context)
- Overrides:
decorateContext
in classjenkins.scm.api.trait.SCMSourceTrait
-
decorateBuilder
protected void decorateBuilder(jenkins.scm.api.trait.SCMBuilder<?,?> builder)
- Overrides:
decorateBuilder
in classjenkins.scm.api.trait.SCMSourceTrait
-
-