Interface SCIMLDAPAttributeMapper
-
@ThreadSafety(level=INTERFACE_THREADSAFE) public interface SCIMLDAPAttributeMapper
This interface provides a set of utility methods that SCIM 2-based extensions can use to convert between JSON attribute values and LDAP attribute values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNodetoJsonNode(Attribute ldapAttribute)Converts an LDAP attribute to a JSON node.AttributetoLdapAttribute(com.fasterxml.jackson.databind.JsonNode jsonNode, java.lang.String scimAttributeName, java.lang.String ldapAttributeName)Converts the given JSON node to an LDAP attribute.ASN1OctetStringtoLdapValue(com.fasterxml.jackson.databind.JsonNode jsonNode, java.lang.String ldapAttributeName)Converts the value of the given JSON node to a rawASN1OctetStringvalue for use in constructing an LDAPAttributeobject.ASN1OctetString[]toLdapValues(com.fasterxml.jackson.databind.JsonNode jsonNode, java.lang.String ldapAttributeName)Converts the value of the given JSON node to an array of rawASN1OctetStringvalues for use in constructing an LDAPAttributeobject.com.fasterxml.jackson.databind.node.TextNodetoTextNode(Attribute ldapAttribute)Converts an LDAP attribute to a JSON text node.
-
-
-
Method Detail
-
toJsonNode
com.fasterxml.jackson.databind.JsonNode toJsonNode(Attribute ldapAttribute) throws com.unboundid.scim2.common.exceptions.ScimException
Converts an LDAP attribute to a JSON node. If the LDAP attribute is multivalued, then an array node will be returned.- Parameters:
ldapAttribute- An LDAP attribute object.- Returns:
- The equivalent value as a Jackson JsonNode.
- Throws:
com.unboundid.scim2.common.exceptions.ScimException- If the attribute cannot be converted.
-
toTextNode
com.fasterxml.jackson.databind.node.TextNode toTextNode(Attribute ldapAttribute) throws com.unboundid.scim2.common.exceptions.ScimException
Converts an LDAP attribute to a JSON text node. If the LDAP attribute is multivalued, then the first value will be returned as a text node.- Parameters:
ldapAttribute- An LDAP attribute object.- Returns:
- The equivalent value as a Jackson TextNode.
- Throws:
com.unboundid.scim2.common.exceptions.ScimException- If the attribute cannot be converted.
-
toLdapAttribute
Attribute toLdapAttribute(com.fasterxml.jackson.databind.JsonNode jsonNode, java.lang.String scimAttributeName, java.lang.String ldapAttributeName) throws com.unboundid.scim2.common.exceptions.ScimException
Converts the given JSON node to an LDAP attribute.- Parameters:
jsonNode- A SCIM attribute as a Jackson JsonNode.scimAttributeName- The SCIM attribute name.ldapAttributeName- The LDAP attribute name.- Returns:
- The equivalent LDAP attribute.
- Throws:
com.unboundid.scim2.common.exceptions.ScimException- If the attribute cannot be converted.
-
toLdapValue
ASN1OctetString toLdapValue(com.fasterxml.jackson.databind.JsonNode jsonNode, java.lang.String ldapAttributeName) throws com.unboundid.scim2.common.exceptions.ScimException
Converts the value of the given JSON node to a rawASN1OctetStringvalue for use in constructing an LDAPAttributeobject. If the SCIM attribute is multivalued, then the first value will be returned.- Parameters:
jsonNode- A SCIM attribute as a Jackson JsonNode.ldapAttributeName- The LDAP attribute name.- Returns:
- The equivalent LDAP value.
- Throws:
com.unboundid.scim2.common.exceptions.ScimException- If the attribute cannot be converted.
-
toLdapValues
ASN1OctetString[] toLdapValues(com.fasterxml.jackson.databind.JsonNode jsonNode, java.lang.String ldapAttributeName) throws com.unboundid.scim2.common.exceptions.ScimException
Converts the value of the given JSON node to an array of rawASN1OctetStringvalues for use in constructing an LDAPAttributeobject.- Parameters:
jsonNode- A SCIM attribute as a Jackson JsonNode.ldapAttributeName- The LDAP attribute name.- Returns:
- The equivalent LDAP value.
- Throws:
com.unboundid.scim2.common.exceptions.ScimException- If the attribute cannot be converted.
-
-