directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r951068 [4/6] - in /directory: apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ apacheds/trunk/core-api/src/main/java/org/apac...
Date Thu, 03 Jun 2010 17:05:29 GMT
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java Thu Jun  3 17:05:26 2010
@@ -45,6 +45,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -92,7 +93,7 @@ public class CollectiveAttributeIntercep
     };
 
 
-    public void init( DirectoryService directoryService ) throws Exception
+    public void init( DirectoryService directoryService ) throws LdapException
     {
         super.init( directoryService );
         schemaManager = directoryService.getSchemaManager();
@@ -113,7 +114,7 @@ public class CollectiveAttributeIntercep
      * @param retAttrs array or attribute type to be specifically included in the result entry(s)
      * @throws NamingException if there are problems accessing subentries
      */
-    private void addCollectiveAttributes( OperationContext opContext, Entry entry, String[] retAttrs ) throws Exception
+    private void addCollectiveAttributes( OperationContext opContext, Entry entry, String[] retAttrs ) throws LdapException
     {
         EntryAttribute collectiveAttributeSubentries = ( ( ClonedServerEntry ) entry ).getOriginalEntry().get(
             SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
@@ -278,7 +279,7 @@ public class CollectiveAttributeIntercep
     }
 
 
-    private Set<AttributeType> getAllSuperTypes( AttributeType id ) throws Exception
+    private Set<AttributeType> getAllSuperTypes( AttributeType id ) throws LdapException
     {
         Set<AttributeType> allSuperTypes = new HashSet<AttributeType>();
         AttributeType superType = id;
@@ -301,7 +302,7 @@ public class CollectiveAttributeIntercep
     // Interceptor Method Overrides
     // ------------------------------------------------------------------------
 
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws Exception
+    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws LdapException
     {
         Entry result = nextInterceptor.lookup( opContext );
 
@@ -324,7 +325,7 @@ public class CollectiveAttributeIntercep
 
 
     public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         EntryFilteringCursor cursor = nextInterceptor.list( opContext );
         cursor.addEntryFilter( SEARCH_FILTER );
@@ -333,7 +334,7 @@ public class CollectiveAttributeIntercep
 
 
     public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         EntryFilteringCursor cursor = nextInterceptor.search( opContext );
         cursor.addEntryFilter( SEARCH_FILTER );
@@ -345,7 +346,7 @@ public class CollectiveAttributeIntercep
     // Partial Schema Checking
     // ------------------------------------------------------------------------
 
-    public void add( NextInterceptor next, AddOperationContext opContext ) throws Exception
+    public void add( NextInterceptor next, AddOperationContext opContext ) throws LdapException
     {
         collectiveAttributesSchemaChecker.checkAdd( opContext.getDn(), opContext.getEntry() );
 
@@ -353,7 +354,7 @@ public class CollectiveAttributeIntercep
     }
 
 
-    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws LdapException
     {
         collectiveAttributesSchemaChecker.checkModify( opContext );
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java Thu Jun  3 17:05:26 2010
@@ -23,8 +23,6 @@ package org.apache.directory.server.core
 import java.util.List;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.i18n.I18n;
@@ -60,7 +58,7 @@ public class CollectiveAttributesSchemaC
     }
 
 
-    /* package scope*/void checkAdd( DN normName, Entry entry ) throws Exception
+    /* package scope*/void checkAdd( DN normName, Entry entry ) throws LdapException
     {
         if ( entry.hasObjectClass( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRY_OC ) )
         {
@@ -77,7 +75,7 @@ public class CollectiveAttributesSchemaC
     }
 
 
-    public void checkModify( ModifyOperationContext opContext ) throws Exception
+    public void checkModify( ModifyOperationContext opContext ) throws LdapException
     {
         List<Modification> mods = opContext.getModItems();
         Entry originalEntry = opContext.getEntry();
@@ -140,7 +138,7 @@ public class CollectiveAttributesSchemaC
     }
 
 
-    private boolean containsAnyCollectiveAttributes( Entry entry ) throws NamingException
+    private boolean containsAnyCollectiveAttributes( Entry entry ) throws LdapException
     {
         Set<AttributeType> attributeTypes = entry.getAttributeTypes();
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java Thu Jun  3 17:05:26 2010
@@ -43,6 +43,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.normalization.FilterNormalizingVisitor;
 import org.apache.directory.server.core.partition.ByPassConstants;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
@@ -74,7 +75,7 @@ public class EventInterceptor extends Ba
 
 
     @Override
-    public void init( DirectoryService ds ) throws Exception
+    public void init( DirectoryService ds ) throws LdapException
     {
         LOG.info( "Initializing ..." );
         super.init( ds );
@@ -145,7 +146,7 @@ public class EventInterceptor extends Ba
     }
 
 
-    public void add( NextInterceptor next, final AddOperationContext opContext ) throws Exception
+    public void add( NextInterceptor next, final AddOperationContext opContext ) throws LdapException
     {
         next.add( opContext );
         List<RegistrationEntry> selecting = getSelectingRegistrations( opContext.getDn(), opContext.getEntry() );
@@ -165,7 +166,7 @@ public class EventInterceptor extends Ba
     }
 
 
-    public void delete( NextInterceptor next, final DeleteOperationContext opContext ) throws Exception
+    public void delete( NextInterceptor next, final DeleteOperationContext opContext ) throws LdapException
     {
         List<RegistrationEntry> selecting = getSelectingRegistrations( opContext.getDn(), opContext.getEntry() );
         next.delete( opContext );
@@ -185,7 +186,7 @@ public class EventInterceptor extends Ba
     }
 
 
-    public void modify( NextInterceptor next, final ModifyOperationContext opContext ) throws Exception
+    public void modify( NextInterceptor next, final ModifyOperationContext opContext ) throws LdapException
     {
         Entry oriEntry = opContext.getEntry();
 
@@ -212,7 +213,7 @@ public class EventInterceptor extends Ba
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws Exception
+    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws LdapException
     {
         Entry oriEntry = opContext.lookup( opContext.getDn(), ByPassConstants.LOOKUP_BYPASS );
         List<RegistrationEntry> selecting = getSelectingRegistrations( opContext.getDn(), oriEntry );
@@ -238,7 +239,7 @@ public class EventInterceptor extends Ba
     }
 
 
-    public void moveAndRename( NextInterceptor next, final MoveAndRenameOperationContext opContext ) throws Exception
+    public void moveAndRename( NextInterceptor next, final MoveAndRenameOperationContext opContext ) throws LdapException
     {
         Entry oriEntry = opContext.lookup( opContext.getDn(), ByPassConstants.LOOKUP_BYPASS );
         List<RegistrationEntry> selecting = getSelectingRegistrations( opContext.getDn(), oriEntry );
@@ -268,7 +269,7 @@ public class EventInterceptor extends Ba
     }
 
 
-    public void move( NextInterceptor next, MoveOperationContext opContext ) throws Exception
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws LdapException
     {
         Entry oriEntry = opContext.lookup( opContext.getDn(), ByPassConstants.LOOKUP_BYPASS );
         List<RegistrationEntry> selecting = getSelectingRegistrations( opContext.getDn(), oriEntry );
@@ -290,7 +291,7 @@ public class EventInterceptor extends Ba
     }
 
 
-    List<RegistrationEntry> getSelectingRegistrations( DN name, Entry entry ) throws Exception
+    List<RegistrationEntry> getSelectingRegistrations( DN name, Entry entry ) throws LdapException
     {
         if ( registrations.isEmpty() )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Thu Jun  3 17:05:26 2010
@@ -55,7 +55,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapAliasException;
 import org.apache.directory.shared.ldap.exception.LdapAttributeInUseException;
 import org.apache.directory.shared.ldap.exception.LdapEntryAlreadyExistsException;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchObjectException;
+import org.apache.directory.shared.ldap.exception.LdapOperationException;
 import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.DN;
@@ -110,7 +112,7 @@ public class ExceptionInterceptor extend
     }
 
 
-    public void init( DirectoryService directoryService ) throws Exception
+    public void init( DirectoryService directoryService ) throws LdapException
     {
         this.directoryService = directoryService;
         nexus = directoryService.getPartitionNexus();
@@ -129,7 +131,7 @@ public class ExceptionInterceptor extend
      * In the pre-invocation state this interceptor method checks to see if the entry to be added already exists.  If it
      * does an exception is raised.
      */
-    public void add( NextInterceptor nextInterceptor, AddOperationContext opContext ) throws Exception
+    public void add( NextInterceptor nextInterceptor, AddOperationContext opContext ) throws LdapException
     {
         DN name = opContext.getDn();
 
@@ -213,7 +215,7 @@ public class ExceptionInterceptor extend
      * Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate
      * LdapException.
      */
-    public void delete( NextInterceptor nextInterceptor, DeleteOperationContext opContext ) throws Exception
+    public void delete( NextInterceptor nextInterceptor, DeleteOperationContext opContext ) throws LdapException
     {
         DN dn = opContext.getDn();
 
@@ -240,7 +242,7 @@ public class ExceptionInterceptor extend
      * Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
      */
     public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         if ( opContext.getDn().getNormName().equals( subschemSubentryDn.getNormName() ) )
         {
@@ -259,7 +261,7 @@ public class ExceptionInterceptor extend
     /**
      * Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
      */
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws Exception
+    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws LdapException
     {
         DN dn = opContext.getDn();
 
@@ -285,7 +287,7 @@ public class ExceptionInterceptor extend
     /**
      * Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
      */
-    public void modify( NextInterceptor nextInterceptor, ModifyOperationContext opContext ) throws Exception
+    public void modify( NextInterceptor nextInterceptor, ModifyOperationContext opContext ) throws LdapException
     {
         // check if entry to modify exists
         String msg = "Attempt to modify non-existant entry: ";
@@ -348,7 +350,7 @@ public class ExceptionInterceptor extend
     /**
      * Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.
      */
-    public void rename( NextInterceptor nextInterceptor, RenameOperationContext opContext ) throws Exception
+    public void rename( NextInterceptor nextInterceptor, RenameOperationContext opContext ) throws LdapException
     {
         DN dn = opContext.getDn();
 
@@ -397,7 +399,7 @@ public class ExceptionInterceptor extend
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void move( NextInterceptor nextInterceptor, MoveOperationContext opContext ) throws Exception
+    public void move( NextInterceptor nextInterceptor, MoveOperationContext opContext ) throws LdapException
     {
         DN oriChildName = opContext.getDn();
         DN newParentName = opContext.getParent();
@@ -452,7 +454,7 @@ public class ExceptionInterceptor extend
      * LdapException.
      */
     public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         DN oriChildName = opContext.getDn();
         DN parent = opContext.getParent();
@@ -504,7 +506,7 @@ public class ExceptionInterceptor extend
      * Checks to see the entry being searched exists, otherwise throws the appropriate LdapException.
      */
     public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         DN base = opContext.getDn();
 
@@ -525,7 +527,7 @@ public class ExceptionInterceptor extend
         {
             String msg = I18n.err( I18n.ERR_259 );
             assertHasEntry( opContext, msg, opContext.getDn() );
-            throw ne;
+            throw new LdapOperationException( msg );
         }
     }
 
@@ -538,7 +540,7 @@ public class ExceptionInterceptor extend
      * @throws Exception if the entry does not exist
      * @param nextInterceptor the next interceptor in the chain
      */
-    private void assertHasEntry( OperationContext opContext, String msg ) throws Exception
+    private void assertHasEntry( OperationContext opContext, String msg ) throws LdapException
     {
         DN dn = opContext.getDn();
 
@@ -574,7 +576,7 @@ public class ExceptionInterceptor extend
      * @throws Exception if the entry does not exist
      * @param nextInterceptor the next interceptor in the chain
      */
-    private void assertHasEntry( OperationContext opContext, String msg, DN dn ) throws Exception
+    private void assertHasEntry( OperationContext opContext, String msg, DN dn ) throws LdapException
     {
         if ( subschemSubentryDn.equals( dn ) )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java Thu Jun  3 17:05:26 2010
@@ -20,6 +20,7 @@ package org.apache.directory.server.core
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.LdapPrincipal;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -104,7 +105,7 @@ public class DefaultJournal implements J
     /**
      * {@inheritDoc}
      */
-    public void log( LdapPrincipal principal, long revision, LdifEntry entry ) throws Exception
+    public void log( LdapPrincipal principal, long revision, LdifEntry entry ) throws LdapException
     {
         store.log( principal, revision, entry );
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java Thu Jun  3 17:05:26 2010
@@ -31,8 +31,9 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
-import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.ldif.ChangeType;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -68,7 +69,7 @@ public class JournalInterceptor extends 
      * The init method will initialize the local variables and load the 
      * entryDeleted AttributeType.
      */
-    public void init( DirectoryService directoryService ) throws Exception
+    public void init( DirectoryService directoryService ) throws LdapException
     {
         super.init( directoryService );
         
@@ -86,7 +87,7 @@ public class JournalInterceptor extends 
     /**
      * Log the operation, manage the logs rotations.
      */
-    private void log( long revision, LdifEntry ldif ) throws Exception
+    private void log( long revision, LdifEntry ldif ) throws LdapException
     {
         journal.log( getPrincipal(), revision, ldif );
     }
@@ -98,7 +99,7 @@ public class JournalInterceptor extends 
     /**
      * {@inheritDoc}
      */
-    public void add( NextInterceptor next, AddOperationContext opContext ) throws Exception
+    public void add( NextInterceptor next, AddOperationContext opContext ) throws LdapException
     {
         long opRevision = 0;
         
@@ -133,14 +134,15 @@ public class JournalInterceptor extends 
                 journal.ack( opRevision );
             }
         }
-        catch( Exception e )
+        catch( LdapException le )
         {
             if ( journalEnabled )
             {
                 // log the NACK
                 journal.nack( opRevision );
             }
-            throw e;
+            
+            throw le;
         }
     }
 
@@ -148,7 +150,7 @@ public class JournalInterceptor extends 
     /**
      * {@inheritDoc}
      */
-    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws Exception
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws LdapException
     {
         long opRevision = 0;
         
@@ -174,13 +176,14 @@ public class JournalInterceptor extends 
                 journal.ack( opRevision );
             }
         }
-        catch( Exception e )
+        catch( LdapException e )
         {
             if ( journalEnabled )
             {
                 // log the NACK
                 journal.nack( opRevision );
             }
+            
             throw e;
         }
     }
@@ -189,7 +192,7 @@ public class JournalInterceptor extends 
     /**
      * {@inheritDoc}
      */
-    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws LdapException
     {
         long opRevision = 0;
         
@@ -221,7 +224,7 @@ public class JournalInterceptor extends 
                 journal.ack( opRevision );
             }
         }
-        catch( Exception e )
+        catch( LdapException e )
         {
             if ( journalEnabled )
             {
@@ -236,7 +239,7 @@ public class JournalInterceptor extends 
     /**
      * {@inheritDoc}
      */
-    public void rename ( NextInterceptor next, RenameOperationContext opContext ) throws Exception
+    public void rename ( NextInterceptor next, RenameOperationContext opContext ) throws LdapException
     {
         long opRevision = 0;
         
@@ -264,13 +267,14 @@ public class JournalInterceptor extends 
                 journal.ack( opRevision );
             }
         }
-        catch( Exception e )
+        catch( LdapException e )
         {
             if ( journalEnabled )
             {
                 // log the NACK
                 journal.nack( opRevision );
             }
+            
             throw e;
         }
     }
@@ -280,7 +284,7 @@ public class JournalInterceptor extends 
      * {@inheritDoc}
      */
     public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         long opRevision = 0;
         
@@ -309,13 +313,14 @@ public class JournalInterceptor extends 
                 journal.ack( opRevision );
             }
         }
-        catch( Exception e )
+        catch( LdapException e )
         {
             if ( journalEnabled )
             {
                 // log the NACK
                 journal.nack( opRevision );
             }
+            
             throw e;
         }
     }
@@ -324,7 +329,7 @@ public class JournalInterceptor extends 
     /**
      * {@inheritDoc}
      */
-    public void move( NextInterceptor next, MoveOperationContext opContext ) throws Exception
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws LdapException
     {
         long opRevision = 0;
         
@@ -351,13 +356,14 @@ public class JournalInterceptor extends 
                 journal.ack( opRevision );
             }
         }
-        catch( Exception e )
+        catch( LdapException e )
         {
             if ( journalEnabled )
             {
                 // log the NACK
                 journal.nack( opRevision );
             }
+            
             throw e;
         }
    }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java Thu Jun  3 17:05:26 2010
@@ -172,7 +172,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void add( NextInterceptor next, AddOperationContext opContext ) throws Exception
+    public void add( NextInterceptor next, AddOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         next.add( opContext );
@@ -201,7 +201,7 @@ public class TimerInterceptor implements
      * {@inheritDoc}
      */
     public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         long t0 = System.nanoTime();
         next.addContextPartition( opContext );
@@ -259,7 +259,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws Exception
+    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         boolean compare = next.compare( opContext );
@@ -289,7 +289,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws Exception
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         next.delete( opContext );
@@ -335,7 +335,7 @@ public class TimerInterceptor implements
      * {@inheritDoc}
      */
     public ClonedServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         long t0 = System.nanoTime();
         Entry rootDSE = next.getRootDSE( opContext );
@@ -365,7 +365,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public boolean hasEntry( NextInterceptor next, EntryOperationContext opContext ) throws Exception
+    public boolean hasEntry( NextInterceptor next, EntryOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         boolean hasEntry = next.hasEntry( opContext );
@@ -395,7 +395,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void init( DirectoryService directoryService ) throws Exception
+    public void init( DirectoryService directoryService ) throws LdapException
     {
     }
 
@@ -403,7 +403,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor list( NextInterceptor next, ListOperationContext opContext ) throws Exception
+    public EntryFilteringCursor list( NextInterceptor next, ListOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         EntryFilteringCursor cursor = next.list( opContext );
@@ -433,7 +433,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public Entry lookup( NextInterceptor next, LookupOperationContext opContext ) throws Exception
+    public Entry lookup( NextInterceptor next, LookupOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         Entry entry = next.lookup( opContext );
@@ -463,7 +463,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         next.modify( opContext );
@@ -491,7 +491,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void move( NextInterceptor next, MoveOperationContext opContext ) throws Exception
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         next.move( opContext );
@@ -519,7 +519,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext ) throws Exception
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         next.moveAndRename( opContext );
@@ -547,7 +547,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws Exception
+    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         next.rename( opContext );
@@ -575,7 +575,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext opContext ) throws Exception
+    public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         EntryFilteringCursor cursor = next.search( opContext );
@@ -633,7 +633,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public DN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext ) throws Exception
+    public DN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         DN dn = next.getMatchedName( opContext );
@@ -663,7 +663,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public DN getSuffix( NextInterceptor next, GetSuffixOperationContext opContext ) throws Exception
+    public DN getSuffix( NextInterceptor next, GetSuffixOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         DN dn = next.getSuffix( opContext );
@@ -693,7 +693,7 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public Set<String> listSuffixes( NextInterceptor next, ListSuffixOperationContext opContext ) throws Exception
+    public Set<String> listSuffixes( NextInterceptor next, ListSuffixOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();
         Set<String> suffixes = next.listSuffixes( opContext );
@@ -724,7 +724,7 @@ public class TimerInterceptor implements
      * {@inheritDoc}
      */
     public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         long t0 = System.nanoTime();
         next.removeContextPartition( opContext );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java Thu Jun  3 17:05:26 2010
@@ -91,7 +91,7 @@ public class NormalizationInterceptor ex
     /**
      * Initialize the registries, normalizers. 
      */
-    public void init( DirectoryService directoryService ) throws Exception
+    public void init( DirectoryService directoryService ) throws LdapException
     {
         LOG.debug( "Initialiazing the NormalizationInterceptor" );
 
@@ -115,7 +115,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void add( NextInterceptor nextInterceptor, AddOperationContext opContext ) throws Exception
+    public void add( NextInterceptor nextInterceptor, AddOperationContext opContext ) throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
         opContext.getEntry().getDn().normalize( schemaManager.getNormalizerMapping() );
@@ -127,7 +127,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void delete( NextInterceptor nextInterceptor, DeleteOperationContext opContext ) throws Exception
+    public void delete( NextInterceptor nextInterceptor, DeleteOperationContext opContext ) throws LdapException
     {
         DN dn = opContext.getDn();
 
@@ -143,7 +143,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void modify( NextInterceptor nextInterceptor, ModifyOperationContext opContext ) throws Exception
+    public void modify( NextInterceptor nextInterceptor, ModifyOperationContext opContext ) throws LdapException
     {
         if ( !opContext.getDn().isNormalized() )
         {
@@ -157,7 +157,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void rename( NextInterceptor nextInterceptor, RenameOperationContext opContext ) throws Exception
+    public void rename( NextInterceptor nextInterceptor, RenameOperationContext opContext ) throws LdapException
     {
         // Normalize the new RDN and the DN
         opContext.getNewRdn().normalize( schemaManager.getNormalizerMapping() );
@@ -172,7 +172,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void move( NextInterceptor nextInterceptor, MoveOperationContext opContext ) throws Exception
+    public void move( NextInterceptor nextInterceptor, MoveOperationContext opContext ) throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
         opContext.getParent().normalize( schemaManager.getNormalizerMapping() );
@@ -184,7 +184,7 @@ public class NormalizationInterceptor ex
      * {@inheritDoc}
      */
     public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         DN rdn = new DN();
         rdn.add( opContext.getNewRdn() );
@@ -201,7 +201,7 @@ public class NormalizationInterceptor ex
      * {@inheritDoc}
      */
     public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         DN dn = opContext.getDn();
 
@@ -234,7 +234,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public boolean hasEntry( NextInterceptor nextInterceptor, EntryOperationContext opContext ) throws Exception
+    public boolean hasEntry( NextInterceptor nextInterceptor, EntryOperationContext opContext ) throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
         return nextInterceptor.hasEntry( opContext );
@@ -245,7 +245,7 @@ public class NormalizationInterceptor ex
      * {@inheritDoc}
      */
     public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
         return nextInterceptor.list( opContext );
@@ -255,7 +255,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    private String[] normalizeAttrsId( String[] attrIds ) throws Exception
+    private String[] normalizeAttrsId( String[] attrIds ) throws LdapException
     {
         if ( attrIds == null )
         {
@@ -278,7 +278,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws Exception
+    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
 
@@ -301,7 +301,7 @@ public class NormalizationInterceptor ex
      * {@inheritDoc}
      */
     public DN getMatchedName( NextInterceptor nextInterceptor, GetMatchedNameOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
         return nextInterceptor.getMatchedName( opContext );
@@ -311,7 +311,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public DN getSuffix( NextInterceptor nextInterceptor, GetSuffixOperationContext opContext ) throws Exception
+    public DN getSuffix( NextInterceptor nextInterceptor, GetSuffixOperationContext opContext ) throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
         return nextInterceptor.getSuffix( opContext );
@@ -321,7 +321,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws Exception
+    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
 
@@ -352,7 +352,7 @@ public class NormalizationInterceptor ex
      * {@inheritDoc}
      */
     public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
         next.addContextPartition( opContext );
@@ -363,7 +363,7 @@ public class NormalizationInterceptor ex
      * {@inheritDoc}
      */
     public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
         next.removeContextPartition( opContext );
@@ -376,7 +376,7 @@ public class NormalizationInterceptor ex
      * @param dn the DN
      * @param entry the entry
      */
-    private void addRdnAttributesToEntry( DN dn, Entry entry ) throws Exception
+    private void addRdnAttributesToEntry( DN dn, Entry entry ) throws LdapException
     {
         if ( dn == null || entry == null )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Thu Jun  3 17:05:26 2010
@@ -54,6 +54,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -132,7 +133,7 @@ public class OperationalAttributeInterce
     }
 
 
-    public void init( DirectoryService directoryService ) throws Exception
+    public void init( DirectoryService directoryService ) throws LdapException
     {
         service = directoryService;
         schemaManager = directoryService.getSchemaManager();
@@ -167,7 +168,7 @@ public class OperationalAttributeInterce
      * - entryCSN
      * - entryUUID 
      */
-    public void add( NextInterceptor nextInterceptor, AddOperationContext opContext ) throws Exception
+    public void add( NextInterceptor nextInterceptor, AddOperationContext opContext ) throws LdapException
     {
         String principal = getPrincipal().getName();
 
@@ -245,7 +246,7 @@ public class OperationalAttributeInterce
     /**
      * {@inheritDoc}
      */
-    public void modify( NextInterceptor nextInterceptor, ModifyOperationContext opContext ) throws Exception
+    public void modify( NextInterceptor nextInterceptor, ModifyOperationContext opContext ) throws LdapException
     {
         // We must check that the user hasn't injected either the modifiersName
         // or the modifyTimestamp operational attributes : they are not supposed to be
@@ -319,7 +320,7 @@ public class OperationalAttributeInterce
     }
 
 
-    public void rename( NextInterceptor nextInterceptor, RenameOperationContext opContext ) throws Exception
+    public void rename( NextInterceptor nextInterceptor, RenameOperationContext opContext ) throws LdapException
     {
         nextInterceptor.rename( opContext );
 
@@ -340,7 +341,7 @@ public class OperationalAttributeInterce
     }
 
 
-    public void move( NextInterceptor nextInterceptor, MoveOperationContext opContext ) throws Exception
+    public void move( NextInterceptor nextInterceptor, MoveOperationContext opContext ) throws LdapException
     {
         nextInterceptor.move( opContext );
 
@@ -360,7 +361,7 @@ public class OperationalAttributeInterce
 
 
     public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         nextInterceptor.moveAndRename( opContext );
 
@@ -379,7 +380,7 @@ public class OperationalAttributeInterce
     }
 
 
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws Exception
+    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws LdapException
     {
         Entry result = nextInterceptor.lookup( opContext );
 
@@ -403,7 +404,7 @@ public class OperationalAttributeInterce
 
 
     public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         EntryFilteringCursor cursor = nextInterceptor.list( opContext );
         cursor.addEntryFilter( SEARCH_FILTER );
@@ -412,7 +413,7 @@ public class OperationalAttributeInterce
 
 
     public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         EntryFilteringCursor cursor = nextInterceptor.search( opContext );
 
@@ -440,7 +441,7 @@ public class OperationalAttributeInterce
      * @return true always
      * @throws Exception if there are failures in evaluation
      */
-    private boolean filterOperationalAttributes( Entry attributes ) throws Exception
+    private boolean filterOperationalAttributes( Entry attributes ) throws LdapException
     {
         Set<AttributeType> removedAttributes = new HashSet<AttributeType>();
 
@@ -463,7 +464,7 @@ public class OperationalAttributeInterce
     }
 
 
-    private void filter( LookupOperationContext lookupContext, Entry entry ) throws Exception
+    private void filter( LookupOperationContext lookupContext, Entry entry ) throws LdapException
     {
         DN dn = lookupContext.getDn();
         List<String> ids = lookupContext.getAttrsId();
@@ -496,7 +497,7 @@ public class OperationalAttributeInterce
     }
 
 
-    public void denormalizeEntryOpAttrs( Entry entry ) throws Exception
+    public void denormalizeEntryOpAttrs( Entry entry ) throws LdapException
     {
         if ( service.isDenormalizeOpAttrsEnabled() )
         {
@@ -541,7 +542,7 @@ public class OperationalAttributeInterce
      * @return the distinuished name denormalized
      * @throws Exception if there are problems denormalizing
      */
-    public DN denormalizeTypes( DN dn ) throws Exception
+    public DN denormalizeTypes( DN dn ) throws LdapException
     {
         DN newDn = new DN();
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Thu Jun  3 17:05:26 2010
@@ -33,7 +33,6 @@ import java.util.Set;
 import java.util.UUID;
 
 import javax.naming.ConfigurationException;
-import javax.naming.NameNotFoundException;
 import javax.naming.directory.SearchControls;
 
 import org.apache.directory.server.constants.ServerDNConstants;
@@ -93,6 +92,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeTypeException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchObjectException;
+import org.apache.directory.shared.ldap.exception.LdapOperationErrorException;
+import org.apache.directory.shared.ldap.exception.LdapOtherException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
@@ -536,7 +537,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#add(org.apache.directory.server.core.interceptor.context.AddOperationContext)
      */
-    public void add( AddOperationContext addContext ) throws Exception
+    public void add( AddOperationContext addContext ) throws LdapException
     {
         Partition backend = getPartition( addContext.getDn() );
         backend.add( addContext );
@@ -559,7 +560,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#compare(org.apache.directory.server.core.interceptor.context.CompareOperationContext)
      */
-    public boolean compare( CompareOperationContext compareContext ) throws Exception
+    public boolean compare( CompareOperationContext compareContext ) throws LdapException
     {
         Partition partition = getPartition( compareContext.getDn() );
         //AttributeTypeRegistry registry = schemaManager.getAttributeTypeRegistry();
@@ -614,7 +615,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#delete(org.apache.directory.server.core.interceptor.context.DeleteOperationContext)
      */
-    public void delete( DeleteOperationContext deleteContext ) throws Exception
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         Partition backend = getPartition( deleteContext.getDn() );
         backend.delete( deleteContext );
@@ -624,7 +625,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#hasEntry(org.apache.directory.server.core.interceptor.context.EntryOperationContext)
      */
-    public boolean hasEntry( EntryOperationContext opContext ) throws Exception
+    public boolean hasEntry( EntryOperationContext opContext ) throws LdapException
     {
         DN dn = opContext.getDn();
 
@@ -646,7 +647,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#list(org.apache.directory.server.core.interceptor.context.ListOperationContext)
      */
-    public EntryFilteringCursor list( ListOperationContext opContext ) throws Exception
+    public EntryFilteringCursor list( ListOperationContext opContext ) throws LdapException
     {
         Partition backend = getPartition( opContext.getDn() );
         return backend.list( opContext );
@@ -656,7 +657,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#lookup(org.apache.directory.server.core.interceptor.context.LookupOperationContext)
      */
-    public ClonedServerEntry lookup( LookupOperationContext opContext ) throws Exception
+    public ClonedServerEntry lookup( LookupOperationContext opContext ) throws LdapException
     {
         DN dn = opContext.getDn();
 
@@ -693,7 +694,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#lookup(java.lang.Long)
      */
-    public ClonedServerEntry lookup( Long id ) throws Exception
+    public ClonedServerEntry lookup( Long id ) throws LdapException
     {
         // TODO not implemented until we can use id to figure out the partition using
         // the partition ID component of the 64 bit Long identifier
@@ -704,7 +705,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#modify(org.apache.directory.server.core.interceptor.context.ModifyOperationContext)
      */
-    public void modify( ModifyOperationContext modifyContext ) throws Exception
+    public void modify( ModifyOperationContext modifyContext ) throws LdapException
     {
         // Special case : if we don't have any modification to apply, just return
         if ( modifyContext.getModItems().size() == 0 )
@@ -727,7 +728,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#move(org.apache.directory.server.core.interceptor.context.MoveOperationContext)
      */
-    public void move( MoveOperationContext opContext ) throws Exception
+    public void move( MoveOperationContext opContext ) throws LdapException
     {
         Partition backend = getPartition( opContext.getDn() );
         backend.move( opContext );
@@ -737,7 +738,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#moveAndRename(org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext)
      */
-    public void moveAndRename( MoveAndRenameOperationContext opContext ) throws Exception
+    public void moveAndRename( MoveAndRenameOperationContext opContext ) throws LdapException
     {
         Partition backend = getPartition( opContext.getDn() );
         backend.moveAndRename( opContext );
@@ -747,14 +748,14 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#rename(org.apache.directory.server.core.interceptor.context.RenameOperationContext)
      */
-    public void rename( RenameOperationContext opContext ) throws Exception
+    public void rename( RenameOperationContext opContext ) throws LdapException
     {
         Partition backend = getPartition( opContext.getDn() );
         backend.rename( opContext );
     }
 
 
-    private EntryFilteringCursor searchRootDSE( SearchOperationContext searchOperationContext ) throws Exception
+    private EntryFilteringCursor searchRootDSE( SearchOperationContext searchOperationContext ) throws LdapException
     {
         SearchControls searchControls = searchOperationContext.getSearchControls();
 
@@ -837,7 +838,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#search(org.apache.directory.server.core.interceptor.context.SearchOperationContext)
      */
-    public EntryFilteringCursor search( SearchOperationContext opContext ) throws Exception
+    public EntryFilteringCursor search( SearchOperationContext opContext ) throws LdapException
     {
         DN base = opContext.getDn();
         SearchControls searchCtls = opContext.getSearchControls();
@@ -945,7 +946,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#addContextPartition(org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext)
      */
-    public synchronized void addContextPartition( AddContextPartitionOperationContext opContext ) throws Exception
+    public synchronized void addContextPartition( AddContextPartitionOperationContext opContext ) throws LdapException
     {
         Partition partition = opContext.getPartition();
 
@@ -954,7 +955,7 @@ public class DefaultPartitionNexus exten
 
         if ( partitions.containsKey( key ) )
         {
-            throw new ConfigurationException( I18n.err( I18n.ERR_263, key ) );
+            throw new LdapOtherException( I18n.err( I18n.ERR_263, key ) );
         }
 
         if ( !partition.isInitialized() )
@@ -968,7 +969,7 @@ public class DefaultPartitionNexus exten
 
             if ( partitionSuffix == null )
             {
-                throw new ConfigurationException( I18n.err( I18n.ERR_267, partition.getId() ) );
+                throw new LdapOtherException( I18n.err( I18n.ERR_267, partition.getId() ) );
             }
 
             partitions.put( partitionSuffix.getNormName(), partition );
@@ -994,7 +995,7 @@ public class DefaultPartitionNexus exten
      * @see org.apache.directory.server.core.partition.PartitionNexus#removeContextPartition(org.apache.directory.server.core.interceptor.context.RemoveContextPartitionOperationContext)
      */
     public synchronized void removeContextPartition( RemoveContextPartitionOperationContext removeContextPartition )
-        throws Exception
+        throws LdapException
     {
         // Get the Partition name. It's a DN.
         String key = removeContextPartition.getDn().getNormName();
@@ -1006,7 +1007,7 @@ public class DefaultPartitionNexus exten
         {
             String msg = I18n.err( I18n.ERR_34, key );
             LOG.error( msg );
-            throw new NameNotFoundException( msg );
+            throw new LdapNoSuchObjectException( msg );
         }
 
         String partitionSuffix = partition.getSuffixDn().getName();
@@ -1025,14 +1026,22 @@ public class DefaultPartitionNexus exten
             {
                 String msg = I18n.err( I18n.ERR_35, key );
                 LOG.error( msg );
-                throw new NameNotFoundException( msg );
+                throw new LdapNoSuchObjectException( msg );
             }
         }
 
         // Update the partition tree
         partitionLookupTree.remove( partition );
         partitions.remove( key );
-        partition.destroy();
+        
+        try
+        {
+            partition.destroy();
+        }
+        catch ( Exception e )
+        {
+            throw new LdapOperationErrorException( e.getMessage() );
+        }
     }
 
 
@@ -1066,7 +1075,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#getMatchedName(org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext)
      */
-    public DN getMatchedName( GetMatchedNameOperationContext matchedNameContext ) throws Exception
+    public DN getMatchedName( GetMatchedNameOperationContext matchedNameContext ) throws LdapException
     {
         DN dn = ( DN ) matchedNameContext.getDn().clone();
 
@@ -1087,7 +1096,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#getSuffix(org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext)
      */
-    public DN getSuffix( GetSuffixOperationContext getSuffixContext ) throws Exception
+    public DN getSuffix( GetSuffixOperationContext getSuffixContext ) throws LdapException
     {
         Partition backend = getPartition( getSuffixContext.getDn() );
         return backend.getSuffixDn();
@@ -1097,7 +1106,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#listSuffixes(org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext)
      */
-    public Set<String> listSuffixes( ListSuffixOperationContext emptyContext ) throws Exception
+    public Set<String> listSuffixes( ListSuffixOperationContext emptyContext ) throws LdapException
     {
         return Collections.unmodifiableSet( partitions.keySet() );
     }
@@ -1106,7 +1115,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#registerSupportedExtensions(java.util.Set)
      */
-    public void registerSupportedExtensions( Set<String> extensionOids ) throws Exception
+    public void registerSupportedExtensions( Set<String> extensionOids ) throws LdapException
     {
         EntryAttribute supportedExtension = rootDSE.get( SchemaConstants.SUPPORTED_EXTENSION_AT );
 
@@ -1126,7 +1135,7 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#registerSupportedSaslMechanisms(java.util.Set)
      */
-    public void registerSupportedSaslMechanisms( Set<String> supportedSaslMechanisms ) throws Exception
+    public void registerSupportedSaslMechanisms( Set<String> supportedSaslMechanisms ) throws LdapException
     {
         EntryAttribute supportedSaslMechanismsAttribute = rootDSE.get( SchemaConstants.SUPPORTED_SASL_MECHANISMS_AT );
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Thu Jun  3 17:05:26 2010
@@ -21,7 +21,6 @@ package org.apache.directory.server.core
 
 
 import javax.naming.Context;
-import javax.naming.NamingException;
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.ReferralManager;
@@ -43,6 +42,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.StringValue;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -78,7 +78,7 @@ public class ReferralInterceptor extends
     private DN subschemaSubentryDn;
 
 
-    static private void checkRefAttributeValue( Value<?> value ) throws NamingException, LdapURLEncodingException
+    static private void checkRefAttributeValue( Value<?> value ) throws LdapException, LdapURLEncodingException
     {
         StringValue ref = ( StringValue ) value;
 
@@ -100,35 +100,35 @@ public class ReferralInterceptor extends
             // else in the LdapURL
             String message = I18n.err( I18n.ERR_36 );
             LOG.error( message );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
 
         if ( !StringTools.isEmpty( ldapUrl.getFilter() ) )
         {
             String message = I18n.err( I18n.ERR_37 );
             LOG.error( message );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
 
         if ( ( ldapUrl.getAttributes() != null ) && ( ldapUrl.getAttributes().size() != 0 ) )
         {
             String message = I18n.err( I18n.ERR_38 );
             LOG.error( message );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
 
         if ( ( ldapUrl.getExtensions() != null ) && ( ldapUrl.getExtensions().size() != 0 ) )
         {
             String message = I18n.err( I18n.ERR_39 );
             LOG.error( message );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
 
         if ( ( ldapUrl.getExtensions() != null ) && ( ldapUrl.getExtensions().size() != 0 ) )
         {
             String message = I18n.err( I18n.ERR_40 );
             LOG.error( message );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
 
         DN dn = ldapUrl.getDn();
@@ -137,14 +137,14 @@ public class ReferralInterceptor extends
         {
             String message = I18n.err( I18n.ERR_41 );
             LOG.error( message );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
     }
 
 
     // This will suppress PMD.EmptyCatchBlock warnings in this method
     @SuppressWarnings("PMD.EmptyCatchBlock")
-    static private boolean isReferral( Entry entry ) throws NamingException
+    static private boolean isReferral( Entry entry ) throws LdapException
     {
         // Check that the entry is not null, otherwise return FALSE.
         // This is typically to cover the case where the entry has not 
@@ -179,7 +179,7 @@ public class ReferralInterceptor extends
                 // very unlikely, as we have already checked the entry in SchemaInterceptor
                 String message = I18n.err( I18n.ERR_42 );
                 LOG.error( message );
-                throw new NamingException( message );
+                throw new LdapException( message );
             }
 
             for ( Value<?> value : refAttr )
@@ -200,7 +200,7 @@ public class ReferralInterceptor extends
     }
 
 
-    public void init( DirectoryService directoryService ) throws Exception
+    public void init( DirectoryService directoryService ) throws LdapException
     {
         nexus = directoryService.getPartitionNexus();
         schemaManager = directoryService.getSchemaManager();
@@ -232,7 +232,7 @@ public class ReferralInterceptor extends
      * entryAlreadyExists error.
      *  
      */
-    public void add( NextInterceptor next, AddOperationContext opContext ) throws Exception
+    public void add( NextInterceptor next, AddOperationContext opContext ) throws LdapException
     {
         Entry entry = opContext.getEntry();
 
@@ -268,7 +268,7 @@ public class ReferralInterceptor extends
      * 
      * If the entry does not exist in the server, we will get a NoSuchObject error
      */
-    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws Exception
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws LdapException
     {
         // First delete the entry into the server
         next.delete( opContext );
@@ -292,7 +292,7 @@ public class ReferralInterceptor extends
     /**
      * {@inheritDoc}
      **/
-    public void move( NextInterceptor next, MoveOperationContext opContext ) throws Exception
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws LdapException
     {
         DN oldName = opContext.getDn();
 
@@ -324,7 +324,7 @@ public class ReferralInterceptor extends
     /**
      * {@inheritDoc}
      **/
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext ) throws Exception
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext ) throws LdapException
     {
         DN newName = ( DN ) opContext.getParent().clone();
         newName.add( opContext.getNewRdn() );
@@ -354,7 +354,7 @@ public class ReferralInterceptor extends
     /**
      * {@inheritDoc}
      **/
-    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws Exception
+    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws LdapException
     {
         // Check if the entry is a referral itself
         boolean isReferral = isReferral( opContext.getEntry() );
@@ -382,7 +382,7 @@ public class ReferralInterceptor extends
     /**
      * Modify an entry in the server.
      */
-    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws LdapException
     {
         DN dn = opContext.getDn();
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java Thu Jun  3 17:05:26 2010
@@ -28,8 +28,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
-import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -352,7 +352,7 @@ public class DefaultSchemaService implem
     /**
      * {@inheritDoc}
      */
-    public Entry getSubschemaEntryImmutable() throws Exception
+    public Entry getSubschemaEntryImmutable() throws LdapException
     {
         synchronized ( schemaSubentrLock )
         {
@@ -372,7 +372,7 @@ public class DefaultSchemaService implem
      *
      * @throws Exception If the initializaion fails
      */
-    public void initialize() throws Exception
+    public void initialize() throws LdapException
     {
         try
         {
@@ -390,7 +390,7 @@ public class DefaultSchemaService implem
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaService#getSubschemaEntryCloned()
      */
-    public Entry getSubschemaEntryCloned() throws Exception
+    public Entry getSubschemaEntryCloned() throws LdapException
     {
         if ( schemaSubentry == null )
         {
@@ -405,7 +405,7 @@ public class DefaultSchemaService implem
     /**
      * {@inheritDoc}
      */
-    public Entry getSubschemaEntry( String[] ids ) throws Exception
+    public Entry getSubschemaEntry( String[] ids ) throws LdapException
     {
         if ( ids == null )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=951068&r1=951067&r2=951068&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Thu Jun  3 17:05:26 2010
@@ -178,7 +178,7 @@ public class SchemaInterceptor extends B
      * @param directoryService the directory service core
      * @throws Exception if there are problems during initialization
      */
-    public void init( DirectoryService directoryService ) throws Exception
+    public void init( DirectoryService directoryService ) throws LdapException
     {
         if ( IS_DEBUG )
         {
@@ -231,7 +231,7 @@ public class SchemaInterceptor extends B
      * @param objectClass the object class to gather MUST attributes for
      * @throws Exception if there are problems resolving schema entitites
      */
-    private void computeMustAttributes( ObjectClass objectClass, Set<String> atSeen ) throws Exception
+    private void computeMustAttributes( ObjectClass objectClass, Set<String> atSeen ) throws LdapException
     {
         List<ObjectClass> parents = superiors.get( objectClass.getOid() );
 
@@ -275,7 +275,7 @@ public class SchemaInterceptor extends B
      * @param objectClass the object class to get all the MAY attributes for
      * @throws Exception with problems accessing registries
      */
-    private void computeMayAttributes( ObjectClass objectClass, Set<String> atSeen ) throws Exception
+    private void computeMayAttributes( ObjectClass objectClass, Set<String> atSeen ) throws LdapException
     {
         List<ObjectClass> parents = superiors.get( objectClass.getOid() );
 
@@ -320,7 +320,7 @@ public class SchemaInterceptor extends B
      * superiors.
      */
     private void computeOCSuperiors( ObjectClass objectClass, List<ObjectClass> superiors, Set<String> ocSeen )
-        throws Exception
+        throws LdapException
     {
         List<ObjectClass> parents = objectClass.getSuperiors();
 
@@ -354,7 +354,7 @@ public class SchemaInterceptor extends B
      * Compute the superiors and MUST/MAY attributes for a specific
      * ObjectClass
      */
-    private void computeSuperior( ObjectClass objectClass ) throws Exception
+    private void computeSuperior( ObjectClass objectClass ) throws LdapException
     {
         List<ObjectClass> ocSuperiors = new ArrayList<ObjectClass>();
 
@@ -374,7 +374,7 @@ public class SchemaInterceptor extends B
      * Compute all ObjectClasses superiors, MAY and MUST attributes.
      * @throws Exception
      */
-    private void computeSuperiors() throws Exception
+    private void computeSuperiors() throws LdapException
     {
         Iterator<ObjectClass> objectClasses = schemaManager.getObjectClassRegistry().iterator();
         superiors = new ConcurrentHashMap<String, List<ObjectClass>>();
@@ -391,7 +391,7 @@ public class SchemaInterceptor extends B
 
 
     public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         EntryFilteringCursor cursor = nextInterceptor.list( opContext );
         cursor.addEntryFilter( binaryAttributeFilter );
@@ -509,7 +509,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    private Value<?> convert( String id, Object value ) throws Exception
+    private Value<?> convert( String id, Object value ) throws LdapException
     {
         AttributeType at = schemaManager.lookupAttributeTypeRegistry( id );
 
@@ -555,7 +555,7 @@ public class SchemaInterceptor extends B
      * a HumanReadible filter should have a String value. The substring filter should
      * not be used with binary attributes.
      */
-    private void checkFilter( ExprNode filter ) throws Exception
+    private void checkFilter( ExprNode filter ) throws LdapException
     {
         if ( filter == null )
         {
@@ -646,7 +646,7 @@ public class SchemaInterceptor extends B
 
 
     public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext opContext )
-        throws Exception
+        throws LdapException
     {
         DN base = opContext.getDn();
         SearchControls searchCtls = opContext.getSearchControls();
@@ -752,7 +752,7 @@ public class SchemaInterceptor extends B
     /**
      * Search for an entry, using its DN. Binary attributes and ObjectClass attribute are removed.
      */
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws Exception
+    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws LdapException
     {
         Entry result = nextInterceptor.lookup( opContext );
 
@@ -767,7 +767,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    private void getSuperiors( ObjectClass oc, Set<String> ocSeen, List<ObjectClass> result ) throws Exception
+    private void getSuperiors( ObjectClass oc, Set<String> ocSeen, List<ObjectClass> result ) throws LdapException
     {
         for ( ObjectClass parent : oc.getSuperiors() )
         {
@@ -789,7 +789,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    private boolean getObjectClasses( EntryAttribute objectClasses, List<ObjectClass> result ) throws Exception
+    private boolean getObjectClasses( EntryAttribute objectClasses, List<ObjectClass> result ) throws LdapException
     {
         Set<String> ocSeen = new HashSet<String>();
 
@@ -828,7 +828,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    private Set<String> getAllMust( EntryAttribute objectClasses ) throws Exception
+    private Set<String> getAllMust( EntryAttribute objectClasses ) throws LdapException
     {
         Set<String> must = new HashSet<String>();
 
@@ -854,7 +854,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    private Set<String> getAllAllowed( EntryAttribute objectClasses, Set<String> must ) throws Exception
+    private Set<String> getAllAllowed( EntryAttribute objectClasses, Set<String> must ) throws LdapException
     {
         Set<String> allowed = new HashSet<String>( must );
 
@@ -894,7 +894,7 @@ public class SchemaInterceptor extends B
      * @param objectClassAttr the objectClass attribute to modify
      * @throws Exception if there are problems 
      */
-    private void alterObjectClasses( EntryAttribute objectClassAttr ) throws Exception
+    private void alterObjectClasses( EntryAttribute objectClassAttr ) throws LdapException
     {
         Set<String> objectClasses = new HashSet<String>();
         Set<String> objectClassesUP = new HashSet<String>();
@@ -946,7 +946,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws Exception
+    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws LdapException
     {
         DN oldDn = opContext.getDn();
         RDN newRdn = opContext.getNewRdn();
@@ -1026,7 +1026,7 @@ public class SchemaInterceptor extends B
     /**
      * Modify an entry, applying the given modifications, and check if it's OK
      */
-    private void checkModifyEntry( DN dn, Entry currentEntry, List<Modification> mods ) throws Exception
+    private void checkModifyEntry( DN dn, Entry currentEntry, List<Modification> mods ) throws LdapException
     {
         // The first step is to check that the modifications are valid :
         // - the ATs are present in the schema
@@ -1201,7 +1201,7 @@ public class SchemaInterceptor extends B
     /**
      * {@inheritDoc}
      */
-    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws LdapException
     {
         // A modification on a simple entry will be done in three steps :
         // - get the original entry (it should already been in the context)
@@ -1302,7 +1302,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    private void filterBinaryAttributes( Entry entry ) throws Exception
+    private void filterBinaryAttributes( Entry entry ) throws LdapException
     {
         /*
          * start converting values of attributes to byte[]s which are not
@@ -1365,7 +1365,7 @@ public class SchemaInterceptor extends B
      * 
      * We also check the syntaxes
      */
-    private void check( DN dn, Entry entry ) throws Exception
+    private void check( DN dn, Entry entry ) throws LdapException
     {
         // ---------------------------------------------------------------
         // First, make sure all attributes are valid schema defined attributes
@@ -1428,7 +1428,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    private void checkOcSuperior( Entry entry ) throws Exception
+    private void checkOcSuperior( Entry entry ) throws LdapException
     {
         // handle the m-supObjectClass meta attribute
         EntryAttribute supOC = entry.get( MetaSchemaConstants.M_SUP_OBJECT_CLASS_AT );
@@ -1494,7 +1494,7 @@ public class SchemaInterceptor extends B
     /**
      * Check that all the attributes exist in the schema for this entry.
      */
-    public void add( NextInterceptor next, AddOperationContext addContext ) throws Exception
+    public void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException
     {
         DN name = addContext.getDn();
         Entry entry = addContext.getEntry();
@@ -1572,7 +1572,7 @@ public class SchemaInterceptor extends B
      * @return true if the objectClass values require the attribute, false otherwise
      * @throws Exception if the attribute is not recognized
      */
-    private void assertAllAttributesAllowed( DN dn, Entry entry, Set<String> allowed ) throws Exception
+    private void assertAllAttributesAllowed( DN dn, Entry entry, Set<String> allowed ) throws LdapException
     {
         // Never check the attributes if the extensibleObject objectClass is
         // declared for this entry
@@ -1628,7 +1628,7 @@ public class SchemaInterceptor extends B
     /**
      * Checks to see the presence of all required attributes within an entry.
      */
-    private void assertRequiredAttributesPresent( DN dn, Entry entry, Set<String> must ) throws Exception
+    private void assertRequiredAttributesPresent( DN dn, Entry entry, Set<String> must ) throws LdapException
     {
         for ( EntryAttribute attribute : entry )
         {
@@ -1649,7 +1649,7 @@ public class SchemaInterceptor extends B
      * inheritance tree
      * - we must have at least one STRUCTURAL OC
      */
-    private void assertObjectClasses( DN dn, List<ObjectClass> ocs ) throws Exception
+    private void assertObjectClasses( DN dn, List<ObjectClass> ocs ) throws LdapException
     {
         Set<ObjectClass> structuralObjectClasses = new HashSet<ObjectClass>();
 
@@ -1720,7 +1720,7 @@ public class SchemaInterceptor extends B
     /**
      * Check the entry attributes syntax, using the syntaxCheckers
      */
-    private void assertSyntaxes( Entry entry ) throws Exception
+    private void assertSyntaxes( Entry entry ) throws LdapException
     {
         // First, loop on all attributes
         for ( EntryAttribute attribute : entry )
@@ -1760,7 +1760,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    private void assertRdn( DN dn, Entry entry ) throws Exception
+    private void assertRdn( DN dn, Entry entry ) throws LdapException
     {
         for ( AVA atav : dn.getRdn() )
         {
@@ -1781,7 +1781,7 @@ public class SchemaInterceptor extends B
      * 
      * If this is the case, try to change it to a String value.
      */
-    private boolean checkHumanReadable( EntryAttribute attribute ) throws Exception
+    private boolean checkHumanReadable( EntryAttribute attribute ) throws LdapException
     {
         boolean isModified = false;
 
@@ -1823,7 +1823,7 @@ public class SchemaInterceptor extends B
      * 
      * If this is the case, try to change it to a binary value.
      */
-    private boolean checkNotHumanReadable( EntryAttribute attribute ) throws Exception
+    private boolean checkNotHumanReadable( EntryAttribute attribute ) throws LdapException
     {
         boolean isModified = false;
 
@@ -1870,7 +1870,7 @@ public class SchemaInterceptor extends B
      * to valid String if they are stored as byte[], and that non Human Readable attributes
      * stored as String can be transformed to byte[]
      */
-    private void assertHumanReadable( Entry entry ) throws Exception
+    private void assertHumanReadable( Entry entry ) throws LdapException
     {
         boolean isModified = false;
 



Mime
View raw message