Class RepositoryExporterImpl
java.lang.Object
com.atlassian.bamboo.configuration.external.exporters.RepositoryExporterImpl
- All Implemented Interfaces:
RepositoryExporter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull VcsRepositoryViewerExporter
getExporterForViewer
(@NotNull com.atlassian.bamboo.specs.api.model.repository.viewer.VcsRepositoryViewerProperties properties) @NotNull PartialVcsRepositoryData
importRepository
(@NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties, @Nullable VcsRepositoryData existingData, @Nullable VcsRepositoryData parentDataArg, 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.configuration.external.exporters.RepositoryExporter
importRepository
-
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 interfaceRepositoryExporter
- 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 interfaceRepositoryExporter
-
toSpecsEntity
@NotNull public <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) - Specified by:
toSpecsEntity
in interfaceRepositoryExporter
- Returns:
-
getExporterForViewer
@NotNull public @NotNull VcsRepositoryViewerExporter getExporterForViewer(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.repository.viewer.VcsRepositoryViewerProperties properties) - Specified by:
getExporterForViewer
in interfaceRepositoryExporter
-
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
GenerateVcsRepositoryProperties
from YAML string- Specified by:
toEntityProperties
in interfaceRepositoryExporter
- 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 interfaceRepositoryExporter
- 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
-