Results 1 to 2 of 2

Thread: How to discard a entry in the ldaptemplate's search operation?

  1. #1

    Default How to discard a entry in the ldaptemplate's search operation?

    I use LdapTemplate.search() operation. In the ContextMapper.() implementation, I will check if a user from LDAP meets the constraints defined in our application. If not, the user will be dicarded. but I do not know how to tell the framework to discard an entry/user from the ldap. Now I return null in this case. this make the code ugly.

    How could I do in this case?

    Thanks in advance.

  2. #2
    Join Date
    Jul 2005
    Location
    Helsingborg, Sweden
    Posts
    504

    Default

    You could implement your own CollectingNameClassPairCallbackHandler, similar to the one in this thread, and use a search method that takes a handler instead of a mapper.
    Ulrik Sandberg
    Jayway (www.jayway.com)
    Spring LDAP project member

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •