From e64e6fada90a93be37f171277b484630db263266 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 3 Oct 2014 17:31:22 +0200 Subject: Adapt to new Exceptions --- src/main/java/com/c2kernel/lookup/ldap/LDAPAuthManager.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/com/c2kernel/lookup/ldap/LDAPAuthManager.java') diff --git a/src/main/java/com/c2kernel/lookup/ldap/LDAPAuthManager.java b/src/main/java/com/c2kernel/lookup/ldap/LDAPAuthManager.java index 1ddb452..d97fa1f 100644 --- a/src/main/java/com/c2kernel/lookup/ldap/LDAPAuthManager.java +++ b/src/main/java/com/c2kernel/lookup/ldap/LDAPAuthManager.java @@ -1,7 +1,7 @@ package com.c2kernel.lookup.ldap; -import com.c2kernel.common.InvalidDataException; -import com.c2kernel.common.ObjectNotFoundException; +import com.c2kernel.common.InvalidData; +import com.c2kernel.common.ObjectNotFound; import com.c2kernel.process.Gateway; import com.c2kernel.process.auth.Authenticator; import com.c2kernel.utils.Logger; @@ -16,7 +16,7 @@ public class LDAPAuthManager implements Authenticator { @Override public boolean authenticate(String agentName, - String password, String resource) throws InvalidDataException, ObjectNotFoundException { + String password, String resource) throws InvalidData, ObjectNotFound { ldapProps = new LDAPProperties(Gateway.getProperties()); @@ -42,18 +42,18 @@ public class LDAPAuthManager implements Authenticator { } else { - throw new InvalidDataException("Cannot log in. Some connection properties are not set.", ""); + throw new InvalidData("Cannot log in. Some connection properties are not set."); } } @Override - public boolean authenticate(String resource) throws InvalidDataException, ObjectNotFoundException { + public boolean authenticate(String resource) throws InvalidData, ObjectNotFound { ldapProps = new LDAPProperties(Gateway.getProperties()); if (ldapProps.mUser == null || ldapProps.mUser.length()==0 || ldapProps.mPassword == null || ldapProps.mPassword.length()==0) - throw new InvalidDataException("LDAP root user properties not found in config."); + throw new InvalidData("LDAP root user properties not found in config."); try { mLDAPConn = LDAPLookupUtils.createConnection(ldapProps); return true; -- cgit v1.2.3