Class BitbucketServerExporter

  • All Implemented Interfaces:
    VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>

    public class BitbucketServerExporter
    extends BitbucketServerSshKeyHandler
    implements VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
    • Constructor Detail

      • BitbucketServerExporter

        public BitbucketServerExporter()
    • Method Detail

      • getEntityPropertiesBuilder

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository 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 interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
        Returns:
        instance of a builder
      • appendLocationData

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository appendLocationData​(@NotNull
                                                                                                                                     @NotNull com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository 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 interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
      • appendBranchData

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository appendBranchData​(@NotNull
                                                                                                                                   @NotNull com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository 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 interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
      • appendChangeDetectionOptions

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository appendChangeDetectionOptions​(@NotNull
                                                                                                                                               @NotNull com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository 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 interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
      • appendBranchDetectionOptions

        @NotNull
        public @NotNull com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository appendBranchDetectionOptions​(@NotNull
                                                                                                                                               @NotNull com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository 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 interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
      • importLocationData

        @Nullable
        public @Nullable Map<String,​String> importLocationData​(@NotNull
                                                                     @NotNull com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties 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 interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
        Returns:
      • toYaml

        @Nullable
        public @Nullable Node toYaml​(@NotNull
                                     @NotNull com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties repo)
                              throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
        Specified by:
        toYaml in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
        Throws:
        com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
      • importBranchData

        @Nullable
        public @Nullable Map<String,​String> importBranchData​(@NotNull
                                                                   @NotNull com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties 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 interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
        Returns:
      • importChangeDetectionOptions

        @Nullable
        public @Nullable Map<String,​String> importChangeDetectionOptions​(@NotNull
                                                                               @NotNull com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties 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 interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
        Returns:
      • importBranchDetectionOptions

        @Nullable
        public @Nullable Map<String,​String> importBranchDetectionOptions​(@NotNull
                                                                               @NotNull com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties 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 interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>
        Returns:
      • importBambooSpecsDetectionOptions

        @NotNull
        public @NotNull Map<String,​String> importBambooSpecsDetectionOptions​(@NotNull
                                                                                   @NotNull com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties repositoryProperties,
                                                                                   @Nullable
                                                                                   @Nullable VcsBambooSpecsDetectionOptions existingData)
        Description copied from interface: VcsRepositoryDataExporter
        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.
        Specified by:
        importBambooSpecsDetectionOptions in interface VcsRepositoryDataExporter<com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository,​com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerRepositoryProperties>