Author: akarasulu
Date: Mon Nov 1 20:41:30 2004
New Revision: 56347
Added:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapAttributeInUseException.java
- copied, changed from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAttributeInUseException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapAuthenticationException.java
- copied, changed from rev 56346,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAuthenticationException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapAuthenticationNotSupportedException.java
- copied, changed from rev 56346,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAuthenticationNotSupportedException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapConfigurationException.java
- copied, changed from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveConfigurationException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapException.java
- copied, changed from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNameAlreadyBoundException.java
- copied, changed from rev 56346,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNameAlreadyBoundException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNameNotFoundException.java
- copied, changed from rev 56346,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNameNotFoundException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNamingException.java
- copied, changed from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNamingException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNoPermissionException.java
- copied, changed from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNoPermissionException.java
Removed:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAttributeInUseException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAuthenticationException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAuthenticationNotSupportedException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveConfigurationException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNameAlreadyBoundException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNameNotFoundException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNamingException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNoPermissionException.java
Modified:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveInterceptorException.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/AuthenticationService.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/EveContextFactory.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/EveJndiProvider.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/EveExceptionService.java
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/DestroyContextTest.java
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/ImportConfirmationTest.java
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/SimpleAuthenticationTest.java
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/ibs/AuthorizationServiceTest.java
Log:
renaming and preparing for moves to ldap-common
Modified:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveInterceptorException.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveInterceptorException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveInterceptorException.java
Mon Nov 1 20:41:30 2004
@@ -31,7 +31,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class EveInterceptorException extends EveNamingException
+public class EveInterceptorException extends LdapNamingException
{
/** The Invokation the Interceptor failed on */
private final Invocation invocation;
@@ -108,15 +108,15 @@
/**
* Will return the resultCode of the root cause if the root cause
- * implements EveException.
+ * implements LdapException.
*
- * @see EveException#getResultCode()
+ * @see LdapException#getResultCode()
*/
public ResultCodeEnum getResultCode()
{
- if ( getRootCause() != null && ( getRootCause() instanceof
EveException ) )
+ if ( getRootCause() != null && ( getRootCause() instanceof
LdapException ) )
{
- return ( ( EveException ) getRootCause() ).getResultCode();
+ return ( ( LdapException ) getRootCause() ).getResultCode();
}
return super.getResultCode();
Copied:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapAttributeInUseException.java
(from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAttributeInUseException.java)
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAttributeInUseException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapAttributeInUseException.java
Mon Nov 1 20:41:30 2004
@@ -29,15 +29,15 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class EveAttributeInUseException extends AttributeInUseException
implements EveException
+public class LdapAttributeInUseException extends AttributeInUseException
implements LdapException
{
- public EveAttributeInUseException()
+ public LdapAttributeInUseException()
{
super();
}
- public EveAttributeInUseException( String explanation )
+ public LdapAttributeInUseException( String explanation )
{
super( explanation );
}
Copied:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapAuthenticationException.java
(from rev 56346,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAuthenticationException.java)
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAuthenticationException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapAuthenticationException.java
Mon Nov 1 20:41:30 2004
@@ -19,7 +19,7 @@
import javax.naming.AuthenticationException;
-import org.apache.eve.exception.EveException;
+import org.apache.eve.exception.LdapException;
import org.apache.ldap.common.message.ResultCodeEnum;
@@ -30,8 +30,8 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class EveAuthenticationException extends AuthenticationException
- implements EveException
+public class LdapAuthenticationException extends AuthenticationException
+ implements LdapException
{
/**
* Gets ResultCodeEnum.INVALIDCREDENTIALS every time.
Copied:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapAuthenticationNotSupportedException.java
(from rev 56346,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAuthenticationNotSupportedException.java)
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveAuthenticationNotSupportedException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapAuthenticationNotSupportedException.java
Mon Nov 1 20:41:30 2004
@@ -19,7 +19,7 @@
import javax.naming.AuthenticationNotSupportedException;
-import org.apache.eve.exception.EveException;
+import org.apache.eve.exception.LdapException;
import org.apache.ldap.common.message.ResultCodeEnum;
@@ -31,8 +31,8 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class EveAuthenticationNotSupportedException
- extends AuthenticationNotSupportedException implements EveException
+public class LdapAuthenticationNotSupportedException
+ extends AuthenticationNotSupportedException implements LdapException
{
/** the result code type safe enumeration */
private final ResultCodeEnum resultCode;
@@ -44,14 +44,14 @@
/**
- * Creates an EveException with the resultCode.
+ * Creates an LdapException with the resultCode.
*
* @see
AuthenticationNotSupportedException#AuthenticationNotSupportedException()
* @param resultCode the resultCode enumeration
* @throws IllegalArgumentException if the resultCode is not one of the
* codes corresponding to an AuthenticationNotSupportedException
*/
- public EveAuthenticationNotSupportedException( ResultCodeEnum resultCode )
+ public LdapAuthenticationNotSupportedException( ResultCodeEnum resultCode )
{
super();
this.resultCode = resultCode;
@@ -60,14 +60,14 @@
/**
- * Sets the resultCode associated with this EveException.
+ * Sets the resultCode associated with this LdapException.
*
* @see
AuthenticationNotSupportedException#AuthenticationNotSupportedException(String)
* @param resultCode the resultCode enumeration
* @throws IllegalArgumentException if the resultCode is not one of the
* codes corresponding to an AuthenticationNotSupportedException
*/
- public EveAuthenticationNotSupportedException( String explanation,
ResultCodeEnum resultCode )
+ public LdapAuthenticationNotSupportedException( String explanation,
ResultCodeEnum resultCode )
{
super( explanation );
this.resultCode = resultCode;
@@ -76,12 +76,12 @@
// ------------------------------------------------------------------------
- // EveException methods
+ // LdapException methods
// ------------------------------------------------------------------------
/**
- * @see org.apache.eve.exception.EveException#getResultCode()
+ * @see org.apache.eve.exception.LdapException#getResultCode()
*/
public ResultCodeEnum getResultCode()
{
Copied:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapConfigurationException.java
(from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveConfigurationException.java)
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveConfigurationException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapConfigurationException.java
Mon Nov 1 20:41:30 2004
@@ -26,18 +26,18 @@
* A ConfigurationException which associates a resultCode namely the
* [EMAIL PROTECTED] ResultCodeEnum#OTHER} resultCode with the exception.
*
- * @see EveException
+ * @see LdapException
* @see javax.naming.ConfigurationException
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class EveConfigurationException extends ConfigurationException
- implements EveException
+public class LdapConfigurationException extends ConfigurationException
+ implements LdapException
{
/**
* @see javax.naming.NoPermissionException#NoPermissionException()
*/
- public EveConfigurationException()
+ public LdapConfigurationException()
{
super();
}
@@ -46,7 +46,7 @@
/**
* @see javax.naming.NoPermissionException#NoPermissionException(String)
*/
- public EveConfigurationException( String explanation )
+ public LdapConfigurationException( String explanation )
{
super( explanation );
}
@@ -55,7 +55,7 @@
/**
* Always returns [EMAIL PROTECTED]
org.apache.ldap.common.message.ResultCodeEnum#OTHER}
*
- * @see EveException#getResultCode()
+ * @see LdapException#getResultCode()
*/
public ResultCodeEnum getResultCode()
{
Copied:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapException.java
(from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveException.java)
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapException.java
Mon Nov 1 20:41:30 2004
@@ -26,7 +26,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public interface EveException
+public interface LdapException
{
/**
* Gets the LDAP result code that would be associated with this exception.
Copied:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNameAlreadyBoundException.java
(from rev 56346,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNameAlreadyBoundException.java)
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNameAlreadyBoundException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNameAlreadyBoundException.java
Mon Nov 1 20:41:30 2004
@@ -19,7 +19,7 @@
import javax.naming.NameAlreadyBoundException;
-import org.apache.eve.exception.EveException;
+import org.apache.eve.exception.LdapException;
import org.apache.ldap.common.message.ResultCodeEnum;
@@ -29,13 +29,13 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class EveNameAlreadyBoundException extends NameAlreadyBoundException
- implements EveException
+public class LdapNameAlreadyBoundException extends NameAlreadyBoundException
+ implements LdapException
{
/**
* Always returns ResultCodeEnum.ENTRYALREADYEXISTS.
*
- * @see EveException#getResultCode()
+ * @see LdapException#getResultCode()
*/
public ResultCodeEnum getResultCode()
{
Copied:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNameNotFoundException.java
(from rev 56346,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNameNotFoundException.java)
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNameNotFoundException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNameNotFoundException.java
Mon Nov 1 20:41:30 2004
@@ -19,7 +19,7 @@
import javax.naming.NameNotFoundException;
-import org.apache.eve.exception.EveException;
+import org.apache.eve.exception.LdapException;
import org.apache.ldap.common.message.ResultCodeEnum;
@@ -29,7 +29,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class EveNameNotFoundException extends NameNotFoundException implements
EveException
+public class LdapNameNotFoundException extends NameNotFoundException
implements LdapException
{
public ResultCodeEnum getResultCode()
{
Copied:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNamingException.java
(from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNamingException.java)
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNamingException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNamingException.java
Mon Nov 1 20:41:30 2004
@@ -28,7 +28,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class EveNamingException extends NamingException implements EveException
+public class LdapNamingException extends NamingException implements
LdapException
{
/** the LDAP resultCode this exception is associated with */
private final ResultCodeEnum resultCode;
@@ -39,7 +39,7 @@
*
* @param resultCode the LDAP resultCode this exception is associated with
*/
- public EveNamingException( ResultCodeEnum resultCode )
+ public LdapNamingException( ResultCodeEnum resultCode )
{
super();
@@ -53,7 +53,7 @@
* @param explanation an explanation for the failure
* @param resultCode the LDAP resultCode this exception is associated with
*/
- public EveNamingException( String explanation, ResultCodeEnum resultCode )
+ public LdapNamingException( String explanation, ResultCodeEnum resultCode )
{
super( explanation );
Copied:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNoPermissionException.java
(from rev 56324,
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNoPermissionException.java)
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/EveNoPermissionException.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/exception/LdapNoPermissionException.java
Mon Nov 1 20:41:30 2004
@@ -26,18 +26,18 @@
* A NoPermissionException which associates a resultCode namely the
* [EMAIL PROTECTED] ResultCodeEnum#INSUFFICIENTACCESSRIGHTS} resultCode with
the exception.
*
- * @see EveException
+ * @see LdapException
* @see NoPermissionException
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class EveNoPermissionException extends NoPermissionException
- implements EveException
+public class LdapNoPermissionException extends NoPermissionException
+ implements LdapException
{
/**
* @see NoPermissionException#NoPermissionException()
*/
- public EveNoPermissionException()
+ public LdapNoPermissionException()
{
super();
}
@@ -46,7 +46,7 @@
/**
* @see NoPermissionException#NoPermissionException(String)
*/
- public EveNoPermissionException( String explanation )
+ public LdapNoPermissionException( String explanation )
{
super( explanation );
}
@@ -55,7 +55,7 @@
/**
* Always returns [EMAIL PROTECTED]
ResultCodeEnum#INSUFFICIENTACCESSRIGHTS}
*
- * @see EveException#getResultCode()
+ * @see LdapException#getResultCode()
*/
public ResultCodeEnum getResultCode()
{
Modified:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/AuthenticationService.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/AuthenticationService.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/AuthenticationService.java
Mon Nov 1 20:41:30 2004
@@ -27,9 +27,9 @@
import org.apache.eve.RootNexus;
import org.apache.eve.SystemPartition;
import org.apache.eve.auth.LdapPrincipal;
-import org.apache.eve.exception.EveAuthenticationNotSupportedException;
-import org.apache.eve.exception.EveNameNotFoundException;
-import org.apache.eve.exception.EveAuthenticationException;
+import org.apache.eve.exception.LdapAuthenticationNotSupportedException;
+import org.apache.eve.exception.LdapNameNotFoundException;
+import org.apache.eve.exception.LdapAuthenticationException;
import org.apache.eve.exception.*;
import org.apache.ldap.common.message.ResultCodeEnum;
import org.apache.ldap.common.util.ArrayUtils;
@@ -65,7 +65,7 @@
* @param nexus the root nexus to access all database partitions
*/
public AuthenticationService( RootNexus nexus, NameComponentNormalizer
normalizer,
- boolean allowAnonymous ) throws
EveNamingException
+ boolean allowAnonymous ) throws
LdapNamingException
{
this.nexus = nexus;
this.allowAnonymous = allowAnonymous;
@@ -75,7 +75,7 @@
}
catch ( IOException e )
{
- EveNamingException ene = new EveNamingException(
ResultCodeEnum.OTHER );
+ LdapNamingException ene = new LdapNamingException(
ResultCodeEnum.OTHER );
ene.setRootCause( e );
throw ene;
}
@@ -111,7 +111,7 @@
}
else
{
- throw new EveNoPermissionException( "" );
+ throw new LdapNoPermissionException( "" );
}
}
@@ -129,7 +129,7 @@
Attributes userEntry = nexus.lookup( principalDn );
if ( userEntry == null )
{
- throw new EveNameNotFoundException();
+ throw new LdapNameNotFoundException();
}
Object userPassword;
@@ -149,7 +149,7 @@
if ( ! ArrayUtils.isEquals( creds, userPassword ) )
{
- throw new EveAuthenticationException();
+ throw new LdapAuthenticationException();
}
synchronized( parser )
@@ -174,7 +174,7 @@
{
if ( "strong".equalsIgnoreCase( ( String ) env.get( TYPE ) ) )
{
- throw new EveAuthenticationNotSupportedException(
ResultCodeEnum.AUTHMETHODNOTSUPPORTED );
+ throw new LdapAuthenticationNotSupportedException(
ResultCodeEnum.AUTHMETHODNOTSUPPORTED );
}
// --------------------------------------------------------------------
@@ -203,7 +203,7 @@
}
// blow chuncks if we see any other authtype values
- throw new EveConfigurationException( "Unknown value for property "
+ TYPE + ": " + val );
+ throw new LdapConfigurationException( "Unknown value for property
" + TYPE + ": " + val );
}
// both are set
@@ -217,7 +217,7 @@
String msg = "Ambiguous configuration: " + TYPE;
msg += " is set to none and the security principal";
msg += " is set using " + PRINCIPAL + " as well";
- throw new EveConfigurationException( msg );
+ throw new LdapConfigurationException( msg );
}
// princial is set to the admin user if authType is "simple"
else if ( "simple".equalsIgnoreCase( ( String ) val ) )
@@ -226,7 +226,7 @@
}
// blow chuncks if we see any other authtype values
- throw new EveConfigurationException( "Unknown value for property "
+ TYPE + ": " + val );
+ throw new LdapConfigurationException( "Unknown value for property
" + TYPE + ": " + val );
}
// we have the principal key so we set that as the value
Modified:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/EveContextFactory.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/EveContextFactory.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/EveContextFactory.java
Mon Nov 1 20:41:30 2004
@@ -41,7 +41,7 @@
import org.apache.eve.RootNexus;
import org.apache.eve.SystemPartition;
import org.apache.eve.ApplicationPartition;
-import org.apache.eve.exception.EveConfigurationException;
+import org.apache.eve.exception.LdapConfigurationException;
import org.apache.eve.jndi.ibs.*;
import org.apache.eve.db.*;
import org.apache.eve.db.jdbm.JdbmDatabase;
@@ -198,20 +198,20 @@
String msg = "Ambiguous configuration: " + TYPE;
msg += " is set to none and the security principal";
msg += " is set using " + PRINCIPAL + " as well";
- throw new EveConfigurationException( msg );
+ throw new LdapConfigurationException( msg );
}
else if ( ! initialEnv.containsKey( PRINCIPAL ) &&
initialEnv.containsKey( TYPE ) &&
initialEnv.get( TYPE ).equals( "none" ) )
{
- throw new EveConfigurationException( "using authentication
type none "
+ throw new LdapConfigurationException( "using authentication
type none "
+ "for anonymous binds while trying to bootstrap Eve "
+ "- this is not allowed ONLY the admin can bootstrap"
);
}
else if ( initialEnv.containsKey( PRINCIPAL ) &&
! initialEnv.get( PRINCIPAL ).equals( ADMIN ) )
{
- throw new EveConfigurationException( "user "
+ throw new LdapConfigurationException( "user "
+ initialEnv.get( PRINCIPAL )
+ " is not allowed to bootstrap the system. ONLY the "
+ "admin can bootstrap" );
@@ -599,7 +599,7 @@
catch ( Exception e )
{
String msg = "failed while trying to parse system ldif file";
- NamingException ne = new EveConfigurationException( msg );
+ NamingException ne = new LdapConfigurationException( msg );
ne.setRootCause( e );
throw ne;
}
Modified:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/EveJndiProvider.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/EveJndiProvider.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/EveJndiProvider.java
Mon Nov 1 20:41:30 2004
@@ -20,7 +20,7 @@
import org.apache.eve.RootNexus;
import org.apache.eve.PartitionNexus;
import org.apache.eve.EveBackendSubsystem;
-import org.apache.eve.exception.EveNamingException;
+import org.apache.eve.exception.LdapNamingException;
import org.apache.ldap.common.message.ResultCodeEnum;
import java.util.Hashtable;
@@ -261,7 +261,7 @@
if ( invocation.getThrowable() == null )
{
- throw new EveNamingException( "Interceptor Framework Failure: "
+ throw new LdapNamingException( "Interceptor Framework Failure:
"
+ "failures on the proxied call should have a non null
"
+ "throwable associated with the Invocation object.",
ResultCodeEnum.OTHER );
@@ -273,7 +273,7 @@
// used for an optimization
BaseInterceptor.setInvocation( null );
- throw new EveNamingException( "Interceptor Framework Failure: "
+ throw new LdapNamingException( "Interceptor Framework Failure: "
+ "invocation handling should never have reached this line",
ResultCodeEnum.OTHER );
}
Modified:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/AuthorizationService.java
Mon Nov 1 20:41:30 2004
@@ -28,7 +28,7 @@
import org.apache.eve.SystemPartition;
import org.apache.eve.db.SearchResultFilter;
import org.apache.eve.db.DbSearchResult;
-import org.apache.eve.exception.EveNoPermissionException;
+import org.apache.eve.exception.LdapNoPermissionException;
import org.apache.eve.jndi.*;
import org.apache.ldap.common.name.NameComponentNormalizer;
import org.apache.ldap.common.name.DnParser;
@@ -98,7 +98,7 @@
String msg = "User " + principalDn;
msg += " does not have permission to delete the admin
account.";
msg += " No one not even the admin can delete this account!";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
if ( name.size() > 2 && name.startsWith( USER_BASE_DN )
@@ -107,7 +107,7 @@
String msg = "User " + principalDn;
msg += " does not have permission to delete the user account:
";
msg += name + ". Only the admin can delete user accounts.";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
if ( name.size() > 2 && name.startsWith( GROUP_BASE_DN )
@@ -116,7 +116,7 @@
String msg = "User " + principalDn;
msg += " does not have permission to delete the group entry: ";
msg += name + ". Only the admin can delete groups.";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
}
}
@@ -168,7 +168,7 @@
}
- private void protectModifyAlterations( Name dn ) throws
EveNoPermissionException
+ private void protectModifyAlterations( Name dn ) throws
LdapNoPermissionException
{
Invocation invocation = getInvocation();
@@ -182,7 +182,7 @@
{
String msg = "User " + principalDn;
msg += " does not have permission to modify the admin
account.";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
if ( dn.size() > 2 && dn.startsWith( USER_BASE_DN ) )
@@ -192,7 +192,7 @@
msg += " user " + dn + ".\nEven the owner of an account
cannot";
msg += " modify it.\nUser accounts can only be modified by
the";
msg += " administrator.";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
if ( dn.size() > 2 && dn.startsWith( GROUP_BASE_DN ) )
@@ -200,7 +200,7 @@
String msg = "User " + principalDn;
msg += " does not have permission to modify the group
entry ";
msg += dn + ".\nGroups can only be modified by the admin.";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
}
}
@@ -236,7 +236,7 @@
}
- private void protectDnAlterations( Name dn ) throws
EveNoPermissionException
+ private void protectDnAlterations( Name dn ) throws
LdapNoPermissionException
{
Invocation invocation = getInvocation();
@@ -250,7 +250,7 @@
msg += "' does not have permission to move or rename the
admin";
msg += " account. No one not even the admin can move or";
msg += " rename " + dn + "!";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
if ( dn.size() > 2 && dn.startsWith( USER_BASE_DN ) && !
principalDn.equals( ADMIN_DN ) )
@@ -259,7 +259,7 @@
msg += "' does not have permission to move or rename the user";
msg += " account: " + dn + ". Only the admin can move or";
msg += " rename user accounts.";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
if ( dn.size() > 2 && dn.startsWith( GROUP_BASE_DN ) && !
principalDn.equals( ADMIN_DN ) )
@@ -267,7 +267,7 @@
String msg = "User " + principalDn;
msg += " does not have permission to move or rename the group
entry ";
msg += dn + ".\nGroups can only be moved or renamed by the
admin.";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
}
}
@@ -332,7 +332,7 @@
String msg = "Access to user account '" + dn + "' not
permitted";
msg += " for user '" + principalDn + "'. Only the admin
can";
msg += " access user account information";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
if ( dn.size() > 2 && dn.startsWith( GROUP_BASE_DN ) )
@@ -340,7 +340,7 @@
String msg = "Access to group '" + dn + "' not permitted";
msg += " for user '" + principalDn + "'. Only the admin
can";
msg += " access group information";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
if ( dn.equals( ADMIN_DN ) )
@@ -348,7 +348,7 @@
String msg = "Access to admin account not permitted for
user '";
msg += principalDn + "'. Only the admin can";
msg += " access admin account information";
- throw new EveNoPermissionException( msg );
+ throw new LdapNoPermissionException( msg );
}
}
}
Modified:
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/EveExceptionService.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/EveExceptionService.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/java/org/apache/eve/jndi/ibs/EveExceptionService.java
Mon Nov 1 20:41:30 2004
@@ -22,12 +22,12 @@
import javax.naming.directory.Attributes;
import org.apache.eve.jndi.*;
-import org.apache.eve.exception.EveNameNotFoundException;
-import org.apache.eve.exception.EveNameAlreadyBoundException;
+import org.apache.eve.exception.LdapNameNotFoundException;
+import org.apache.eve.exception.LdapNameAlreadyBoundException;
import org.apache.eve.RootNexus;
import org.apache.eve.exception.EveInterceptorException;
-import org.apache.eve.exception.EveException;
+import org.apache.eve.exception.LdapException;
/**
@@ -74,12 +74,12 @@
{
EveInterceptorException eie = ( EveInterceptorException )
t;
- if ( eie.getRootCause() != null && ( eie instanceof
EveException ) )
+ if ( eie.getRootCause() != null && ( eie instanceof
LdapException ) )
{
invocation.setBeforeFailure( eie.getRootCause() );
}
- else if ( eie.getCause() != null && ( eie instanceof
EveException ) )
+ else if ( eie.getCause() != null && ( eie instanceof
LdapException ) )
{
invocation.setBeforeFailure( eie.getCause() );
}
@@ -93,12 +93,12 @@
{
EveInterceptorException eie = ( EveInterceptorException )
t;
- if ( eie.getRootCause() != null && ( eie instanceof
EveException ) )
+ if ( eie.getRootCause() != null && ( eie instanceof
LdapException ) )
{
invocation.setAfterFailure( eie.getRootCause() );
}
- else if ( eie.getCause() != null && ( eie instanceof
EveException ) )
+ else if ( eie.getCause() != null && ( eie instanceof
LdapException ) )
{
invocation.setAfterFailure( eie.getCause() );
}
@@ -125,7 +125,7 @@
{
if ( nexus.hasEntry( normName ) )
{
- NamingException ne = new EveNameAlreadyBoundException();
+ NamingException ne = new LdapNameAlreadyBoundException();
invocation.setBeforeFailure( ne );
throw ne;
}
@@ -144,7 +144,7 @@
{
if ( ! nexus.hasEntry( dn ) )
{
- NamingException ne = new EveNameNotFoundException();
+ NamingException ne = new LdapNameNotFoundException();
invocation.setBeforeFailure( ne );
throw ne;
}
Modified:
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/DestroyContextTest.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/DestroyContextTest.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/DestroyContextTest.java
Mon Nov 1 20:41:30 2004
@@ -19,7 +19,7 @@
import javax.naming.NamingException;
-import org.apache.eve.exception.EveNameNotFoundException;
+import org.apache.eve.exception.LdapNameNotFoundException;
/**
@@ -60,7 +60,7 @@
}
catch( NamingException e )
{
- assertTrue( e instanceof EveNameNotFoundException );
+ assertTrue( e instanceof LdapNameNotFoundException );
}
/*
@@ -75,7 +75,7 @@
}
catch( NamingException e )
{
- assertTrue( e instanceof EveNameNotFoundException );
+ assertTrue( e instanceof LdapNameNotFoundException );
}
/*
@@ -90,7 +90,7 @@
}
catch( NamingException e )
{
- assertTrue( e instanceof EveNameNotFoundException );
+ assertTrue( e instanceof LdapNameNotFoundException );
}
@@ -106,7 +106,7 @@
}
catch( NamingException e )
{
- assertTrue( e instanceof EveNameNotFoundException );
+ assertTrue( e instanceof LdapNameNotFoundException );
}
}
Modified:
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/ImportConfirmationTest.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/ImportConfirmationTest.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/ImportConfirmationTest.java
Mon Nov 1 20:41:30 2004
@@ -30,7 +30,7 @@
import org.apache.ldap.common.ldif.LdifIterator;
import org.apache.ldap.common.message.LockableAttributesImpl;
import org.apache.ldap.common.name.LdapName;
-import org.apache.eve.exception.EveConfigurationException;
+import org.apache.eve.exception.LdapConfigurationException;
/**
@@ -86,7 +86,7 @@
catch ( Exception e )
{
String msg = "failed while trying to parse system ldif file";
- NamingException ne = new EveConfigurationException( msg );
+ NamingException ne = new LdapConfigurationException( msg );
ne.setRootCause( e );
throw ne;
}
Modified:
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/SimpleAuthenticationTest.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/SimpleAuthenticationTest.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/SimpleAuthenticationTest.java
Mon Nov 1 20:41:30 2004
@@ -26,8 +26,8 @@
import javax.naming.ldap.LdapContext;
import org.apache.ldap.common.util.ArrayUtils;
-import org.apache.eve.exception.EveNoPermissionException;
-import org.apache.eve.exception.EveConfigurationException;
+import org.apache.eve.exception.LdapNoPermissionException;
+import org.apache.eve.exception.LdapConfigurationException;
/**
@@ -187,10 +187,10 @@
setSysRoot( env );
fail( "should not get here due to exception" );
}
- catch( EveConfigurationException e )
+ catch( LdapConfigurationException e )
{
}
- catch( EveNoPermissionException e )
+ catch( LdapNoPermissionException e )
{
}
@@ -212,10 +212,10 @@
fail( "should not get here due to exception cuz anonymous user is "
+ "not allowed read access to the admin account entry" );
}
- catch( EveConfigurationException e )
+ catch( LdapConfigurationException e )
{
}
- catch( EveNoPermissionException e )
+ catch( LdapNoPermissionException e )
{
}
}
Modified:
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/ibs/AuthorizationServiceTest.java
==============================================================================
---
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/ibs/AuthorizationServiceTest.java
(original)
+++
incubator/directory/eve/trunk/jndi-provider/src/test/org/apache/eve/jndi/ibs/AuthorizationServiceTest.java
Mon Nov 1 20:41:30 2004
@@ -25,7 +25,7 @@
import javax.naming.directory.SearchControls;
import org.apache.eve.jndi.AbstractMultiUserJndiTest;
-import org.apache.eve.exception.EveNoPermissionException;
+import org.apache.eve.exception.LdapNoPermissionException;
import org.apache.eve.db.DbSearchResult;
import org.apache.ldap.common.message.LockableAttributesImpl;
@@ -51,7 +51,7 @@
sysRoot.destroySubcontext( "uid=admin" );
fail( "admin should not be able to delete his account" );
}
- catch ( EveNoPermissionException e )
+ catch ( LdapNoPermissionException e )
{
assertNotNull( e );
}
@@ -71,7 +71,7 @@
fail( sysRootAsNonAdminUser.getPrincipal().getDn()
+ " should not be able to delete his account" );
}
- catch ( EveNoPermissionException e )
+ catch ( LdapNoPermissionException e )
{
assertNotNull( e );
}
@@ -90,7 +90,7 @@
sysRoot.rename( "uid=admin", "uid=alex" );
fail( "admin should not be able to rename his account" );
}
- catch ( EveNoPermissionException e )
+ catch ( LdapNoPermissionException e )
{
assertNotNull( e );
}
@@ -109,7 +109,7 @@
sysRootAsNonAdminUser.rename( "uid=admin", "uid=alex" );
fail( "admin should not be able to rename his account" );
}
- catch ( EveNoPermissionException e )
+ catch ( LdapNoPermissionException e )
{
assertNotNull( e );
}