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
ConstructorsConstructorDescriptionGitConfigurationProviderImpl(CustomVariableContext customVariableContext, CredentialsAccessor credentialsAccessor, VcsRepositoryManager vcsRepositoryManager) -
Method Summary
Modifier and TypeMethodDescription@NotNull GitCacheKeygetCacheKey(@NotNull VcsRepositoryData vcsRepositoryData) Constructs a git cache key based on the provided VCS repository data.@NotNull GitCredentialsBaggetCredentialsBag(@NotNull VcsRepositoryData vcsRepositoryData) Retrieves the git credentials bag from the provided VCS repository data.@NotNull StringgetRepositoryUrl(@NotNull VcsRepositoryData vcsRepositoryData) Retrieves the repository URL from the provided VCS repository data.@NotNull GitCredentialsBaggetSubstitutedCredentialsBag(@NotNull VcsRepositoryData vcsRepositoryData) Retrieves the substituted Git credentials bag from the provided VCS repository data.@NotNull StringgetSubstitutedRepositoryUrl(@NotNull VcsRepositoryData vcsRepositoryData) Retrieves the repository URL from the provided VCS repository data, with variables substituted.@NotNull GitCredentialsBagsubstituteCredentialsBag(@NotNull GitCredentialsBag originalGitCredentialsBag) Substitutes the git credentials bag with variable context and returns a new immutable object.booleanusesRemoteAgentCache(@NotNull VcsRepositoryData vcsRepositoryData) Determines if the repository uses a remote agent cache based on the provided VCS repository data.
-
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:GitConfigurationProviderRetrieves the repository URL from the provided VCS repository data.- Specified by:
getRepositoryUrlin 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:GitConfigurationProviderRetrieves the repository URL from the provided VCS repository data, with variables substituted.- Specified by:
getSubstitutedRepositoryUrlin interfaceGitConfigurationProvider- Parameters:
vcsRepositoryData- the VCS repository data- Returns:
- the substituted repository URL
-
usesRemoteAgentCache
Description copied from interface:GitConfigurationProviderDetermines if the repository uses a remote agent cache based on the provided VCS repository data.- Specified by:
usesRemoteAgentCachein interfaceGitConfigurationProvider- Parameters:
vcsRepositoryData- the VCS repository data- Returns:
- true if the repository uses a remote agent cache, false otherwise
-
getCredentialsBag
@NotNull public @NotNull GitCredentialsBag getCredentialsBag(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) Description copied from interface:GitConfigurationProviderRetrieves the git credentials bag from the provided VCS repository data.- Specified by:
getCredentialsBagin 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:GitConfigurationProviderSubstitutes 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:
substituteCredentialsBagin interfaceGitConfigurationProvider- Parameters:
originalGitCredentialsBag- the credentials bag to transform- Returns:
- the substituted Git credentials bag
-
getSubstitutedCredentialsBag
@NotNull public @NotNull GitCredentialsBag getSubstitutedCredentialsBag(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) Description copied from interface:GitConfigurationProviderRetrieves the substituted Git credentials bag from the provided VCS repository data. The credentials bag is substituted with variable context and a new immutable object is returned.- Specified by:
getSubstitutedCredentialsBagin interfaceGitConfigurationProvider- Parameters:
vcsRepositoryData- the VCS repository data- Returns:
- the substituted Git credentials bag
-
getCacheKey
@NotNull public @NotNull GitCacheKey getCacheKey(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) Description copied from interface:GitConfigurationProviderConstructs 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:
getCacheKeyin interfaceGitConfigurationProvider- Parameters:
vcsRepositoryData- the VCS repository data- Returns:
- the git cache key
-