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 Summary
Modifier and TypeMethodDescription@NotNull VcsRepositoryViewerExporter
getExporterForViewer
(@NotNull com.atlassian.bamboo.specs.api.model.repository.viewer.VcsRepositoryViewerProperties properties) default @NotNull PartialVcsRepositoryData
importRepository
(@NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties, @Nullable VcsRepositoryData existingData, boolean global, @NotNull VcsRepositoryContext repositoryContext) Transform repository properties to format used by Bamboo services.@NotNull PartialVcsRepositoryData
importRepository
(@Nullable com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties, @Nullable VcsRepositoryData existingData, @Nullable VcsRepositoryData parentData, boolean global, @Nullable com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryBranchProperties branchOverride, @NotNull VcsRepositoryContext repositoryContext) Transform repository properties to format used by Bamboo services.@NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties
toEntityProperties
(@NotNull String yaml) GenerateVcsRepositoryProperties
from YAML string@NotNull com.atlassian.bamboo.specs.api.builders.repository.VcsRepository
toSpecsEntity
(@NotNull PartialVcsRepositoryData repositoryData, @NotNull VcsRepositoryContext repositoryContext) <T extends com.atlassian.bamboo.specs.api.builders.repository.VcsRepository<T,
E>, E extends com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties>
TtoSpecsEntity
(@NotNull VcsRepositoryData repositoryData, @NotNull VcsRepositoryContext repositoryContext) @NotNull Pair<com.atlassian.bamboo.specs.api.builders.repository.VcsRepository,
com.atlassian.bamboo.specs.api.builders.repository.VcsRepositoryBranch> toSpecsEntityAndBranchOverride
(@NotNull PartialVcsRepositoryData repositoryData, @NotNull VcsRepositoryContext repositoryContext) Export repository to pair of repository specs objects and (optionally) branch override object.
-
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 GenerateVcsRepositoryProperties
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>, T toSpecsEntityE extends com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties> (@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 repositoryexistingData
- previously existing repository dataglobal
- is repository global- Returns:
- repository data
- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
- if data validation failsYamlValidationException
- 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 repositoryexistingData
- previously existing repository dataglobal
- is repository globalbranchOverride
- branch to be used.- Returns:
- repository data
- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
- if data validation failsYamlValidationException
- 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)
-