Interface IncrementalAttributesMapper<T extends IncrementalAttributesMapper>

All Superinterfaces:
AttributesMapper<T>
All Known Implementing Classes:
DefaultIncrementalAttributesMapper

public interface IncrementalAttributesMapper<T extends IncrementalAttributesMapper> extends AttributesMapper<T>
Utility that helps with reading all attribute values from Active Directory using Incremental Retrieval of Multi-valued Properties.
Since:
1.3.2
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Get properly formatted attributes for use in the next query.
    Get all collected values for all managed attributes as an Attributes instance.
    getValues(String attributeName)
    Get all of the collected values for the specified attribute.
    boolean
    Check whether another query iteration is required to get all values for all attributes.
    Goes through all of the attributes to record their values and figure out whether a new query iteration is needed to get more values.
  • Method Details

    • getValues

      List<Object> getValues(String attributeName)
      Get all of the collected values for the specified attribute.
      Parameters:
      attributeName - the attribute to get values for.
      Returns:
      the collected values for the specified attribute. Will be null if the requested attribute has not been returned by the server (attribute did not exist).
    • getCollectedAttributes

      Attributes getCollectedAttributes()
      Get all collected values for all managed attributes as an Attributes instance.
      Returns:
      an Attributes instance populated with all collected values.
    • hasMore

      boolean hasMore()
      Check whether another query iteration is required to get all values for all attributes.
      Returns:
      true if there are more values for at least one of the managed attributes, false otherwise.
    • getAttributesForLookup

      String[] getAttributesForLookup()
      Get properly formatted attributes for use in the next query. The attribute names included will include Range specifiers as needed and only the attributes that have not been retrieved in full will be included.
      Returns:
      an array of Strings to be used as input to e.g. LdapTemplate.lookup(javax.naming.Name, String[], org.springframework.ldap.core.AttributesMapper) in the next iteration.
    • mapFromAttributes

      T mapFromAttributes(Attributes attributes) throws NamingException
      Goes through all of the attributes to record their values and figure out whether a new query iteration is needed to get more values.
      Specified by:
      mapFromAttributes in interface AttributesMapper<T extends IncrementalAttributesMapper>
      Parameters:
      attributes - attributes from a SearchResult.
      Returns:
      this instance.
      Throws:
      NamingException