Class RepositoryExporterImpl

java.lang.Object
com.atlassian.bamboo.configuration.external.exporters.RepositoryExporterImpl
All Implemented Interfaces:
RepositoryExporter

public class RepositoryExporterImpl extends Object implements RepositoryExporter
  • Constructor Details

    • RepositoryExporterImpl

      public RepositoryExporterImpl()
  • Method Details

    • toSpecsEntity

      @NotNull public @NotNull com.atlassian.bamboo.specs.api.builders.repository.VcsRepository toSpecsEntity(@NotNull @NotNull PartialVcsRepositoryData repositoryData, @NotNull @NotNull VcsRepositoryContext repositoryContext)
      Specified by:
      toSpecsEntity in interface RepositoryExporter
      Returns:
    • toSpecsEntityAndBranchOverride

      @NotNull public @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)
      Description copied from interface: RepositoryExporter
      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.
      Specified by:
      toSpecsEntityAndBranchOverride in interface RepositoryExporter
    • toSpecsEntity

      @NotNull public <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)
      Specified by:
      toSpecsEntity in interface RepositoryExporter
      Returns:
    • getExporterForViewer

      @NotNull public @NotNull VcsRepositoryViewerExporter getExporterForViewer(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.repository.viewer.VcsRepositoryViewerProperties properties)
      Specified by:
      getExporterForViewer in interface RepositoryExporter
    • toEntityProperties

      @NotNull public @NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties toEntityProperties(@NotNull @NotNull String yaml) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationException
      Description copied from interface: RepositoryExporter
      Generate VcsRepositoryProperties from YAML string
      Specified by:
      toEntityProperties in interface RepositoryExporter
      Throws:
      com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
      YamlValidationException
    • importRepository

      @NotNull public @NotNull PartialVcsRepositoryData importRepository(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties, @Nullable @Nullable VcsRepositoryData existingData, @Nullable @Nullable VcsRepositoryData parentDataArg, 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
      Description copied from interface: RepositoryExporter
      Transform repository properties to format used by Bamboo services. Will retrieve parent repository if needed, but will not save anything to database.
      Specified by:
      importRepository in interface RepositoryExporter
      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