public static CasPropertiesContainer query(final ConfigurationMetadataCatalogQuery query,
                                               final CasConfigurationMetadataRepository repo) {
        val allProperties = repo.getRepository()
            .getAllProperties()
            .entrySet()
            .stream()
            .filter(entry -> {
                if (query.getQueryType() == ConfigurationMetadataCatalogQuery.QueryTypes.CAS) {
                    return CasConfigurationMetadataRepository.isCasProperty(entry.getValue());
                }
                if (query.getQueryType() == ConfigurationMetadataCatalogQuery.QueryTypes.THIRD_PARTY) {
                    return !CasConfigurationMetadataRepository.isCasProperty(entry.getValue());
                }
                return true;
            })
            .filter(entry -> query.getQueryFilter().test(entry.getValue())).toList();

        val properties = allProperties
            .stream()
            .filter(entry -> doesPropertyBelongToModule(entry.getValue(), query))
            .map(Map.Entry::getValue)
            .map(property -> collectReferenceProperty(property, repo.getRepository()))
            .filter(Objects::nonNull)
            .filter(property -> query.getRequiredPropertiesOnly() == null || query.getRequiredPropertiesOnly().equals(property.isRequired()))
            .sorted(Comparator.comparing(CasReferenceProperty::getName))
            .collect(Collectors.toCollection(TreeSet::new));
        return new CasPropertiesContainer(properties);
    }
Query cas properties.

@param query the query
@param repo  the repo
@return the cas properties container
support/cas-server-support-configuration-metadata-repository/src/main/java/org/apereo/cas/metadata/CasConfigurationMetadataCatalog.java