Class ObjectPropertyMapper


  • public final class ObjectPropertyMapper
    extends PropertyMapper
    An property mapper which maps JSON objects to LDAP attributes.
    • Method Detail

      • property

        public ObjectPropertyMapper property​(String name,
                                             PropertyMapper mapper)
        Creates an explicit mapping for a property contained in the JSON object. When user attributes are included by default, be careful to exclude any attributes which have explicit mappings defined using this method, otherwise they will be duplicated in the JSON representation.
        Parameters:
        name - The name of the JSON property to be mapped.
        mapper - The property mapper responsible for mapping the JSON attribute to LDAP attribute(s).
        Returns:
        A reference to this property mapper.
      • includeAllUserAttributesByDefault

        public ObjectPropertyMapper includeAllUserAttributesByDefault​(boolean include)
        Specifies whether all LDAP user attributes should be mapped by default using the default schema based mapping rules. Individual attributes can be excluded using excludedDefaultUserAttributes(Collection) in order to prevent attributes with explicit mappings being mapped twice.
        Parameters:
        include - true if all LDAP user attributes be mapped by default.
        Returns:
        A reference to this property mapper.
      • excludedDefaultUserAttributes

        public ObjectPropertyMapper excludedDefaultUserAttributes​(String... attributeNames)
        Specifies zero or more user attributes which will be excluded from the default user attribute mappings when enabled using includeAllUserAttributesByDefault(boolean). Attributes which have explicit mappings should be excluded in order to prevent duplication.
        Parameters:
        attributeNames - The list of attributes to be excluded.
        Returns:
        A reference to this property mapper.
      • excludedDefaultUserAttributes

        public ObjectPropertyMapper excludedDefaultUserAttributes​(Collection<String> attributeNames)
        Specifies zero or more user attributes which will be excluded from the default user attribute mappings when enabled using includeAllUserAttributesByDefault(boolean). Attributes which have explicit mappings should be excluded in order to prevent duplication.
        Parameters:
        attributeNames - The list of attributes to be excluded.
        Returns:
        A reference to this property mapper.