Class GitConfigurationExporter

  • All Implemented Interfaces:
    VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>

    public class GitConfigurationExporter
    extends Object
    implements VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
    • Constructor Detail

      • GitConfigurationExporter

        public GitConfigurationExporter()
    • Method Detail

      • getEntityPropertiesBuilder

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.git.GitRepository getEntityPropertiesBuilder​(@NotNull
                                                                                                                    @NotNull VcsRepositoryData vcsRepositoryData)
        Description copied from interface: VcsRepositoryDataExporter
        Create empty instance of a properties builder appropriate for the exported repository data.
        Specified by:
        getEntityPropertiesBuilder in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
        Returns:
        instance of a builder
      • appendLocationData

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.git.GitRepository appendLocationData​(@NotNull
                                                                                                            @NotNull com.atlassian.bamboo.specs.builders.repository.git.GitRepository builder,
                                                                                                            @NotNull
                                                                                                            @NotNull VcsLocationDefinition vcsLocationDefinition,
                                                                                                            @NotNull
                                                                                                            @NotNull VcsRepositoryContext repositoryContext)
        Description copied from interface: VcsRepositoryDataExporter
        Fill in the builder passed as the first argument with vcs server data.
        Specified by:
        appendLocationData in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
      • appendBranchData

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.git.GitRepository appendBranchData​(@NotNull
                                                                                                          @NotNull com.atlassian.bamboo.specs.builders.repository.git.GitRepository builder,
                                                                                                          @NotNull
                                                                                                          @NotNull VcsBranchDefinition vcsBranchDefinition)
        Description copied from interface: VcsRepositoryDataExporter
        Fill in the builder passed as the first argument with vcs branch data. Return the first argument if not applicable.
        Specified by:
        appendBranchData in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
      • appendChangeDetectionOptions

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.git.GitRepository appendChangeDetectionOptions​(@NotNull
                                                                                                                      @NotNull com.atlassian.bamboo.specs.builders.repository.git.GitRepository builder,
                                                                                                                      @NotNull
                                                                                                                      @NotNull VcsChangeDetectionOptions changeDetectionOptions)
        Description copied from interface: VcsRepositoryDataExporter
        Fill in the builder passed as the first argument with change detection configuration. Return the first argument if not applicable.
        Specified by:
        appendChangeDetectionOptions in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
      • appendBranchDetectionOptions

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.git.GitRepository appendBranchDetectionOptions​(@NotNull
                                                                                                                      @NotNull com.atlassian.bamboo.specs.builders.repository.git.GitRepository builder,
                                                                                                                      @NotNull
                                                                                                                      @NotNull VcsBranchDetectionOptions branchDetectionOptions)
        Description copied from interface: VcsRepositoryDataExporter
        Fill in the builder passed as the first argument with branch detection configuration. Return the first argument if not applicable.
        Specified by:
        appendBranchDetectionOptions in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
      • importLocationData

        @Nullable
        public @Nullable Map<String,​String> importLocationData​(@NotNull
                                                                     @NotNull com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties repositoryProperties,
                                                                     @Nullable
                                                                     @Nullable VcsLocationDefinition existingData,
                                                                     @NotNull
                                                                     @NotNull VcsRepositoryContext repositoryContext)
        Description copied from interface: VcsRepositoryDataExporter
        Extract vcs location configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.
        Specified by:
        importLocationData in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
        Returns:
      • toYaml

        @Nullable
        public @Nullable Node toYaml​(@NotNull
                                     @NotNull com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties repo)
        Specified by:
        toYaml in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
      • fromYaml

        @Nullable
        public @Nullable com.atlassian.bamboo.specs.builders.repository.git.GitRepository fromYaml​(@NotNull
                                                                                                   @NotNull String name,
                                                                                                   @NotNull
                                                                                                   @NotNull Node node,
                                                                                                   @NotNull
                                                                                                   @NotNull TaskValidationContext validationContext)
        Specified by:
        fromYaml in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
      • importBranchData

        @Nullable
        public @Nullable Map<String,​String> importBranchData​(@NotNull
                                                                   @NotNull com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties repositoryProperties,
                                                                   @Nullable
                                                                   @Nullable VcsBranchDefinition existingData)
        Description copied from interface: VcsRepositoryDataExporter
        Extract branch configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.
        Specified by:
        importBranchData in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
        Returns:
      • importChangeDetectionOptions

        @Nullable
        public @Nullable Map<String,​String> importChangeDetectionOptions​(@NotNull
                                                                               @NotNull com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties repositoryProperties,
                                                                               @Nullable
                                                                               @Nullable VcsChangeDetectionOptions existingData)
        Description copied from interface: VcsRepositoryDataExporter
        Extract change detection configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.
        Specified by:
        importChangeDetectionOptions in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
        Returns:
      • importBranchDetectionOptions

        @Nullable
        public @Nullable Map<String,​String> importBranchDetectionOptions​(@NotNull
                                                                               @NotNull com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties repositoryProperties,
                                                                               @Nullable
                                                                               @Nullable VcsBranchDetectionOptions existingData)
        Description copied from interface: VcsRepositoryDataExporter
        Extract branch detection configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.
        Specified by:
        importBranchDetectionOptions in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.git.GitRepository,​com.atlassian.bamboo.specs.model.repository.git.GitRepositoryProperties>
        Returns:
      • setCredentialsAccessor

        @Deprecated
        public void setCredentialsAccessor​(CredentialsAccessor credentialsAccessor)
        Deprecated.
        since 6.8 use constructor injection or annotation injection
      • setI18nResolver

        @Deprecated
        public void setI18nResolver​(com.atlassian.sal.api.message.I18nResolver i18nResolver)
        Deprecated.
        since 6.8 use constructor injection or annotation injection