Interface RepositoryExportService
- All Known Implementing Classes:
RepositoryExportServiceImpl
@ExperimentalApi
public interface RepositoryExportService
- Since:
- 5.15
-
Method Summary
Modifier and TypeMethodDescription@NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties
convertYamlRepository
(@NotNull String yaml) Converts data from a YAML file to credential export properties.Export all linked repositories to default location in Bamboo home dir.exportLinkedRepository
(@NotNull VcsRepositoryData repositoryData) Export a linked repository to default location in Bamboo home dir.default @NotNull PartialVcsRepositoryData
importLinkedRepository
(@NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties) Deprecated.Validates exported linked repository properties within Bamboo context (e.g.@NotNull PartialVcsRepositoryData
importRepository
(@NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties) Validates exported linked/project repository properties within Bamboo context (e.g.
-
Method Details
-
exportAllLinkedRepositories
Export all linked repositories to default location in Bamboo home dir.- Returns:
- paths to files updated by export process
-
exportLinkedRepository
@NotNull @NotNull Iterable<Path> exportLinkedRepository(@NotNull @NotNull VcsRepositoryData repositoryData) Export a linked repository to default location in Bamboo home dir.- Returns:
- paths to files updated by export process
-
convertYamlRepository
@NotNull @NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties convertYamlRepository(@NotNull @NotNull String yaml) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationException Converts data from a YAML file to credential export properties. The file under the given path must exist on the same machine as Bamboo Server is running, and must be readable. This method performs validation of YAML types and of the properties without Bamboo context (e.g. no database integrity is verified).- Parameters:
yaml
- path to YAML file containing definition of shared credential- Returns:
- credential properties after contextless validation
- Throws:
YamlValidationException
- if the format of the YAML file is invalidcom.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
- if the imported properties were not valid
-
importRepository
@NotNull @NotNull PartialVcsRepositoryData importRepository(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, UnauthorisedException Validates exported linked/project repository properties within Bamboo context (e.g. verifying database integrity), then imports the data into the database.- Parameters:
repositoryProperties
- repository properties to import- Returns:
- saved linked/project repository entity
- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
- if data validation failsRuntimeException
- if the format of the data is invalid - only discoverable at this stage because pluggable code is involved, underlying cause:YamlValidationException
UnauthorisedException
-
importLinkedRepository
@Deprecated @NotNull default @NotNull PartialVcsRepositoryData importLinkedRepository(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties repositoryProperties) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, UnauthorisedException Deprecated.Validates exported linked repository properties within Bamboo context (e.g. verifying database integrity), then imports the data into the database.- Parameters:
repositoryProperties
- repository properties to import- Returns:
- saved linked repository entity
- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
- if data validation failsRuntimeException
- if the format of the data is invalid - only discoverable at this stage because pluggable code is involved, underlying cause:YamlValidationException
UnauthorisedException
-