Class BitbucketCloudEndpoint
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<AbstractBitbucketEndpoint>
-
- com.cloudbees.jenkins.plugins.bitbucket.endpoints.AbstractBitbucketEndpoint
-
- com.cloudbees.jenkins.plugins.bitbucket.endpoints.BitbucketCloudEndpoint
-
- All Implemented Interfaces:
Describable<AbstractBitbucketEndpoint>
public class BitbucketCloudEndpoint extends AbstractBitbucketEndpoint
Represents Bitbucket Cloud.- Since:
- 2.2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BitbucketCloudEndpoint.DescriptorImpl
Our descriptor.
-
Field Summary
Fields Modifier and Type Field Description static String
BAD_SERVER_URL
A bad URL of Bitbucket Cloud.static String
SERVER_URL
The URL of Bitbucket Cloud.
-
Constructor Summary
Constructors Constructor Description BitbucketCloudEndpoint(boolean enableCache, int teamCacheDuration, int repositoriesCacheDuration, boolean manageHooks, String credentialsId)
Constructor.BitbucketCloudEndpoint(boolean manageHooks, String credentialsId)
BitbucketCloudEndpoint(boolean manageHooks, String credentialsId, String endPointURL)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplayName()
Optional name to use to describe the end-point.int
getRepositoriesCacheDuration()
String
getRepositoryUrl(String repoOwner, String repository)
The user facing URL of the specified repository.String
getServerUrl()
The URL of this endpoint.int
getTeamCacheDuration()
boolean
isEnableCache()
-
Methods inherited from class com.cloudbees.jenkins.plugins.bitbucket.endpoints.AbstractBitbucketEndpoint
authenticator, credentials, getBitbucketJenkinsRootUrl, getCredentialsId, getDescriptor, getEndpointJenkinsRootUrl, getEndpointJenkinsRootUrl, isManageHooks, setBitbucketJenkinsRootUrl
-
-
-
-
Field Detail
-
SERVER_URL
public static final String SERVER_URL
The URL of Bitbucket Cloud.- See Also:
- Constant Field Values
-
BAD_SERVER_URL
public static final String BAD_SERVER_URL
A bad URL of Bitbucket Cloud.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BitbucketCloudEndpoint
public BitbucketCloudEndpoint(boolean manageHooks, @CheckForNull String credentialsId)
-
BitbucketCloudEndpoint
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public BitbucketCloudEndpoint(boolean manageHooks, @CheckForNull String credentialsId, String endPointURL)
-
BitbucketCloudEndpoint
@DataBoundConstructor public BitbucketCloudEndpoint(boolean enableCache, int teamCacheDuration, int repositoriesCacheDuration, boolean manageHooks, @CheckForNull String credentialsId)
Constructor.- Parameters:
enableCache
-true
if caching should be used to reduce requests to Bitbucket.teamCacheDuration
- How long, in minutes, to cache the team response.repositoriesCacheDuration
- How long, in minutes, to cache the repositories response.manageHooks
-true
if and only if Jenkins is supposed to auto-manage hooks for this end-point.credentialsId
- TheIdCredentials.getId()
of the credentials to use for auto-management of hooks.
-
-
Method Detail
-
isEnableCache
public boolean isEnableCache()
-
getTeamCacheDuration
public int getTeamCacheDuration()
-
getRepositoriesCacheDuration
public int getRepositoriesCacheDuration()
-
getDisplayName
public String getDisplayName()
Optional name to use to describe the end-point.- Specified by:
getDisplayName
in classAbstractBitbucketEndpoint
- Returns:
- the name to use for the end-point
-
getServerUrl
@NonNull public String getServerUrl()
The URL of this endpoint.- Specified by:
getServerUrl
in classAbstractBitbucketEndpoint
- Returns:
- the URL of the endpoint.
-
getRepositoryUrl
@NonNull public String getRepositoryUrl(@NonNull String repoOwner, @NonNull String repository)
The user facing URL of the specified repository.- Specified by:
getRepositoryUrl
in classAbstractBitbucketEndpoint
- Parameters:
repoOwner
- the repository owner.repository
- the repository.- Returns:
- the user facing URL of the specified repository.
-
-