Class GitConfigurationProviderImpl
java.lang.Object
com.atlassian.bamboo.repository.git.GitConfigurationProviderImpl
- All Implemented Interfaces:
GitConfigurationProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.repository.git.GitConfigurationProvider
GitConfigurationProvider.Constants
-
Constructor Summary
ConstructorDescriptionGitConfigurationProviderImpl
(CustomVariableContext customVariableContext, CredentialsAccessor credentialsAccessor, VcsRepositoryManager vcsRepositoryManager) -
Method Summary
Modifier and TypeMethodDescription@NotNull GitCacheKey
getCacheKey
(@NotNull VcsRepositoryData vcsRepositoryData) Constructs a git cache key based on the provided VCS repository data.@NotNull GitCredentialsBag
getCredentialsBag
(@NotNull VcsRepositoryData vcsRepositoryData) Retrieves the git credentials bag from the provided VCS repository data.@NotNull String
getRepositoryUrl
(@NotNull VcsRepositoryData vcsRepositoryData) Retrieves the repository URL from the provided VCS repository data.@NotNull String
getSubstitutedRepositoryUrl
(@NotNull VcsRepositoryData vcsRepositoryData) Retrieves the repository URL from the provided VCS repository data, with variables substituted.@NotNull GitCredentialsBag
substituteCredentialsBag
(@NotNull GitCredentialsBag originalGitCredentialsBag) Substitutes the git credentials bag with variable context and returns a new immutable object.
-
Constructor Details
-
GitConfigurationProviderImpl
@Inject public GitConfigurationProviderImpl(CustomVariableContext customVariableContext, CredentialsAccessor credentialsAccessor, VcsRepositoryManager vcsRepositoryManager)
-
-
Method Details
-
getRepositoryUrl
@NotNull public @NotNull String getRepositoryUrl(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) Description copied from interface:GitConfigurationProvider
Retrieves the repository URL from the provided VCS repository data.- Specified by:
getRepositoryUrl
in interfaceGitConfigurationProvider
- Parameters:
vcsRepositoryData
- the VCS repository data- Returns:
- the repository URL
-
getSubstitutedRepositoryUrl
@NotNull public @NotNull String getSubstitutedRepositoryUrl(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) Description copied from interface:GitConfigurationProvider
Retrieves the repository URL from the provided VCS repository data, with variables substituted.- Specified by:
getSubstitutedRepositoryUrl
in interfaceGitConfigurationProvider
- Parameters:
vcsRepositoryData
- the VCS repository data- Returns:
- the substituted repository URL
-
getCredentialsBag
@NotNull public @NotNull GitCredentialsBag getCredentialsBag(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) Description copied from interface:GitConfigurationProvider
Retrieves the git credentials bag from the provided VCS repository data.- Specified by:
getCredentialsBag
in interfaceGitConfigurationProvider
- Parameters:
vcsRepositoryData
- the VCS repository data- Returns:
- the Git credentials bag
-
substituteCredentialsBag
@NotNull public @NotNull GitCredentialsBag substituteCredentialsBag(@NotNull @NotNull GitCredentialsBag originalGitCredentialsBag) Description copied from interface:GitConfigurationProvider
Substitutes the git credentials bag with variable context and returns a new immutable object. The provided credentials bag is not modified; a new object is returned.- Specified by:
substituteCredentialsBag
in interfaceGitConfigurationProvider
- Parameters:
originalGitCredentialsBag
- the credentials bag to transform- Returns:
- the substituted Git credentials bag
-
getCacheKey
@NotNull public @NotNull GitCacheKey getCacheKey(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) Description copied from interface:GitConfigurationProvider
Constructs a git cache key based on the provided VCS repository data. A git cache is an on-disk clone of a git repository.- Specified by:
getCacheKey
in interfaceGitConfigurationProvider
- Parameters:
vcsRepositoryData
- the VCS repository data- Returns:
- the git cache key
-