Gldapo

Add a Filter DSL to ease LDAP querying

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 0.7
  • Component/s: API
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

I've implemented a LDAP Filter DSL, which can be used in the following way:

def filter = FilterUtil.build {
and {
or { like "cn", "foo*" like "cn", "bar*" }
eq "groupMembership", "cn=admingroup,ou=system,o=mycompany"
}
}
assert filter instanceof org.springframework.ldap.filter.Filter
assert filter.encode() == "(&(|(cn=foo*)(cn=bar*))(groupMembership=cn=admingroup,ou=system,o=mycompany))"

I thought it might be useful to have such a feature available in gldapo.

Cheers, sigi

Activity

Hide
Siegfried Puchbauer added a comment -

The indentions in the description are destroyed ... See usage.txt in the zip for what I meant.

Cheers, sigi

Show
Siegfried Puchbauer added a comment - The indentions in the description are destroyed ... See usage.txt in the zip for what I meant. Cheers, sigi
Hide
Luke Daley added a comment -

Seems great

Interested in committing yourself? Would need some accompanying tests of course though.

Show
Luke Daley added a comment - Seems great Interested in committing yourself? Would need some accompanying tests of course though.
Hide
Luke Daley added a comment -

Added to gldapo.filter namespace.

The 'not' filter was bugged, but apart from that it works beautifully.

I will be integrating it into the find() and findAll() methods before release of 0.7

Thanks again.

Show
Luke Daley added a comment - Added to gldapo.filter namespace. The 'not' filter was bugged, but apart from that it works beautifully. I will be integrating it into the find() and findAll() methods before release of 0.7 Thanks again.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: