public List<AppRegistration> importAll(boolean overwrite, String... resourceUris) { List<AppRegistration> apps = new ArrayList<>(); for (String uri : resourceUris) { try { Map<String, URI> registered = this.uriRegistryPopulator.populateRegistry( overwrite, this.uriRegistry, uri); for (Map.Entry<String, URI> entry : registered.entrySet()) { apps.add(createAppRegistration(entry.getKey(), entry.getValue())); } } catch (Exception e) { throw new IllegalStateException("Error when registering applications from " + uri + ": " + e.getMessage(), e); } } return apps; }