Class BitbucketServerStateProvider
java.lang.Object
com.atlassian.bamboo.plugins.stash.BitbucketServerStateProvider
Provides Bitbucket instance state.
- Since:
- 9.5
-
Constructor Summary
ConstructorDescriptionBitbucketServerStateProvider
(com.atlassian.stash.rest.client.applinks.ApplinkStashClientFactory stashClientFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull StashRestResponse
doStatusRestCallViaApplink
(@NotNull com.atlassian.applinks.api.ApplicationLink applicationLink) getStateError
(@NotNull VcsRepositoryData repositoryData) Gets the Bitbucket instance state error message if any.
-
Constructor Details
-
BitbucketServerStateProvider
@Inject public BitbucketServerStateProvider(com.atlassian.stash.rest.client.applinks.ApplinkStashClientFactory stashClientFactory)
-
-
Method Details
-
getStateError
@NotNull public @NotNull Optional<String> getStateError(@NotNull @NotNull VcsRepositoryData repositoryData) Gets the Bitbucket instance state error message if any. If nothing is returned, the instance is operational and in a RUNNING state.- Parameters:
repositoryData
- repository data to check- Returns:
- error message if the one exists, empty otherwise
-
doStatusRestCallViaApplink
@VisibleForTesting @NotNull protected @NotNull StashRestResponse doStatusRestCallViaApplink(@NotNull @NotNull com.atlassian.applinks.api.ApplicationLink applicationLink) throws CredentialsRequiredContextException
-