Class ScmContentProviderParams
java.lang.Object
io.jenkins.blueocean.rest.impl.pipeline.scm.ScmContentProviderParams
Captures parameters for
ScmContentProvider
from given Item
- Author:
- Vivek Pandey
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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 SCMSourceprotected abstract com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
getCredentialForUser
(Item item, String apiUrl) Gives credential for SCM with this URLcom.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
getOwner()
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 Details
-
ScmContentProviderParams
-
-
Method Details
-
getApiUrl
-
getOwner
-
getRepo
-
getCredentials
public com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials getCredentials() -
owner
Gives owner ofSCMSource
, typically organization or project- Parameters:
scmSource
- scm source- Returns:
- null if there is no owner in this SCMSource
-
repo
Gives repo name attached to thisSCMSource
- Parameters:
scmSource
- scm source- Returns:
- null if there is no repo attached to this SCMSource
-
apiUrl
Gives SCM api URL attached to this SCMSource- Parameters:
scmSource
- 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
-