@Override
    public RegisteredService mapToRegisteredService(final LdapEntry entry) {
        val value = LdapUtils.getString(entry, ldap.getServiceDefinitionAttribute());
        if (StringUtils.hasText(value)) {
            LOGGER.debug("Transforming LDAP entry [{}] into registered service definition", entry);
            return this.jsonSerializer.from(value);
        }
        LOGGER.warn("LDAP entry [{}] is not assigned the service definition attribute [{}] and will be ignored",
            entry, ldap.getServiceDefinitionAttribute());
        return null;
    }
Default implementation of {@link LdapRegisteredServiceMapper} that is able
to map ldap entries to {@link RegisteredService} instances based on
certain attributes names. This implementation also respects the object class
attribute of LDAP entries via {@link LdapUtils#OBJECT_CLASS_ATTRIBUTE}.

@author Misagh Moayyed
@since 4.1.0
support/cas-server-support-ldap-service-registry/src/main/java/org/apereo/cas/adaptors/ldap/services/DefaultLdapRegisteredServiceMapper.java