@Audit(action = AuditableActions.SAML2_METADATA_RESOLUTION,
        actionResolverName = AuditActionResolvers.SAML2_METADATA_RESOLUTION_ACTION_RESOLVER,
        resourceResolverName = AuditResourceResolvers.SAML2_METADATA_RESOLUTION_RESOURCE_RESOLVER)
    @Override
    public Collection<? extends MetadataResolver> resolve(final SamlRegisteredService service, final CriteriaSet criteriaSet) {
        val documents = this.entityManager.createQuery(SELECT_QUERY, SamlMetadataDocument.class).getResultList();
        return documents
            .stream()
            .map(doc -> buildMetadataResolverFrom(service, doc))
            .filter(Objects::nonNull)
            .collect(Collectors.toList());
    }
This is {@link JpaSamlRegisteredServiceMetadataResolver}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-saml-idp-metadata-jpa/src/main/java/org/apereo/cas/support/saml/metadata/resolver/JpaSamlRegisteredServiceMetadataResolver.java