org.springframework.ldap.core.support

## Class ContextMapperCallbackHandlerWithControls<T>

- java.lang.Object
- - org.springframework.ldap.core.CollectingNameClassPairCallbackHandler<T>
  - - org.springframework.ldap.core.ContextMapperCallbackHandler<T>
    - - org.springframework.ldap.core.support.ContextMapperCallbackHandlerWithControls<T>

- All Implemented Interfaces:
    NameClassPairCallbackHandler

      public class ContextMapperCallbackHandlerWithControls<T>
      extends ContextMapperCallbackHandler<T>

  Currently only per request controls can be inspected via the post process method on a context processor. If a request control gives a different value for each search result, then this cannot be inspected using the existing support classes. An example control that requires this feature would be 1.3.6.1.4.1.42.2.27.9.5.8 Account usability control, that can be used with for example the Sun ONE or the OpenDS directory servers. The extended callback handler can pass hasControls to mapper.
  Author:
    Tim Terry, Ulrik Sandberg

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContextMapperCallbackHandlerWithControls(ContextMapperWithControls<T> mapper)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `getObjectFromNameClassPair(NameClassPair nameClassPair)` Cast the NameClassPair to a `Binding` and pass its object to the ContextMapper.

    - ### Methods inherited from class org.springframework.ldap.core.CollectingNameClassPairCallbackHandler

      `getList, handleNameClassPair`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ContextMapperCallbackHandlerWithControls

          public ContextMapperCallbackHandlerWithControls(ContextMapperWithControls<T> mapper)

  - ### Method Detail

    - #### getObjectFromNameClassPair

          public T getObjectFromNameClassPair(NameClassPair nameClassPair)
                                       throws NamingException

      Description copied from class: `ContextMapperCallbackHandler`
      Cast the NameClassPair to a `Binding` and pass its object to the ContextMapper.
      Overrides:
        `getObjectFromNameClassPair` in class `ContextMapperCallbackHandler<T>`
      Parameters:
        `nameClassPair` - a Binding instance.
      Returns:
        the Object returned from the mapper.
      Throws:
        `NamingException` - if an error occurs.