Interface VcsRepositoryDataExporter<B extends com.atlassian.bamboo.specs.api.builders.repository.VcsRepository,P extends com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties>

All Known Implementing Classes:
BitbucketCloudImporterExporter, BitbucketServerExporter, DefaultVcsRepositoryDataExporter, GitConfigurationExporter, GitHubConfigurationExporter, LegacyRepositoryConfigurationExporter, NoOverridesVcsProjectRepositoryDataExporter, NoOverridesVcsRepositoryDataExporter

@ExperimentalApi public interface VcsRepositoryDataExporter<B extends com.atlassian.bamboo.specs.api.builders.repository.VcsRepository,P extends com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties>
Handles exporting of repository configuration into YAML.
Since:
5.15
  • Field Details

    • YAML_TYPE

      static final String YAML_TYPE
  • Method Details

    • getEntityPropertiesBuilder

      @NotNull B getEntityPropertiesBuilder(@NotNull @NotNull VcsRepositoryData repositoryData)
      Create empty instance of a properties builder appropriate for the exported repository data.
      Returns:
      instance of a builder
    • appendLocationData

      @NotNull B appendLocationData(@NotNull B builder, @NotNull @NotNull VcsLocationDefinition vcsLocationDefinition, @NotNull @NotNull VcsRepositoryContext repositoryContext)
      Fill in the builder passed as the first argument with vcs server data.
      Since:
      7.2
    • appendBranchData

      @NotNull B appendBranchData(@NotNull B builder, @NotNull @NotNull VcsBranchDefinition vcsBranchDefinition)
      Fill in the builder passed as the first argument with vcs branch data. Return the first argument if not applicable.
    • appendChangeDetectionOptions

      @NotNull B appendChangeDetectionOptions(@NotNull B builder, @NotNull @NotNull VcsChangeDetectionOptions changeDetectionOptions)
      Fill in the builder passed as the first argument with change detection configuration. Return the first argument if not applicable.
    • appendBranchDetectionOptions

      @NotNull B appendBranchDetectionOptions(@NotNull B builder, @NotNull @NotNull VcsBranchDetectionOptions branchDetectionOptions)
      Fill in the builder passed as the first argument with branch detection configuration. Return the first argument if not applicable.
    • importLocationData

      @Nullable @Nullable Map<String,String> importLocationData(@NotNull P repositoryProperties, @Nullable @Nullable VcsLocationDefinition existingData, @NotNull @NotNull VcsRepositoryContext repositoryContext)
      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.
      Parameters:
      repositoryProperties -
      Returns:
      Since:
      7.2
    • importBranchData

      @Nullable @Nullable Map<String,String> importBranchData(@NotNull P repositoryProperties, @Nullable @Nullable VcsBranchDefinition existingData)
      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.
      Parameters:
      repositoryProperties -
      Returns:
    • importChangeDetectionOptions

      @Nullable @Nullable Map<String,String> importChangeDetectionOptions(@NotNull P repositoryProperties, @Nullable @Nullable VcsChangeDetectionOptions existingData)
      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.
      Parameters:
      repositoryProperties -
      Returns:
    • importBranchDetectionOptions

      @Nullable @Nullable Map<String,String> importBranchDetectionOptions(@NotNull P repositoryProperties, @Nullable @Nullable VcsBranchDetectionOptions existingData)
      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.
      Parameters:
      repositoryProperties -
      Returns:
    • importBambooSpecsDetectionOptions

      @Nullable default @Nullable Map<String,String> importBambooSpecsDetectionOptions(@NotNull P repositoryProperties, @Nullable @Nullable VcsBambooSpecsDetectionOptions existingData)
      Extract Bamboo Specs 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.
      Parameters:
      repositoryProperties -
    • toYaml

      @Nullable default @Nullable Node toYaml(@NotNull P repositoryProperties) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
      Throws:
      com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
    • fromYaml

      @Nullable default B fromYaml(@NotNull @NotNull String name, @NotNull @NotNull Node config, @NotNull @NotNull TaskValidationContext validationContext) throws YamlSpecsValidationException
      Throws:
      YamlSpecsValidationException