public boolean importResource(final Resource resource) {
        try {
            if (ResourceUtils.doesResourceExist(resource)) {
                try (val reader = new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8)) {
                    val ref = new TypeReference<List<SamlIdentityProviderEntity>>() {
                    };
                    identityProviderEntities.addAll(MAPPER.readValue(JsonValue.readHjson(reader).toString(), ref));
                }
                return true;
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
        return false;
    }
Import resource and provide boolean.

@param resource the resource
@return true/false
support/cas-server-support-saml-idp-discovery/src/main/java/org/apereo/cas/entity/SamlIdentityProviderEntityParser.java