From 70f69e0909a37bdc6e72a83cbb152eb3f52a22ec Mon Sep 17 00:00:00 2001 From: Ulrik Sandberg Date: Sun, 13 Jan 2008 23:07:52 +0000 Subject: [PATCH] Fixed up javadoc warnings and source paths. Now using BaseLdapPathAware on all LdapServerManagers. --- sandbox/ivy.xml | 22 +++++++++---------- .../src/itest/java/conf/apacheDsContext.xml | 5 +++++ .../ldap/LdapServerManager.java | 15 ++++++++----- ...ualListViewControlDirContextProcessor.java | 2 +- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/sandbox/ivy.xml b/sandbox/ivy.xml index 9fa3f0b7..4af9ad1d 100644 --- a/sandbox/ivy.xml +++ b/sandbox/ivy.xml @@ -31,15 +31,15 @@ + rev="2.0.8" /> + rev="2.0.8" /> + rev="2.0.8" /> + rev="2.0.8" /> + rev="2.0.8" conf="source->source"> @@ -53,19 +53,19 @@ + rev="2.0.8" conf="buildtime->default" /> + rev="2.0.8" conf="buildtime->default" /> + rev="2.0.8" conf="buildtime->default" /> + rev="2.0.8" conf="buildtime->default" /> + rev="2.0.8" conf="test->default" /> + rev="2.0.8" conf="test->default" /> + + + + diff --git a/sandbox/src/itest/java/org/springframework/ldap/LdapServerManager.java b/sandbox/src/itest/java/org/springframework/ldap/LdapServerManager.java index 937e14fe..d617a89c 100644 --- a/sandbox/src/itest/java/org/springframework/ldap/LdapServerManager.java +++ b/sandbox/src/itest/java/org/springframework/ldap/LdapServerManager.java @@ -35,7 +35,7 @@ import org.apache.directory.server.protocol.shared.store.LdifFileLoader; import org.springframework.beans.factory.DisposableBean; import org.springframework.ldap.core.ContextSource; import org.springframework.ldap.core.DistinguishedName; -import org.springframework.ldap.core.support.DefaultDirObjectFactory; +import org.springframework.ldap.core.support.BaseLdapPathAware; /** * Utility class to initialize the apache directory server for use in the @@ -44,15 +44,21 @@ import org.springframework.ldap.core.support.DefaultDirObjectFactory; * @author Mattias Arthursson * */ -public class LdapServerManager implements DisposableBean { +public class LdapServerManager implements DisposableBean, BaseLdapPathAware { private static Log log = LogFactory.getLog(LdapServerManager.class); private ContextSource contextSource; + private DistinguishedName baseLdapPath; + public void setContextSource(ContextSource contextSource) { this.contextSource = contextSource; } + public void setBaseLdapPath(DistinguishedName baseLdapPath) { + this.baseLdapPath = baseLdapPath; + } + public void destroy() throws Exception { Properties env = new Properties(); env.setProperty(Context.INITIAL_CONTEXT_FACTORY, @@ -75,11 +81,10 @@ public class LdapServerManager implements DisposableBean { // Different test cases have different base paths. This means that the // starting point will be different. - if (ctx.getEnvironment().get( - DefaultDirObjectFactory.JNDI_ENV_BASE_PATH_KEY) != null) { + if (baseLdapPath.size() != 0) { startingPoint = DistinguishedName.EMPTY_PATH; } else { - startingPoint = new DistinguishedName("dc=jayway,dc=se"); + startingPoint = new DistinguishedName(baseLdapPath); } try { diff --git a/sandbox/src/main/java/org/springframework/ldap/control/VirtualListViewControlDirContextProcessor.java b/sandbox/src/main/java/org/springframework/ldap/control/VirtualListViewControlDirContextProcessor.java index 4fe8dd51..26070185 100644 --- a/sandbox/src/main/java/org/springframework/ldap/control/VirtualListViewControlDirContextProcessor.java +++ b/sandbox/src/main/java/org/springframework/ldap/control/VirtualListViewControlDirContextProcessor.java @@ -74,7 +74,7 @@ import com.sun.jndi.ldap.ctl.VirtualListViewResponseControl; * * * @author Ulrik Sandberg - * @see http://www3.ietf.org/proceedings/02nov/I-D/draft-ietf-ldapext-ldapv3-vlv-09.txt + * @see LDAP Extensions for Scrolling View Browsing of Search Results */ public class VirtualListViewControlDirContextProcessor implements DirContextProcessor {