class KmsHelper {

    public String getDecryptedConfigurationValue(ConfigurationValue configurationValue)
    {
        String encryptedValue = configurationHelper.getProperty(configurationValue);

        if (StringUtils.isBlank(encryptedValue))
        {
            throw new IllegalStateException("Unable to decrypt configuration value \"" + configurationValue.getKey() + "\" since it is not configured.");
        }

        try
        {
            return kmsDao.decrypt(awsHelper.getAwsParamsDto(), encryptedValue);
        }
        catch (Exception e)
        {
            throw new IllegalStateException("Error decrypting configuration value \"" + configurationValue.getKey() + "\".", e);
        }
    }

}