Announcement Announcement Module
Collapse
No announcement yet.
SimpleLdapTemplate.lookup with a Name parameter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SimpleLdapTemplate.lookup with a Name parameter

    Was there a reason that
    Code:
    SimpleLdapTemplate.lookup(Name,ParameterizedContextMapper)
    was left out of the API? Any chance of adding it to 1.2.1? Thanks.
    (*Chris*)

  • #2
    Actually, we were trying to keep the number of method signatures in SimpleLdapTemplate at a minimum, in order to make it as concise as possible. Leaving methods that take a 'Name' parameter out of there was a conscious decision, as was leaving the ones the take an AttributesMapper.

    Adding the requested method would basically require us to add all the other mirrored methods that take a 'Name' parameter, cluttering the interface, so I don't think we will be doing that. Feel free to add a jira issue however, and if there is lots of support for it we might reconsider.

    Regards,

    Comment


    • #3
      That's a shame. I'm kind of stuck between a rock and a hard place. If I want to take advantage of Java 5's advanced features (and I do) I should use SimpleLdapTemplate, but since it doesn't support the code I already have in place, it isn't really a drop in LdapTemplate replacement, which is what I would have expected for something with that name.

      I decided not to use SimpleLdapTemplate because it didn't support what I needed, so now it's back to casting.
      (*Chris*)

      Comment


      • #4
        Once again, SimpleLdapTemplate is not intended as a drop-in replacement for all usages of LdapTemplate, but rather as a simplified substitute to be used for the most common cases. I don't think the problems are as serious as you make them; all you need to do is toString() on your Name and you're all set.

        Also, if this is very important for you there is nothing that prevents you from subclassing SimpleLdapTemplate in your project and implementing the requested lookup method there.

        Comment

        Working...
        X