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 a AbstractGitSCMSource as a SCMSourceTrait. When not provided in the AbstractGitSCMSource.getTraits() the remote name should default to AbstractGitSCMSource.DEFAULT_REMOTE_NAME
Since:
3.4.0
  • Constructor Details

    • RemoteNameSCMSourceTrait

      @DataBoundConstructor public RemoteNameSCMSourceTrait(@CheckForNull String remoteName)
      Stapler constructor.
      Parameters:
      remoteName - the remote name.
  • Method Details

    • 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 class jenkins.scm.api.trait.SCMSourceTrait
    • decorateBuilder

      protected void decorateBuilder(jenkins.scm.api.trait.SCMBuilder<?,?> builder)
      Overrides:
      decorateBuilder in class jenkins.scm.api.trait.SCMSourceTrait