rwinch / spring-ldap-migrate-issues

0 stars 0 forks source link

LDAP-149: Add DnContextMapper implementation #149

Closed rwinch closed 15 years ago

rwinch commented 15 years ago

Migrated from ["LDAP-149":https://jira.spring.io/browse/LDAP-149]

A default ContextMapper implementation should be provided to get the DN of found entries. There should be two options: relative or absolute DNs.

rwinch commented 15 years ago

["Ulrik Sandberg":https://jira.spring.io/secure/ViewProfile.jspa?name=ulsa] said:

Any point in mapping to an object which contains both?

bc.. public class DnContextMapper extends AbstractParameterizedContextMapper { @Override protected DnPair doMapFromContext(DirContextOperations ctx) { DnPair dnPair = new DnPair(); dnpair.relativeDn = ctx.getDn(); dnpair.absoluteDn = ctx.getNameInNamespace(); return dnpair; } public static class DnPair { public DistinguishedName relativeDn; public DistinguishedName absoluteDn; } }

p.

rwinch commented 15 years ago

["Mattias Hellborg Arthursson":https://jira.spring.io/secure/ViewProfile.jspa?name=marthursson] said:

Added @LdapEntryIdentificationContextMapper@.