Issue Details (XML | Word | Printable)

Key: GLDP-68
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Luke Daley
Reporter: Siegfried Puchbauer
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Gldapo

Add a Filter DSL to ease LDAP querying

Created: 20/Jun/08 06:56 AM   Updated: 25/Jul/08 11:07 PM
Component/s: API
Affects Version/s: None
Fix Version/s: 0.7

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive gldap-filter.zip (2 kB)


Patch Submitted: Yes


 Description  « Hide
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



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Siegfried Puchbauer added a comment - 20/Jun/08 06:57 AM
The indentions in the description are destroyed ... See usage.txt in the zip for what I meant.

Cheers, sigi


Luke Daley added a comment - 21/Jun/08 12:15 AM
Seems great

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


Luke Daley added a comment - 25/Jul/08 11:07 PM
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.