Class ScmContentProviderParams

java.lang.Object
io.jenkins.blueocean.rest.impl.pipeline.scm.ScmContentProviderParams

public abstract class ScmContentProviderParams extends Object
Captures parameters for ScmContentProvider from given Item
Author:
Vivek Pandey
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract String
    apiUrl(jenkins.scm.api.SCMNavigator scmNavigator)
    Gives SCM api URL attached to this ScmNavigator
    protected abstract String
    apiUrl(jenkins.scm.api.SCMSource scmSource)
    Gives SCM api URL attached to this SCMSource
     
    protected abstract com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
    Gives credential for SCM with this URL
    com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
     
     
     
    protected abstract String
    owner(jenkins.scm.api.SCMNavigator scmNavigator)
    Gives owner of SCMNavigator, typically organization
    protected abstract String
    owner(jenkins.scm.api.SCMSource scmSource)
    Gives owner of SCMSource, typically organization or project
    protected abstract String
    repo(jenkins.scm.api.SCMSource scmSource)
    Gives repo name attached to this SCMSource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ScmContentProviderParams

      public ScmContentProviderParams(Item item)
  • Method Details

    • getApiUrl

      public String getApiUrl()
    • getOwner

      public String getOwner()
    • getRepo

      public String getRepo()
    • getCredentials

      public com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials getCredentials()
    • owner

      @CheckForNull protected abstract String owner(@NonNull jenkins.scm.api.SCMSource scmSource)
      Gives owner of SCMSource, typically organization or project
      Parameters:
      scmSource - scm source
      Returns:
      null if there is no owner in this SCMSource
    • owner

      @CheckForNull protected abstract String owner(@NonNull jenkins.scm.api.SCMNavigator scmNavigator)
      Gives owner of SCMNavigator, typically organization
      Parameters:
      scmNavigator - scm navigator
      Returns:
      null if there is no owner in this SCMSource
    • repo

      @CheckForNull protected abstract String repo(@NonNull jenkins.scm.api.SCMSource scmSource)
      Gives repo name attached to this SCMSource
      Parameters:
      scmSource - scm source
      Returns:
      null if there is no repo attached to this SCMSource
    • apiUrl

      @CheckForNull protected abstract String apiUrl(@NonNull jenkins.scm.api.SCMSource scmSource)
      Gives SCM api URL attached to this SCMSource
      Parameters:
      scmSource - scm source
      Returns:
      SCM api URL
    • apiUrl

      @CheckForNull protected abstract String apiUrl(@NonNull jenkins.scm.api.SCMNavigator scmNavigator)
      Gives SCM api URL attached to this ScmNavigator
      Parameters:
      scmNavigator - scm source
      Returns:
      SCM api URL
    • getCredentialForUser

      @NonNull protected abstract com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials getCredentialForUser(@NonNull Item item, @NonNull String apiUrl)
      Gives credential for SCM with this URL
      Parameters:
      item - pipeline job item
      apiUrl - api url of scm provider
      Returns:
      credential