Class BitbucketClientFactoryImpl
- java.lang.Object
-
- com.atlassian.bitbucket.jenkins.internal.client.BitbucketClientFactoryImpl
-
- All Implemented Interfaces:
BitbucketClientFactory
public class BitbucketClientFactoryImpl extends Object implements BitbucketClientFactory
-
-
Field Summary
Fields Modifier and Type Field Description static long
CAPABILITIES_CACHE_DURATION
Cache duration for the capabilities response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitbucketAuthenticatedUserClient
getAuthenticatedUserClient()
Return a client that can return the username for the credentials used.BitbucketCapabilitiesClient
getCapabilityClient()
Construct a client that can retrieve the advertised capabilities from Bitbucket.BitbucketMirrorClient
getMirroredRepositoriesClient(int repositoryId)
Construct a client that can retrieve the list of mirrored repositories for a givenrepoId
from Bitbucket.BitbucketProjectClient
getProjectClient(String projectKey)
Return a project client.BitbucketSearchClient
getSearchClient(String projectName)
Return a search client
-
-
-
Method Detail
-
getAuthenticatedUserClient
public BitbucketAuthenticatedUserClient 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
public BitbucketCapabilitiesClient 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
public BitbucketMirrorClient getMirroredRepositoriesClient(int repositoryId)
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
public BitbucketProjectClient getProjectClient(String projectKey)
Description copied from interface:BitbucketClientFactory
Return a project client.- Specified by:
getProjectClient
in interfaceBitbucketClientFactory
- Returns:
- a client that is ready to use
-
getSearchClient
public BitbucketSearchClient getSearchClient(String projectName)
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
-
-