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
-
-
Constructor Summary
Constructors Constructor Description AbstractBitbucketScm(io.jenkins.blueocean.rest.Reachable parent)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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
getApiUrlParameter()
String
getCredentialId()
protected abstract String
getDomainId()
io.jenkins.blueocean.rest.hal.Link
getLink()
io.jenkins.blueocean.rest.model.Container<io.jenkins.blueocean.rest.impl.pipeline.scm.ScmOrganization>
getOrganizations()
protected org.kohsuke.stapler.StaplerRequest
getStaplerRequest()
Object
getState()
String
getUri()
static String
normalizeApiUrl(String apiUrl)
org.kohsuke.stapler.HttpResponse
validateAndCreate(net.sf.json.JSONObject request)
Request payload: { "userName": "joe", "password":"****", "apiUrl":"mybitbucketserver.com" }
-
-
-
Method Detail
-
getState
public Object getState()
- Overrides:
getState
in classio.jenkins.blueocean.rest.model.Resource
-
getLink
public io.jenkins.blueocean.rest.hal.Link getLink()
-
getUri
@NonNull public String getUri()
- Specified by:
getUri
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
getCredentialId
public String 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
@NonNull protected abstract String createCredentialId(@NonNull String apiUrl)
Caller must ensure apiUrl is not blank or null- Parameters:
apiUrl
- must be normalized url usingBitbucketEndpointConfiguration.normalizeServerUrl(String)
- Returns:
- url
-
getDomainId
@NonNull protected abstract String getDomainId()
-
getStaplerRequest
protected org.kohsuke.stapler.StaplerRequest getStaplerRequest()
-
getApiUrlParameter
@NonNull protected String getApiUrlParameter()
-
-