LDAP-139: Added mirrored method in SimpleLdapTemplate that take Name parameters.

LDAP-140: Added bindmethod in LdapTemplate and SimpleLdapTemplate that take a DirContextOperations instance and
uses the information from that instance (DN and Attributes) to perform the bind.
This commit is contained in:
Mattias Arthursson
2008-10-23 09:14:06 +00:00
parent e22fa053a3
commit c416a4576f
8 changed files with 583 additions and 106 deletions

View File

@@ -136,7 +136,7 @@ public class PersonDaoImpl implements PersonDao {
context.setAttributeValue("sn", p.getLastname());
context.setAttributeValue("description", p.getDescription());</emphasis>
ldapTemplate.bind(dn, context, null);
ldapTemplate.bind(context);
}
}</programlisting>
</example>
@@ -210,7 +210,7 @@ public class PersonDaoImpl implements PersonDao {
Name dn = buildDn(p);
DirContextAdapter context = new DirContextAdapter(dn);
mapToContext(p, context);
ldapTemplate.bind(dn, context, null);
ldapTemplate.bind(context);
}
public void update(Person p) {
@@ -265,9 +265,9 @@ public class PersonDaoImpl implements PersonDao {
}
public void create(Person person) {
DirContextAdapter context = new DirContextAdapter();
DirContextAdapter context = new DirContextAdapter(buildDn(person));
mapToContext(person, context);
ldapTemplate.bind(buildDn(person), context, null);
ldapTemplate.bind(context);
}
public void update(Person person) {