Class AbstractBitbucketScm
java.lang.Object
io.jenkins.blueocean.rest.model.Resource
io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
io.jenkins.blueocean.rest.impl.pipeline.scm.AbstractScm
io.jenkins.blueocean.blueocean_bitbucket_pipeline.AbstractBitbucketScm
- All Implemented Interfaces:
io.jenkins.blueocean.rest.Reachable
- Direct Known Subclasses:
BitbucketCloudScm
,BitbucketServerScm
public abstract class AbstractBitbucketScm
extends io.jenkins.blueocean.rest.impl.pipeline.scm.AbstractScm
- Author:
- Vivek Pandey
-
Field Summary
Fields inherited from class io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
CREDENTIAL_ID, ID, URI, VALIDATE, X_CREDENTIAL_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
createCredentialId
(String apiUrl) Caller must ensure apiUrl is not blank or nullstatic BitbucketApi
getApi
(String apiUrl, String scmId, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials) protected String
protected abstract String
io.jenkins.blueocean.rest.hal.Link
getLink()
io.jenkins.blueocean.rest.model.Container<io.jenkins.blueocean.rest.impl.pipeline.scm.ScmOrganization>
protected org.kohsuke.stapler.StaplerRequest
getState()
getUri()
static String
normalizeApiUrl
(String apiUrl) org.kohsuke.stapler.HttpResponse
validateAndCreate
(net.sf.json.JSONObject request) Request payload: { "userName": "joe", "password":"****", "apiUrl":"mybitbucketserver.com" }Methods inherited from class io.jenkins.blueocean.rest.impl.pipeline.scm.AbstractScm
checkPermission, createResponse, getAuthenticatedUser, getCredentialIdFromRequest, getRootOrgFolder
Methods inherited from class io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
getId, getServers
Methods inherited from class io.jenkins.blueocean.rest.model.Resource
getLinks
-
Constructor Details
-
AbstractBitbucketScm
public AbstractBitbucketScm(io.jenkins.blueocean.rest.Reachable parent)
-
-
Method Details
-
getState
- Overrides:
getState
in classio.jenkins.blueocean.rest.model.Resource
-
getLink
public io.jenkins.blueocean.rest.hal.Link getLink() -
getUri
- Specified by:
getUri
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
getCredentialId
- Specified by:
getCredentialId
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
getOrganizations
public io.jenkins.blueocean.rest.model.Container<io.jenkins.blueocean.rest.impl.pipeline.scm.ScmOrganization> getOrganizations()- Specified by:
getOrganizations
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
validateAndCreate
public org.kohsuke.stapler.HttpResponse validateAndCreate(@JsonBody net.sf.json.JSONObject request) Request payload: { "userName": "joe", "password":"****", "apiUrl":"mybitbucketserver.com" }- Specified by:
validateAndCreate
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
- Parameters:
request
- userName and password of bitbucket server- Returns:
- credential id
-
getApi
public static BitbucketApi getApi(String apiUrl, String scmId, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials) -
createCredentialId
Caller must ensure apiUrl is not blank or null- Parameters:
apiUrl
- must be normalized url usingBitbucketEndpointConfiguration.normalizeServerUrl(String)
- Returns:
- url
-
getDomainId
-
getStaplerRequest
protected org.kohsuke.stapler.StaplerRequest getStaplerRequest() -
getApiUrlParameter
-
normalizeApiUrl
-