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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user