Remove core-tiger

Closes gh-621
This commit is contained in:
Josh Cummings
2022-01-21 14:26:22 -07:00
parent f587593fca
commit 7a3e85587a
23 changed files with 22 additions and 1179 deletions

View File

@@ -15,15 +15,23 @@
*/
package org.springframework.ldap.itest.core.simple;
import java.util.List;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.ldap.LdapName;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ldap.NameNotFoundException;
import org.springframework.ldap.core.ContextMapper;
import org.springframework.ldap.core.DirContextAdapter;
import org.springframework.ldap.core.DirContextOperations;
import org.springframework.ldap.core.DirContextProcessor;
import org.springframework.ldap.core.simple.ParameterizedContextMapper;
import org.springframework.ldap.core.simple.SimpleLdapTemplate;
import org.springframework.ldap.core.LdapTemplate;
import org.springframework.ldap.filter.AndFilter;
import org.springframework.ldap.filter.EqualsFilter;
import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest;
@@ -31,12 +39,6 @@ import org.springframework.ldap.itest.NoAdTest;
import org.springframework.ldap.support.LdapUtils;
import org.springframework.test.context.ContextConfiguration;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.ldap.LdapName;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
@@ -47,7 +49,7 @@ public class SimpleLdapTemplateITest extends AbstractLdapTemplateIntegrationTest
private static LdapName DN = LdapUtils.newLdapName("cn=Some Person4,ou=company1,ou=Sweden");
@Autowired
private SimpleLdapTemplate ldapTemplate;
private LdapTemplate ldapTemplate;
@Test
public void testLookup() {
@@ -125,7 +127,7 @@ public class SimpleLdapTemplateITest extends AbstractLdapTemplateIntegrationTest
ldapTemplate.modifyAttributes(ctx);
// verify that the data was properly updated.
ldapTemplate.lookup("cn=Some Person,ou=company1,ou=Sweden", new ParameterizedContextMapper<Object>() {
ldapTemplate.lookup("cn=Some Person,ou=company1,ou=Sweden", new ContextMapper<Object>() {
public Object mapFromContext(Object ctx) {
DirContextAdapter adapter = (DirContextAdapter) ctx;
assertThat(adapter.getStringAttribute("description")).isEqualTo("updated description");
@@ -146,7 +148,7 @@ public class SimpleLdapTemplateITest extends AbstractLdapTemplateIntegrationTest
ldapTemplate.modifyAttributes(ctx);
// verify that the data was properly updated.
ldapTemplate.lookup("cn=Some Person,ou=company1,ou=Sweden", new ParameterizedContextMapper<Object>() {
ldapTemplate.lookup("cn=Some Person,ou=company1,ou=Sweden", new ContextMapper<Object>() {
public Object mapFromContext(Object ctx) {
DirContextAdapter adapter = (DirContextAdapter) ctx;
assertThat(adapter.getStringAttribute("description")).isEqualTo("updated description");
@@ -219,7 +221,7 @@ public class SimpleLdapTemplateITest extends AbstractLdapTemplateIntegrationTest
}
}
private static final class CnContextMapper implements ParameterizedContextMapper<String> {
private static final class CnContextMapper implements ContextMapper<String> {
public String mapFromContext(Object ctx) {
DirContextAdapter adapter = (DirContextAdapter) ctx;

View File

@@ -24,7 +24,7 @@ import org.springframework.dao.IncorrectResultSizeDataAccessException;
import org.springframework.ldap.core.ContextSource;
import org.springframework.ldap.core.DirContextOperations;
import org.springframework.ldap.core.LdapTemplate;
import org.springframework.ldap.core.simple.AbstractParameterizedContextMapper;
import org.springframework.ldap.core.support.AbstractContextMapper;
import org.springframework.ldap.core.support.LdapContextSource;
import org.springframework.ldap.filter.EqualsFilter;
import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest;
@@ -159,7 +159,7 @@ public class LdapContextSourceIntegrationTest extends AbstractLdapTemplateIntegr
}
}
private final static class DnContextMapper extends AbstractParameterizedContextMapper<String> {
private final static class DnContextMapper extends AbstractContextMapper<String> {
@Override
protected String doMapFromContext(DirContextOperations ctx) {
return ctx.getNameInNamespace();

View File

@@ -7,7 +7,7 @@
<import resource="classpath:/conf/commonContextSourceConfig.xml"/>
<bean id="simpleLdapTemplate"
class="org.springframework.ldap.core.simple.SimpleLdapTemplate">
class="org.springframework.ldap.core.LdapTemplate">
<constructor-arg ref="contextSource" />
</bean>