Class CredentialsExportServiceImpl

    • Constructor Detail

      • CredentialsExportServiceImpl

        public CredentialsExportServiceImpl()
    • Method Detail

      • 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
      • 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)