public static SamlMetadataUIInfo locateMetadataUserInterfaceForEntityId(
        final EntityDescriptor entityDescriptor, final String entityId,
        final WebBasedRegisteredService registeredService, final HttpServletRequest requestContext) {
        val mdui = new SamlMetadataUIInfo(registeredService, requestContext.getLocale().getLanguage());
        if (entityDescriptor == null) {
            LOGGER.trace("Entity descriptor not found for [{}]", entityId);
            return mdui;
        }
        val spssoDescriptor = getSPSsoDescriptor(entityDescriptor);
        if (spssoDescriptor == null) {
            LOGGER.trace("SP SSO descriptor not found for [{}]", entityId);
            return mdui;
        }
        val extensions = spssoDescriptor.getExtensions();
        if (extensions == null) {
            LOGGER.trace("No extensions in the SP SSO descriptor are found for [{}]", UIInfo.DEFAULT_ELEMENT_NAME.getNamespaceURI());
            return mdui;
        }
        val spExtensions = extensions.getUnknownXMLObjects(UIInfo.DEFAULT_ELEMENT_NAME);
        if (spExtensions.isEmpty()) {
            LOGGER.trace("No extensions in the SP SSO descriptor are located for [{}]", UIInfo.DEFAULT_ELEMENT_NAME.getNamespaceURI());
            return mdui;
        }
        spExtensions
            .stream()
            .filter(UIInfo.class::isInstance)
            .map(UIInfo.class::cast)
            .forEach(uiInfo -> {
                LOGGER.trace("Found MDUI info for [{}]", entityId);
                mdui.setUiInfo(uiInfo);
            });
        return mdui;
    }
Locate mdui for entity id simple metadata ui info.

@param entityDescriptor  the entity descriptor
@param entityId          the entity id
@param registeredService the registered service
@param requestContext    the request context
@return the simple metadata ui info
support/cas-server-support-saml-mdui-core/src/main/java/org/apereo/cas/support/saml/mdui/MetadataUIUtils.java