Class CredentialsExportServiceImpl

java.lang.Object
com.atlassian.bamboo.configuration.external.CredentialsExportServiceImpl
All Implemented Interfaces:
CredentialsExportService

public class CredentialsExportServiceImpl extends Object implements CredentialsExportService
  • Constructor Details

    • CredentialsExportServiceImpl

      public CredentialsExportServiceImpl()
  • Method Details

    • exportAllCredentials

      @NotNull public @NotNull Iterable<Path> exportAllCredentials()
      Description copied from interface: CredentialsExportService
      Export all shared credentials to default location in Bamboo home dir. Credentials will have their configuration encrypted for confidential data security.
      Specified by:
      exportAllCredentials in interface CredentialsExportService
      Returns:
      paths to files updated by export process
    • exportCredentials

      @NotNull public @NotNull Iterable<Path> exportCredentials(@NotNull @NotNull CredentialsData credentialsData)
      Description copied from interface: CredentialsExportService
      Export a shared credential to default location in Bamboo home dir. The entity should be encrypted for data security.
      Specified by:
      exportCredentials in interface CredentialsExportService
      Returns:
      paths to files updated by export process
      See Also:
    • toEntityProperties

      @NotNull public @NotNull com.atlassian.bamboo.specs.api.model.credentials.SharedCredentialsProperties toEntityProperties(String yamlString) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationException
      Description copied from interface: CredentialsExportService
      Converts data from a YAML document to credential export properties. This method performs validation of YAML types and of the properties without Bamboo context (e.g. no database integrity is verified).
      Specified by:
      toEntityProperties in interface CredentialsExportService
      Returns:
      credential properties after contextless validation
      Throws:
      com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - if the imported properties were not valid
      YamlValidationException - if the format of the YAML file is invalid
    • importCredentials

      @NotNull public @NotNull CredentialsData importCredentials(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.credentials.SharedCredentialsProperties credentialProperties) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationException
      Description copied from interface: CredentialsExportService
      Validates exported credential properties within Bamboo context (e.g. verifying database integrity), then imports the data into the database.
      Specified by:
      importCredentials in interface CredentialsExportService
      Parameters:
      credentialProperties - credential properties to import
      Returns:
      saved credential entity
      Throws:
      com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - if data validation fails
      YamlValidationException - if the format of the YAML file is invalid (plugins will parse their part here)
    • toSpecsEntity

      @NotNull public @NotNull com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentials toSpecsEntity(@NotNull @NotNull CredentialsData credentialsData)
      Specified by:
      toSpecsEntity in interface CredentialsExportService