class SecretManager {

    public static void downloadSecrets() {
        List<? extends Config> downloads = AppSettings.getInstance().getConfigList(AppSettings.SECRET_MANAGER_DOWNLOADS);
        if (downloads.size() > 0) {
            // Download all secrets specified in the settings
            for (Config download : downloads) {
                boolean required;
                try {
                    required = download.getBoolean("required");
                }
                catch (ConfigException.Missing e) {
                    required = true;
                }
                downloadSecret(download.getString("secret"), download.getString("file"), required);
            }
        }
    }

}