Interface RepositoryExporter

All Known Implementing Classes:
RepositoryExporterImpl

public interface RepositoryExporter
Service to export Bamboo vcs repository definitions to YAML config files.
Since:
5.11
  • Method Details

    • toEntityProperties

      @NotNull @NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties toEntityProperties(@NotNull @NotNull String yaml) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationException
      Generate VcsRepositoryProperties from YAML string
      Throws:
      com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
      YamlValidationException
      Since:
      6.0
    • toSpecsEntity

      @NotNull @NotNull com.atlassian.bamboo.specs.api.builders.repository.VcsRepository toSpecsEntity(@NotNull @NotNull PartialVcsRepositoryData repositoryData, @NotNull @NotNull VcsRepositoryContext repositoryContext)
      Parameters:
      repositoryData -
      Returns:
      Since:
      6.0
    • toSpecsEntityAndBranchOverride

      @NotNull @NotNull Pair<com.atlassian.bamboo.specs.api.builders.repository.VcsRepository,com.atlassian.bamboo.specs.api.builders.repository.VcsRepositoryBranch> toSpecsEntityAndBranchOverride(@NotNull @NotNull PartialVcsRepositoryData repositoryData, @NotNull @NotNull VcsRepositoryContext repositoryContext)
      Export repository to pair of repository specs objects and (optionally) branch override object. This method can be used to generate more readable code when the branch is the only thing that repository overrides compared to its parent.
      Since:
      6.10
    • toSpecsEntity

      @NotNull <T extends com.atlassian.bamboo.specs.api.builders.repository.VcsRepository<T, E>, E extends com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties> T toSpecsEntity(@NotNull @NotNull VcsRepositoryData repositoryData, @NotNull @NotNull VcsRepositoryContext repositoryContext)
      Parameters:
      repositoryData -
      Returns:
      Since:
      6.0
    • importRepository

      @NotNull default @NotNull PartialVcsRepositoryData importRepository(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties, @Nullable @Nullable VcsRepositoryData existingData, boolean global, @NotNull @NotNull VcsRepositoryContext repositoryContext) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationException
      Transform repository properties to format used by Bamboo services. Will retrieve parent repository if needed, but will not save anything to database.
      Parameters:
      repositoryProperties - configuration of repository
      existingData - previously existing repository data
      global - is repository global
      Returns:
      repository data
      Throws:
      com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - if data validation fails
      YamlValidationException - if the format of the data is invalid - only discoverable at this stage because pluggable code is involved in validation
    • importRepository

      @NotNull @NotNull PartialVcsRepositoryData importRepository(@Nullable @Nullable com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties, @Nullable @Nullable VcsRepositoryData existingData, @Nullable @Nullable VcsRepositoryData parentData, boolean global, @Nullable @Nullable com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryBranchProperties branchOverride, @NotNull @NotNull VcsRepositoryContext repositoryContext) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationException
      Transform repository properties to format used by Bamboo services. Will retrieve parent repository if needed, but will not save anything to database.
      Parameters:
      repositoryProperties - configuration of repository
      existingData - previously existing repository data
      global - is repository global
      branchOverride - branch to be used.
      Returns:
      repository data
      Throws:
      com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - if data validation fails
      YamlValidationException - if the format of the data is invalid - only discoverable at this stage because pluggable code is involved in validation
    • getExporterForViewer

      @NotNull @NotNull VcsRepositoryViewerExporter getExporterForViewer(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.repository.viewer.VcsRepositoryViewerProperties properties)