Fixed up javadoc warnings and source paths.
Now using BaseLdapPathAware on all LdapServerManagers.
This commit is contained in:
@@ -31,15 +31,15 @@
|
||||
<dependency org="org.springframework" name="spring-ldap"
|
||||
rev="latest.integration" conf="global->default;source->source" />
|
||||
<dependency org="org.springframework" name="spring-beans"
|
||||
rev="2.0.6" />
|
||||
rev="2.0.8" />
|
||||
<dependency org="org.springframework" name="spring-core"
|
||||
rev="2.0.6" />
|
||||
rev="2.0.8" />
|
||||
<dependency org="org.springframework" name="spring-context"
|
||||
rev="2.0.6" />
|
||||
rev="2.0.8" />
|
||||
<dependency org="org.springframework" name="spring-dao"
|
||||
rev="2.0.6" />
|
||||
rev="2.0.8" />
|
||||
<dependency org="org.springframework" name="spring-src"
|
||||
rev="2.0.6" conf="source->source">
|
||||
rev="2.0.8" conf="source->source">
|
||||
<artifact name="spring-src" type="zip" />
|
||||
</dependency>
|
||||
<dependency org="com.sun" name="ldapbp" rev="1.0" />
|
||||
@@ -53,19 +53,19 @@
|
||||
</dependency>
|
||||
<!-- kind of nasty, acegi needs some 1.2.7 stuff, so we override with newer! -->
|
||||
<dependency org="org.springframework" name="spring-jdbc"
|
||||
rev="2.0.6" conf="buildtime->default" />
|
||||
rev="2.0.8" conf="buildtime->default" />
|
||||
<dependency org="org.springframework" name="spring-remoting"
|
||||
rev="2.0.6" conf="buildtime->default" />
|
||||
rev="2.0.8" conf="buildtime->default" />
|
||||
<dependency org="org.springframework" name="spring-support"
|
||||
rev="2.0.6" conf="buildtime->default" />
|
||||
rev="2.0.8" conf="buildtime->default" />
|
||||
<dependency org="org.springframework" name="spring-jpa"
|
||||
rev="2.0.6" conf="buildtime->default" />
|
||||
rev="2.0.8" conf="buildtime->default" />
|
||||
|
||||
<!-- test time only dependencies -->
|
||||
<dependency org="com.cenqua.clover" name="clover" rev="1.3.12"
|
||||
conf="test->default" />
|
||||
<dependency org="org.springframework" name="spring-mock"
|
||||
rev="2.0.6" conf="test->default" />
|
||||
rev="2.0.8" conf="test->default" />
|
||||
<dependency org="gsbase" name="gsbase" rev="2.0.1"
|
||||
conf="test->default" />
|
||||
<dependency org="junit" name="junit" rev="3.8.2"
|
||||
@@ -85,7 +85,7 @@
|
||||
<dependency org="cglib" name="cglib-nodep" rev="2.1_3"
|
||||
conf="test->default" />
|
||||
<dependency org="org.springframework" name="spring-aop"
|
||||
rev="2.0.6" conf="test->default" />
|
||||
rev="2.0.8" conf="test->default" />
|
||||
<dependency org="aopalliance" name="aopalliance" rev="1.0"
|
||||
conf="test->default" />
|
||||
<dependency org="hsqldb" name="hsqldb" rev="1.8.0.7"
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
|
||||
<!-- Used mainly to enable injecting base into LdapServerManager -->
|
||||
<bean
|
||||
class="org.springframework.ldap.core.support.BaseLdapPathBeanPostProcessor" />
|
||||
|
||||
<!-- JNDI environment variable -->
|
||||
<bean id="environment"
|
||||
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -74,7 +74,7 @@ import com.sun.jndi.ldap.ctl.VirtualListViewResponseControl;
|
||||
* </pre>
|
||||
*
|
||||
* @author Ulrik Sandberg
|
||||
* @see http://www3.ietf.org/proceedings/02nov/I-D/draft-ietf-ldapext-ldapv3-vlv-09.txt
|
||||
* @see <a href="http://www3.ietf.org/proceedings/02nov/I-D/draft-ietf-ldapext-ldapv3-vlv-09.txt">LDAP Extensions for Scrolling View Browsing of Search Results</a>
|
||||
*/
|
||||
public class VirtualListViewControlDirContextProcessor implements
|
||||
DirContextProcessor {
|
||||
|
||||
Reference in New Issue
Block a user