protected void mapAttributeToSchema(final Principal principal,
                                        final ScimUserSchema schema,
                                        final Consumer<String> consumer) {
        Optional.ofNullable(scimProperties.getSchemaMappings().get(schema.getName()))
            .map(attribute -> getPrincipalAttributeValue(principal, attribute))
            .filter(StringUtils::isNotBlank)
            .ifPresent(consumer);
    }
This is {@link DefaultScimPrincipalAttributeMapper}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-scim-core/src/main/java/org/apereo/cas/scim/v2/provisioning/DefaultScimPrincipalAttributeMapper.java