class RelationalTableRegistrationHelperServiceImpl implements RelationalTableRegistrationHelperService {

    String getPassword(RelationalStorageAttributesDto relationalStorageAttributesDto)
    {
        // Default password value to null.
        String password = null;

        // Check if we need to get a password value from the credstash.
        if (StringUtils.isNotBlank(relationalStorageAttributesDto.getJdbcUserCredentialName()))
        {
            final String credStashEncryptionContext = configurationHelper.getProperty(ConfigurationValue.CREDSTASH_RELATIONAL_STORAGE_ENCRYPTION_CONTEXT);

            try
            {
                password = credStashHelper.getCredentialFromCredStash(credStashEncryptionContext, relationalStorageAttributesDto.getJdbcUserCredentialName());
            }
            catch (CredStashGetCredentialFailedException e)
            {
                throw new IllegalStateException(e);
            }
        }

        return password;
    }

}