Class BitbucketClientFactoryImpl
java.lang.Object
com.atlassian.bitbucket.jenkins.internal.client.BitbucketClientFactoryImpl
- All Implemented Interfaces:
BitbucketClientFactory
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Cache duration for the capabilities response. -
Method Summary
Modifier and TypeMethodDescriptionReturn a client that can return the username for the credentials used.Construct a client that can retrieve the advertised capabilities from Bitbucket.getMirroredRepositoriesClient
(int repositoryId) Construct a client that can retrieve the list of mirrored repositories for a givenrepoId
from Bitbucket.getProjectClient
(String projectKey) Return a project client.getSearchClient
(String projectName) Return a search client
-
Field Details
-
CAPABILITIES_CACHE_DURATION
public static final long CAPABILITIES_CACHE_DURATIONCache duration for the capabilities response. Defaults to 1 hour in ms.
-
-
Method Details
-
getAuthenticatedUserClient
Description copied from interface:BitbucketClientFactory
Return a client that can return the username for the credentials used.- Specified by:
getAuthenticatedUserClient
in interfaceBitbucketClientFactory
- Returns:
- a client that is ready to use
-
getCapabilityClient
Description copied from interface:BitbucketClientFactory
Construct a client that can retrieve the advertised capabilities from Bitbucket. The client is thread safe and can be used multiple times.- Specified by:
getCapabilityClient
in interfaceBitbucketClientFactory
- Returns:
- a client that is ready to use
-
getMirroredRepositoriesClient
Description copied from interface:BitbucketClientFactory
Construct a client that can retrieve the list of mirrored repositories for a givenrepoId
from Bitbucket.- Specified by:
getMirroredRepositoriesClient
in interfaceBitbucketClientFactory
- Parameters:
repositoryId
- the repositoryId- Returns:
- a client that is ready to use
-
getProjectClient
Description copied from interface:BitbucketClientFactory
Return a project client.- Specified by:
getProjectClient
in interfaceBitbucketClientFactory
- Returns:
- a client that is ready to use
-
getSearchClient
Description copied from interface:BitbucketClientFactory
Return a search client- Specified by:
getSearchClient
in interfaceBitbucketClientFactory
- Parameters:
projectName
- the project name to search for- Returns:
- a client that is ready to use
-