Class GitHubConfigurationExporter
java.lang.Object
com.atlassian.bamboo.plugins.github.exporter.GitHubConfigurationExporter
- All Implemented Interfaces:
VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties>
public class GitHubConfigurationExporter
extends Object
implements VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties>
-
Field Summary
Fields inherited from interface com.atlassian.bamboo.vcs.export.VcsRepositoryDataExporter
YAML_TYPE
-
Constructor Summary
ConstructorDescriptionGitHubConfigurationExporter
(SecretEncryptionService encryptionService, CredentialsAccessor credentialsAccessor, ProjectManager projectManager) -
Method Summary
Modifier and TypeMethodDescription@NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository
appendBranchData
(@NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository builder, @NotNull VcsBranchDefinition vcsBranchDefinition) Fill in the builder passed as the first argument with vcs branch data.@NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository
appendBranchDetectionOptions
(@NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository builder, @NotNull VcsBranchDetectionOptions branchDetectionOptions) Fill in the builder passed as the first argument with branch detection configuration.@NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository
appendChangeDetectionOptions
(@NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository builder, @NotNull VcsChangeDetectionOptions changeDetectionOptions) Fill in the builder passed as the first argument with change detection configuration.@NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository
appendLocationData
(@NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository builder, @NotNull VcsLocationDefinition vcsLocationDefinition, @NotNull VcsRepositoryContext repositoryContext) Fill in the builder passed as the first argument with vcs server data.@Nullable com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository
fromYaml
(@NotNull String name, @NotNull Node node, @NotNull TaskValidationContext validationContext) @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository
getEntityPropertiesBuilder
(@NotNull VcsRepositoryData repositoryData) Create empty instance of a properties builder appropriate for the exported repository data.importBranchData
(@NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repositoryProperties, @Nullable VcsBranchDefinition existingData) Extract branch configuration from properties object.importBranchDetectionOptions
(@NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repositoryProperties, @Nullable VcsBranchDetectionOptions existingData) Extract branch detection configuration from properties object.importChangeDetectionOptions
(@NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repositoryProperties, @Nullable VcsChangeDetectionOptions existingData) Extract change detection configuration from properties object.importLocationData
(@NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repositoryProperties, @Nullable VcsLocationDefinition existingData, @NotNull VcsRepositoryContext repositoryContext) Extract vcs location configuration from properties object.@Nullable Node
toYaml
(@NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repo) 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.vcs.export.VcsRepositoryDataExporter
importBambooSpecsDetectionOptions
-
Constructor Details
-
GitHubConfigurationExporter
@Inject public GitHubConfigurationExporter(SecretEncryptionService encryptionService, CredentialsAccessor credentialsAccessor, ProjectManager projectManager)
-
-
Method Details
-
getEntityPropertiesBuilder
@NotNull public @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository getEntityPropertiesBuilder(@NotNull @NotNull VcsRepositoryData repositoryData) Description copied from interface:VcsRepositoryDataExporter
Create empty instance of a properties builder appropriate for the exported repository data.- Specified by:
getEntityPropertiesBuilder
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties> - Returns:
- instance of a builder
-
appendLocationData
@NotNull public @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository appendLocationData(@NotNull @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository builder, @NotNull @NotNull VcsLocationDefinition vcsLocationDefinition, @NotNull @NotNull VcsRepositoryContext repositoryContext) Description copied from interface:VcsRepositoryDataExporter
Fill in the builder passed as the first argument with vcs server data.- Specified by:
appendLocationData
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties>
-
appendBranchData
@NotNull public @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository appendBranchData(@NotNull @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository builder, @NotNull @NotNull VcsBranchDefinition vcsBranchDefinition) Description copied from interface:VcsRepositoryDataExporter
Fill in the builder passed as the first argument with vcs branch data. Return the first argument if not applicable.- Specified by:
appendBranchData
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties>
-
appendChangeDetectionOptions
@NotNull public @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository appendChangeDetectionOptions(@NotNull @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository builder, @NotNull @NotNull VcsChangeDetectionOptions changeDetectionOptions) Description copied from interface:VcsRepositoryDataExporter
Fill in the builder passed as the first argument with change detection configuration. Return the first argument if not applicable.- Specified by:
appendChangeDetectionOptions
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties>
-
appendBranchDetectionOptions
@NotNull public @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository appendBranchDetectionOptions(@NotNull @NotNull com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository builder, @NotNull @NotNull VcsBranchDetectionOptions branchDetectionOptions) Description copied from interface:VcsRepositoryDataExporter
Fill in the builder passed as the first argument with branch detection configuration. Return the first argument if not applicable.- Specified by:
appendBranchDetectionOptions
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties>
-
importLocationData
@Nullable public @Nullable Map<String,String> importLocationData(@NotNull @NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repositoryProperties, @Nullable @Nullable VcsLocationDefinition existingData, @NotNull @NotNull VcsRepositoryContext repositoryContext) Description copied from interface:VcsRepositoryDataExporter
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.- Specified by:
importLocationData
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties> - Returns:
-
importBranchData
@Nullable public @Nullable Map<String,String> importBranchData(@NotNull @NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repositoryProperties, @Nullable @Nullable VcsBranchDefinition existingData) Description copied from interface:VcsRepositoryDataExporter
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.- Specified by:
importBranchData
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties> - Returns:
-
importChangeDetectionOptions
@Nullable public @Nullable Map<String,String> importChangeDetectionOptions(@NotNull @NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repositoryProperties, @Nullable @Nullable VcsChangeDetectionOptions existingData) Description copied from interface:VcsRepositoryDataExporter
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.- Specified by:
importChangeDetectionOptions
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties> - Returns:
-
importBranchDetectionOptions
@Nullable public @Nullable Map<String,String> importBranchDetectionOptions(@NotNull @NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repositoryProperties, @Nullable @Nullable VcsBranchDetectionOptions existingData) Description copied from interface:VcsRepositoryDataExporter
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.- Specified by:
importBranchDetectionOptions
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties> - Returns:
-
toYaml
@Nullable public @Nullable Node toYaml(@NotNull @NotNull com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties repo) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - Specified by:
toYaml
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties> - Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
-
fromYaml
@Nullable public @Nullable com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository fromYaml(@NotNull @NotNull String name, @NotNull @NotNull Node node, @NotNull @NotNull TaskValidationContext validationContext) throws YamlSpecsValidationException - Specified by:
fromYaml
in interfaceVcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository,
com.atlassian.bamboo.specs.model.repository.github.GitHubRepositoryProperties> - Throws:
YamlSpecsValidationException
-