summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-02-26 10:29:36 +0100
committerAndrew Branson <andrew.branson@cern.ch>2014-02-26 10:29:36 +0100
commit755bb76c94953b62a08e9fecf523bc5c42ec79ac (patch)
tree63edd567272cd87edd55eeb55a5fc814e1f6079d /src/main/java/com/c2kernel/lookup
parent1faab1fd00f70881d4666d766fd0f033e172ff80 (diff)
Properties extended as ObjectProperties, which can return any Object,
and wrap int and boolean parsing. Gateway.getProperties() returns the new ObjectProperty instance. Old Gateway property methods still present but deprecated. Refs #149
Diffstat (limited to 'src/main/java/com/c2kernel/lookup')
-rw-r--r--src/main/java/com/c2kernel/lookup/LDAPLookup.java2
-rw-r--r--src/main/java/com/c2kernel/lookup/LDAPProperties.java15
2 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/com/c2kernel/lookup/LDAPLookup.java b/src/main/java/com/c2kernel/lookup/LDAPLookup.java
index c6f86d0..08a80b6 100644
--- a/src/main/java/com/c2kernel/lookup/LDAPLookup.java
+++ b/src/main/java/com/c2kernel/lookup/LDAPLookup.java
@@ -71,7 +71,7 @@ public class LDAPLookup
DomainPath.mTypeRoot = "cn=domain,"+props.mLocalPath;
mNextKeyManager = new NextKeyManager(this, "cn=last,"+EntityPath.mTypeRoot);
- Logger.msg(7, "LDAP.useOldProps="+Gateway.getProperty("LDAP.useOldProps", "false"));
+ Logger.msg(7, "LDAP.useOldProps="+Gateway.getProperties().getBoolean("LDAP.useOldProps", false));
mPropManager = new LDAPPropertyManager(this);
mRoleManager = new LDAPRoleManager(this, "cn=agent,"+DomainPath.mTypeRoot, EntityPath.mTypeRoot);
diff --git a/src/main/java/com/c2kernel/lookup/LDAPProperties.java b/src/main/java/com/c2kernel/lookup/LDAPProperties.java
index a9ae699..df0b85d 100644
--- a/src/main/java/com/c2kernel/lookup/LDAPProperties.java
+++ b/src/main/java/com/c2kernel/lookup/LDAPProperties.java
@@ -27,14 +27,13 @@ public class LDAPProperties
public LDAPProperties()
{
- mGlobalPath = Gateway.getProperty( "LDAP.GlobalPath" );
- mRootPath = Gateway.getProperty( "LDAP.RootPath" );
- mLocalPath = Gateway.getProperty( "LDAP.LocalPath" );
- mPort = Integer.valueOf(Gateway.getProperty( "LDAP.port", "389" ));
- mHost = Gateway.getProperty( "LDAP.host" );
- mUser = Gateway.getProperty( "LDAP.user" );
- mPassword = Gateway.getProperty( "LDAP.password" );
- mDbPath = Gateway.getProperty( "LDAP.dbPath" );
+ mGlobalPath = Gateway.getProperties().getProperty( "LDAP.GlobalPath" );
+ mRootPath = Gateway.getProperties().getProperty( "LDAP.RootPath" );
+ mLocalPath = Gateway.getProperties().getProperty( "LDAP.LocalPath" );
+ mPort = Gateway.getProperties().getInt( "LDAP.port", 389 );
+ mHost = Gateway.getProperties().getProperty( "LDAP.host" );
+ mUser = Gateway.getProperties().getProperty( "LDAP.user" );
+ mPassword = Gateway.getProperties().getProperty( "LDAP.password" );
mRootPath += "," + mGlobalPath;
mLocalPath += "," + mRootPath;