Class CredentialsExportServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.configuration.external.CredentialsExportServiceImpl
-
- All Implemented Interfaces:
CredentialsExportService
public class CredentialsExportServiceImpl extends Object implements CredentialsExportService
-
-
Constructor Summary
Constructors Constructor Description CredentialsExportServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Iterable<Path>exportAllCredentials()Export all shared credentials to default location in Bamboo home dir.@NotNull Iterable<Path>exportCredentials(@NotNull CredentialsData credentialsData)Export a shared credential to default location in Bamboo home dir.@NotNull CredentialsDataimportCredentials(@NotNull com.atlassian.bamboo.specs.api.model.credentials.SharedCredentialsProperties credentialProperties)Validates exported credential properties within Bamboo context (e.g. verifying database integrity), then imports the data into the database.@NotNull com.atlassian.bamboo.specs.api.model.credentials.SharedCredentialsPropertiestoEntityProperties(String yamlString)Converts data from a YAML document to credential export properties.@NotNull com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentialstoSpecsEntity(@NotNull CredentialsData credentialsData)
-
-
-
Method Detail
-
exportAllCredentials
@NotNull public @NotNull Iterable<Path> exportAllCredentials()
Description copied from interface:CredentialsExportServiceExport all shared credentials to default location in Bamboo home dir. Credentials will have their configuration encrypted for confidential data security.- Specified by:
exportAllCredentialsin interfaceCredentialsExportService- Returns:
- paths to files updated by export process
-
exportCredentials
@NotNull public @NotNull Iterable<Path> exportCredentials(@NotNull @NotNull CredentialsData credentialsData)
Description copied from interface:CredentialsExportServiceExport a shared credential to default location in Bamboo home dir. The entity should be encrypted for data security.- Specified by:
exportCredentialsin interfaceCredentialsExportService- Returns:
- paths to files updated by export process
- See Also:
EncryptedCredentialsAccessor
-
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:CredentialsExportServiceConverts 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:
toEntityPropertiesin interfaceCredentialsExportService- Returns:
- credential properties after contextless validation
- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException- if the imported properties were not validYamlValidationException- 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:CredentialsExportServiceValidates exported credential properties within Bamboo context (e.g. verifying database integrity), then imports the data into the database.- Specified by:
importCredentialsin interfaceCredentialsExportService- Parameters:
credentialProperties- credential properties to import- Returns:
- saved credential entity
- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException- if data validation failsYamlValidationException- 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:
toSpecsEntityin interfaceCredentialsExportService
-
-