From 8dbf947eb6e84ec6a3c6e9ba421c682d847a8b00 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 5 Jun 2014 16:13:23 +0200 Subject: Make LDAPNextKeyManager independent of the LDAPLookup. The authenticator is the only required common component. --- .../java/com/c2kernel/lookup/ldap/LDAPNextKeyManager.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/c2kernel/lookup/ldap/LDAPNextKeyManager.java') diff --git a/src/main/java/com/c2kernel/lookup/ldap/LDAPNextKeyManager.java b/src/main/java/com/c2kernel/lookup/ldap/LDAPNextKeyManager.java index 4db8a49..48f938e 100644 --- a/src/main/java/com/c2kernel/lookup/ldap/LDAPNextKeyManager.java +++ b/src/main/java/com/c2kernel/lookup/ldap/LDAPNextKeyManager.java @@ -8,6 +8,7 @@ import com.c2kernel.lookup.ItemPath; import com.c2kernel.persistency.ClusterStorageException; import com.c2kernel.persistency.NextKeyManager; import com.c2kernel.process.Gateway; +import com.c2kernel.process.auth.Authenticator; import com.c2kernel.utils.Logger; import com.novell.ldap.LDAPEntry; @@ -26,10 +27,14 @@ public class LDAPNextKeyManager implements NextKeyManager { LDAPAuthManager ldap; String lastKeyPath; - public LDAPNextKeyManager(LDAPAuthManager ldap, String lastKeyPath) { + public LDAPNextKeyManager() { super(); - this.ldap = ldap; - this.lastKeyPath = lastKeyPath; + LDAPProperties props = new LDAPProperties(Gateway.getProperties()); + this.lastKeyPath = "cn=last,cn=entity,"+props.mLocalPath; + } + + public void open(Authenticator auth) { + this.ldap = (LDAPAuthManager)auth; } @Override -- cgit v1.2.3