Package com.atlassian.bamboo.vcs.export
Interface VcsRepositoryDataExporter<B extends com.atlassian.bamboo.specs.api.builders.repository.VcsRepository,P extends com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties>
-
- All Known Implementing Classes:
BitbucketCloudImporterExporter
,BitbucketServerExporter
,DefaultVcsRepositoryDataExporter
,GitConfigurationExporter
,GitHubConfigurationExporter
,LegacyRepositoryConfigurationExporter
,NoOverridesVcsProjectRepositoryDataExporter
,NoOverridesVcsRepositoryDataExporter
@ExperimentalApi public interface VcsRepositoryDataExporter<B extends com.atlassian.bamboo.specs.api.builders.repository.VcsRepository,P extends com.atlassian.bamboo.specs.api.model.repository.VcsRepositoryProperties>
Handles exporting of repository configuration into YAML.- Since:
- 5.15
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description B
appendBranchData(B builder, @NotNull VcsBranchDefinition vcsBranchDefinition)
Fill in the builder passed as the first argument with vcs branch data.B
appendBranchDetectionOptions(B builder, @NotNull VcsBranchDetectionOptions branchDetectionOptions)
Fill in the builder passed as the first argument with branch detection configuration.B
appendChangeDetectionOptions(B builder, @NotNull VcsChangeDetectionOptions changeDetectionOptions)
Fill in the builder passed as the first argument with change detection configuration.default B
appendLocationData(B builder, @NotNull VcsLocationDefinition vcsLocationDefinition)
Deprecated.B
appendLocationData(B builder, @NotNull VcsLocationDefinition vcsLocationDefinition, @NotNull VcsRepositoryContext repositoryContext)
Fill in the builder passed as the first argument with vcs server data.default B
fromYaml(@NotNull String name, @NotNull Node config, @NotNull TaskValidationContext validationContext)
B
getEntityPropertiesBuilder(@NotNull VcsRepositoryData repositoryData)
Create empty instance of a properties builder appropriate for the exported repository data.default @Nullable Map<String,String>
importBambooSpecsDetectionOptions(P repositoryProperties, @Nullable VcsBambooSpecsDetectionOptions existingData)
Extract Bamboo Specs detection configuration from properties object.@Nullable Map<String,String>
importBranchData(P repositoryProperties, @Nullable VcsBranchDefinition existingData)
Extract branch configuration from properties object.@Nullable Map<String,String>
importBranchDetectionOptions(P repositoryProperties, @Nullable VcsBranchDetectionOptions existingData)
Extract branch detection configuration from properties object.@Nullable Map<String,String>
importChangeDetectionOptions(P repositoryProperties, @Nullable VcsChangeDetectionOptions existingData)
Extract change detection configuration from properties object.default @Nullable Map<String,String>
importLocationData(P repositoryProperties, @Nullable VcsLocationDefinition existingData)
Deprecated.@Nullable Map<String,String>
importLocationData(P repositoryProperties, @Nullable VcsLocationDefinition existingData, @NotNull VcsRepositoryContext repositoryContext)
Extract vcs location configuration from properties object.default @Nullable Node
toYaml(P repositoryProperties)
-
-
-
Field Detail
-
YAML_TYPE
static final String YAML_TYPE
-
-
Method Detail
-
getEntityPropertiesBuilder
@NotNull B getEntityPropertiesBuilder(@NotNull @NotNull VcsRepositoryData repositoryData)
Create empty instance of a properties builder appropriate for the exported repository data.- Returns:
- instance of a builder
-
appendLocationData
@Deprecated @NotNull default B appendLocationData(@NotNull B builder, @NotNull @NotNull VcsLocationDefinition vcsLocationDefinition)
Deprecated.Fill in the builder passed as the first argument with vcs server data.
-
appendLocationData
@NotNull B appendLocationData(@NotNull B builder, @NotNull @NotNull VcsLocationDefinition vcsLocationDefinition, @NotNull @NotNull VcsRepositoryContext repositoryContext)
Fill in the builder passed as the first argument with vcs server data.- Since:
- 7.2
-
appendBranchData
@NotNull B appendBranchData(@NotNull B builder, @NotNull @NotNull VcsBranchDefinition vcsBranchDefinition)
Fill in the builder passed as the first argument with vcs branch data. Return the first argument if not applicable.
-
appendChangeDetectionOptions
@NotNull B appendChangeDetectionOptions(@NotNull B builder, @NotNull @NotNull VcsChangeDetectionOptions changeDetectionOptions)
Fill in the builder passed as the first argument with change detection configuration. Return the first argument if not applicable.
-
appendBranchDetectionOptions
@NotNull B appendBranchDetectionOptions(@NotNull B builder, @NotNull @NotNull VcsBranchDetectionOptions branchDetectionOptions)
Fill in the builder passed as the first argument with branch detection configuration. Return the first argument if not applicable.
-
importLocationData
@Deprecated @Nullable default @Nullable Map<String,String> importLocationData(@NotNull P repositoryProperties, @Nullable @Nullable VcsLocationDefinition existingData)
Deprecated.Extract vcs location configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.- Parameters:
repositoryProperties
-- Returns:
-
importLocationData
@Nullable @Nullable Map<String,String> importLocationData(@NotNull P repositoryProperties, @Nullable @Nullable VcsLocationDefinition existingData, @NotNull @NotNull VcsRepositoryContext repositoryContext)
Extract vcs location configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.- Parameters:
repositoryProperties
-- Returns:
- Since:
- 7.2
-
importBranchData
@Nullable @Nullable Map<String,String> importBranchData(@NotNull P repositoryProperties, @Nullable @Nullable VcsBranchDefinition existingData)
Extract branch configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.- Parameters:
repositoryProperties
-- Returns:
-
importChangeDetectionOptions
@Nullable @Nullable Map<String,String> importChangeDetectionOptions(@NotNull P repositoryProperties, @Nullable @Nullable VcsChangeDetectionOptions existingData)
Extract change detection configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.- Parameters:
repositoryProperties
-- Returns:
-
importBranchDetectionOptions
@Nullable @Nullable Map<String,String> importBranchDetectionOptions(@NotNull P repositoryProperties, @Nullable @Nullable VcsBranchDetectionOptions existingData)
Extract branch detection configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.- Parameters:
repositoryProperties
-- Returns:
-
importBambooSpecsDetectionOptions
@Nullable default @Nullable Map<String,String> importBambooSpecsDetectionOptions(@NotNull P repositoryProperties, @Nullable @Nullable VcsBambooSpecsDetectionOptions existingData)
Extract Bamboo Specs detection configuration from properties object. Should return null if respective data is undefined in properties object. If data is returned, it should be validated for correctness and completeness.- Parameters:
repositoryProperties
-
-
toYaml
@Nullable default @Nullable Node toYaml(@NotNull P repositoryProperties) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
-
fromYaml
@Nullable default B fromYaml(@NotNull @NotNull String name, @NotNull @NotNull Node config, @NotNull @NotNull TaskValidationContext validationContext) throws YamlSpecsValidationException
- Throws:
YamlSpecsValidationException
-
-