Class ScmContentProviderParams
- java.lang.Object
-
- io.jenkins.blueocean.rest.impl.pipeline.scm.ScmContentProviderParams
-
public abstract class ScmContentProviderParams extends Object
Captures parameters forScmContentProvider
from givenItem
- Author:
- Vivek Pandey
- See Also:
ScmContentProvider
-
-
Constructor Summary
Constructors Constructor Description ScmContentProviderParams(Item item)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
apiUrl(jenkins.scm.api.SCMNavigator scmNavigator)
Gives SCM api URL attached to this ScmNavigatorprotected abstract String
apiUrl(jenkins.scm.api.SCMSource scmSource)
Gives SCM api URL attached to this SCMSourceString
getApiUrl()
protected abstract com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
getCredentialForUser(Item item, String apiUrl)
Gives credential for SCM with this URLcom.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
getCredentials()
String
getOwner()
String
getRepo()
protected abstract String
owner(jenkins.scm.api.SCMNavigator scmNavigator)
Gives owner ofSCMNavigator
, typically organizationprotected abstract String
owner(jenkins.scm.api.SCMSource scmSource)
Gives owner ofSCMSource
, typically organization or projectprotected abstract String
repo(jenkins.scm.api.SCMSource scmSource)
Gives repo name attached to thisSCMSource
-
-
-
Constructor Detail
-
ScmContentProviderParams
public ScmContentProviderParams(Item item)
-
-
Method Detail
-
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 ofSCMSource
, 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 ofSCMNavigator
, 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 thisSCMSource
- 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 itemapiUrl
- api url of scm provider- Returns:
- credential
-
-