directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r923524 [2/7] - in /directory/shared/trunk: ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/ ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/ ldap-schema-manager/sr...
Date Tue, 16 Mar 2010 00:31:39 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java Tue Mar 16 00:31:36 2010
@@ -24,9 +24,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
@@ -226,7 +225,7 @@ public class AttributeType extends Abstr
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04303, superiorOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
 
@@ -251,7 +250,7 @@ public class AttributeType extends Abstr
                 {
                     attributeTypeRegistry.registerDescendants( this, superior );
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     errors.add( ne );
                     LOG.info( ne.getMessage() );
@@ -272,8 +271,8 @@ public class AttributeType extends Abstr
                         // Not allowed.
                         String msg = I18n.err( I18n.ERR_04304, getName() );
 
-                        Throwable error = new LdapSchemaViolationException( msg,
-                            ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                        Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                            msg );
                         errors.add( error );
                         LOG.info( msg );
                         isOk = false;
@@ -296,7 +295,7 @@ public class AttributeType extends Abstr
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04305, superiorOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
 
@@ -325,12 +324,12 @@ public class AttributeType extends Abstr
             {
                 syntax = registries.getLdapSyntaxRegistry().lookup( syntaxOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04306, syntaxOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
                 return;
@@ -346,7 +345,7 @@ public class AttributeType extends Abstr
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04306, syntaxOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
                 return;
@@ -365,7 +364,7 @@ public class AttributeType extends Abstr
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04307, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
                 return;
@@ -388,12 +387,12 @@ public class AttributeType extends Abstr
             {
                 equality = registries.getMatchingRuleRegistry().lookup( equalityOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04308, equalityOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
                 return;
@@ -408,7 +407,7 @@ public class AttributeType extends Abstr
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04309, equalityOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
             }
@@ -438,12 +437,12 @@ public class AttributeType extends Abstr
             {
                 ordering = registries.getMatchingRuleRegistry().lookup( orderingOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04310, orderingOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
                 return;
@@ -458,7 +457,7 @@ public class AttributeType extends Abstr
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04311, orderingOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
             }
@@ -489,12 +488,12 @@ public class AttributeType extends Abstr
             {
                 substring = registries.getMatchingRuleRegistry().lookup( substringOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04312, substringOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
                 return;
@@ -509,7 +508,7 @@ public class AttributeType extends Abstr
                 // Not allowed.
                 String msg = I18n.err( I18n.ERR_04313, substringOid, getName() );
 
-                Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                 errors.add( error );
                 LOG.info( msg );
                 return;
@@ -538,7 +537,7 @@ public class AttributeType extends Abstr
             // This is an error
             String msg = I18n.err( I18n.ERR_04314, getName() );
 
-            Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
             errors.add( error );
             LOG.info( msg );
             return;
@@ -550,7 +549,7 @@ public class AttributeType extends Abstr
             // Cannot have a not user modifiable AT which is not an operational AT
             String msg = I18n.err( I18n.ERR_04315, getName() );
 
-            Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
             errors.add( error );
             LOG.info( msg );
         }
@@ -576,7 +575,7 @@ public class AttributeType extends Abstr
             // An AttributeType which is collective must be a USER attributeType
             String msg = I18n.err( I18n.ERR_04316, getName() );
 
-            Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
             errors.add( error );
             LOG.info( msg );
         }
@@ -593,7 +592,7 @@ public class AttributeType extends Abstr
      * @param registries The Registries
      * @exception If the AttributeType is not valid 
      */
-    public void addToRegistries( List<Throwable> errors, Registries registries ) throws NamingException
+    public void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )
         {
@@ -674,7 +673,7 @@ public class AttributeType extends Abstr
      * @param registries The Registries
      * @exception If the AttributeType is not valid 
      */
-    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws NamingException
+    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java Tue Mar 16 00:31:36 2010
@@ -23,8 +23,7 @@ package org.apache.directory.shared.ldap
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.schema.registries.ObjectClassRegistry;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
@@ -508,7 +507,7 @@ public class DITContentRule extends Abst
      * @param registries The Registries
      * @exception If the addition failed
      */
-    public void addToRegistries( Registries registries ) throws NamingException
+    public void addToRegistries( Registries registries ) throws LdapException
     {
         if ( registries != null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/EntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/EntityFactory.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/EntityFactory.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/EntityFactory.java Tue Mar 16 00:31:36 2010
@@ -1,9 +1,8 @@
 
 package org.apache.directory.shared.ldap.schema;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.parsers.LdapComparatorDescription;
 import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription;
 import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescription;
@@ -30,9 +29,9 @@ public interface EntityFactory
      * @param targetRegistries The registries containing all the enabled SchemaObjects
      * @param schemaName The schema this SchemaObject will be part of
      * @return An AttributeType SchemaObject
-     * @throws NamingException If the AttributeType is invalid
+     * @throws LdapException If the AttributeType is invalid
      */
-    AttributeType getAttributeType( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) throws NamingException;
+    AttributeType getAttributeType( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) throws LdapException;
 
     
     /**
@@ -58,7 +57,7 @@ public interface EntityFactory
      * @param targetRegistries The registries containing all the enabled SchemaObjects
      * @param schemaName The schema this SchemaObject will be part of
      * @return the loaded Comparator
-     * @throws NamingException if anything fails during loading
+     * @throws LdapException if anything fails during loading
      */
     LdapComparator<?> getLdapComparator( SchemaManager schemaManager, Entry entry, 
         Registries targetRegistries, String schemaName ) throws Exception;
@@ -72,9 +71,9 @@ public interface EntityFactory
      * @param targetRegistries The registries containing all the enabled SchemaObjects
      * @param schemaName The schema this SchemaObject will be part of
      * @return A MatchingRule SchemaObject
-     * @throws NamingException If the MatchingRule is invalid
+     * @throws LdapException If the MatchingRule is invalid
      */
-    MatchingRule getMatchingRule( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) throws NamingException;
+    MatchingRule getMatchingRule( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) throws LdapException;
 
 
     /**
@@ -99,7 +98,7 @@ public interface EntityFactory
      * @param targetRegistries The registries containing all the enabled SchemaObjects
      * @param schemaName The schema this SchemaObject will be part of
      * @return the loaded Normalizer
-     * @throws NamingException if anything fails during loading
+     * @throws LdapException if anything fails during loading
      */
     Normalizer getNormalizer( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) 
         throws Exception;
@@ -124,9 +123,9 @@ public interface EntityFactory
      * @param targetRegistries The registries containing all the enabled SchemaObjects
      * @param schemaName The schema this SchemaObject will be part of
      * @return
-     * @throws NamingException
+     * @throws LdapException
      */
-    LdapSyntax getSyntax( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) throws NamingException;
+    LdapSyntax getSyntax( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) throws LdapException;
     
     
     /**
@@ -137,7 +136,7 @@ public interface EntityFactory
      * @param targetRegistries The registries containing all the enabled SchemaObjects
      * @param schemaName The schema this SchemaObject will be part of
      * @return the loaded SyntaxChecker
-     * @throws NamingException if anything fails during loading
+     * @throws LdapException if anything fails during loading
      */
     SyntaxChecker getSyntaxChecker( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) throws Exception;
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java Tue Mar 16 00:31:36 2010
@@ -22,8 +22,7 @@ package org.apache.directory.shared.ldap
 
 import java.util.List;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.OctetStringSyntaxChecker;
 
@@ -197,7 +196,7 @@ public class LdapSyntax extends Abstract
      * @param registries The Registries
      * @exception If the addition failed
      */
-    public void addToRegistries( List<Throwable> errors, Registries registries ) throws NamingException
+    public void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )
         {
@@ -206,7 +205,7 @@ public class LdapSyntax extends Abstract
                 // Gets the associated SyntaxChecker
                 syntaxChecker = registries.getSyntaxCheckerRegistry().lookup( oid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // No SyntaxChecker ? Associate the Syntax to a catch all SyntaxChecker
                 syntaxChecker = new OctetStringSyntaxChecker( oid );
@@ -232,7 +231,7 @@ public class LdapSyntax extends Abstract
      * @param registries The Registries
      * @exception If the Syntx is not valid 
      */
-    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws NamingException
+    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LoadableSchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LoadableSchemaObject.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LoadableSchemaObject.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LoadableSchemaObject.java Tue Mar 16 00:31:36 2010
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.ldap.schema;
 
 
-import javax.naming.NamingException;
+import org.apache.directory.shared.ldap.exception.LdapException;
 
 import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -124,7 +124,7 @@ public abstract class LoadableSchemaObje
     /**
      * {@inheritDoc}
      */
-    public void registerOid( SchemaObject schemaObject, Registries registries ) throws NamingException
+    public void registerOid( SchemaObject schemaObject, Registries registries ) throws LdapException
     {
         // Do nothing : the current SchemaObject ha sthe same OID than the one it is realted to
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java Tue Mar 16 00:31:36 2010
@@ -22,9 +22,8 @@ package org.apache.directory.shared.ldap
 
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.comparators.ComparableComparator;
@@ -120,7 +119,7 @@ public class MatchingRule extends Abstra
      * @param registries The Registries
      * @exception If the addition failed
      */
-    public void addToRegistries( List<Throwable> errors, Registries registries ) throws NamingException
+    public void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )
         {
@@ -129,7 +128,7 @@ public class MatchingRule extends Abstra
                 // Gets the associated Comparator 
                 ldapComparator = ( LdapComparator<? super Object> ) registries.getComparatorRegistry().lookup( oid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // Default to a catch all comparator
                 ldapComparator = new ComparableComparator( oid );
@@ -140,7 +139,7 @@ public class MatchingRule extends Abstra
                 // Gets the associated Normalizer
                 normalizer = registries.getNormalizerRegistry().lookup( oid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // Default to the NoOp normalizer
                 normalizer = new NoOpNormalizer( oid );
@@ -151,11 +150,11 @@ public class MatchingRule extends Abstra
                 // Get the associated LdapSyntax
                 ldapSyntax = registries.getLdapSyntaxRegistry().lookup( ldapSyntaxOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // The Syntax is a mandatory element, it must exist.
-                throw new LdapSchemaViolationException( I18n.err( I18n.ERR_04317 ),
-                    ResultCodeEnum.UNWILLING_TO_PERFORM );
+                throw new LdapSchemaViolationException( ResultCodeEnum.UNWILLING_TO_PERFORM,
+                    I18n.err( I18n.ERR_04317 ) );
             }
 
             /**
@@ -193,7 +192,7 @@ public class MatchingRule extends Abstra
      * @param registries The Registries
      * @exception If the MatchingRule is not valid 
      */
-    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws NamingException
+    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java Tue Mar 16 00:31:36 2010
@@ -23,7 +23,7 @@ package org.apache.directory.shared.ldap
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.naming.NamingException;
+import org.apache.directory.shared.ldap.exception.LdapException;
 
 import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
@@ -116,7 +116,7 @@ public class MatchingRuleUse extends Abs
      * @param registries The Registries
      * @exception If the addition failed
      */
-    public void addToRegistries( Registries registries ) throws NamingException
+    public void addToRegistries( Registries registries ) throws LdapException
     {
         if ( registries != null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java Tue Mar 16 00:31:36 2010
@@ -24,7 +24,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import javax.naming.NamingException;
+import org.apache.directory.shared.ldap.exception.LdapException;
 
 import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
@@ -143,7 +143,7 @@ public class NameForm extends AbstractSc
      *
      * @param registries The Registries
      */
-    public void addToRegistries( Registries registries ) throws NamingException
+    public void addToRegistries( Registries registries ) throws LdapException
     {
         if ( registries != null )
         {
@@ -191,9 +191,9 @@ public class NameForm extends AbstractSc
      * attributes for.
      * 
      * @return the ObjectClass this NameForm is for
-     * @throws NamingException If the structuralObjectClass is invalid
+     * @throws LdapException If the structuralObjectClass is invalid
      */
-    public ObjectClass getStructuralObjectClass() throws NamingException
+    public ObjectClass getStructuralObjectClass() throws LdapException
     {
         return structuralObjectClass;
     }
@@ -234,9 +234,9 @@ public class NameForm extends AbstractSc
      * Rdn.
      * 
      * @return the AttributeTypes OIDs of the must use attributes
-     * @throws NamingException if there is a failure resolving one AttributeTyoe
+     * @throws LdapException if there is a failure resolving one AttributeTyoe
      */
-    public List<String> getMustAttributeTypeOids() throws NamingException
+    public List<String> getMustAttributeTypeOids() throws LdapException
     {
         return Collections.unmodifiableList( mustAttributeTypeOids );
     }
@@ -329,9 +329,9 @@ public class NameForm extends AbstractSc
      * part of the Rdn.
      * 
      * @return the AttributeTypes OIDs of the may use attributes
-     * @throws NamingException if there is a failure resolving one AttributeTyoe
+     * @throws LdapException if there is a failure resolving one AttributeTyoe
      */
-    public List<String> getMayAttributeTypeOids() throws NamingException
+    public List<String> getMayAttributeTypeOids() throws LdapException
     {
         return Collections.unmodifiableList( mayAttributeTypeOids );
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/Normalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/Normalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/Normalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/Normalizer.java Tue Mar 16 00:31:36 2010
@@ -66,7 +66,7 @@ public abstract class Normalizer extends
      * @return the normalized form for a value
      * @throws LdapException if an error results during normalization
      */
-    public abstract Value<?> normalize( Value<?> value ) throws LdapInvalidDnException;
+    public abstract Value<?> normalize( Value<?> value ) throws LdapException;
 
 
     /**
@@ -76,7 +76,7 @@ public abstract class Normalizer extends
      * @return the normalized form for a value
      * @throws LdapException if an error results during normalization
      */
-    public abstract String normalize( String value ) throws LdapInvalidDnException;
+    public abstract String normalize( String value ) throws LdapException;
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java Tue Mar 16 00:31:36 2010
@@ -23,9 +23,8 @@ package org.apache.directory.shared.ldap
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
@@ -146,8 +145,8 @@ public class ObjectClass extends Abstrac
                                 // An ABSTRACT OC can only inherit from ABSTRACT OCs
                                 String msg = I18n.err( I18n.ERR_04318, oid , superior.getObjectType() , superior );
 
-                                Throwable error = new LdapSchemaViolationException( msg,
-                                    ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                                    msg );
                                 errors.add( error );
                                 return;
                             }
@@ -160,8 +159,8 @@ public class ObjectClass extends Abstrac
                                 // An AUXILIARY OC can only inherit from STRUCTURAL OCs
                                 String msg = I18n.err( I18n.ERR_04319, oid, superior );
 
-                                Throwable error = new LdapSchemaViolationException( msg,
-                                    ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                                    msg );
                                 errors.add( error );
                                 return;
                             }
@@ -174,8 +173,8 @@ public class ObjectClass extends Abstrac
                                 // A STRUCTURAL OC can only inherit from AUXILIARY OCs
                                 String msg = I18n.err( I18n.ERR_04320, oid, superior );
 
-                                Throwable error = new LdapSchemaViolationException( msg,
-                                    ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                                    msg );
                                 errors.add( error );
                                 return;
                             }
@@ -185,12 +184,12 @@ public class ObjectClass extends Abstrac
 
                     superiors.add( superior );
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     // Cannot find the OC
                     String msg = I18n.err( I18n.ERR_04321, oid, superiorName );
 
-                    Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                    Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                     errors.add( error );
                     return;
                 }
@@ -217,20 +216,20 @@ public class ObjectClass extends Abstrac
                     {
                         // Already registered : this is an error
                         String msg = I18n.err( I18n.ERR_04322, oid, mayAttributeTypeName );
-                        Throwable error = new LdapSchemaViolationException( msg,
-                            ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                        Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                            msg );
                         errors.add( error );
                         break;
                     }
 
                     mayAttributeTypes.add( attributeType );
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     // Cannot find the AT
                     String msg = I18n.err( I18n.ERR_04323, oid, mayAttributeTypeName );
 
-                    Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                    Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                     errors.add( error );
                     break;
                 }
@@ -258,8 +257,8 @@ public class ObjectClass extends Abstrac
                         // Already registered : this is an error
                         String msg = I18n.err( I18n.ERR_04324, oid, mustAttributeTypeName );
 
-                        Throwable error = new LdapSchemaViolationException( msg,
-                            ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                        Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                            msg );
                         errors.add( error );
                         break;
                     }
@@ -270,20 +269,20 @@ public class ObjectClass extends Abstrac
                         // Already registered : this is an error
                         String msg = I18n.err( I18n.ERR_04325, oid, mustAttributeTypeName );
 
-                        Throwable error = new LdapSchemaViolationException( msg,
-                            ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                        Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                            msg );
                         errors.add( error );
                         break;
                     }
 
                     mustAttributeTypes.add( attributeType );
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     // Cannot find the AT
                     String msg = I18n.err( I18n.ERR_04326, oid, mustAttributeTypeName );
 
-                    Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                    Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
                     errors.add( error );
                     break;
                 }
@@ -301,7 +300,7 @@ public class ObjectClass extends Abstrac
      * @throws Exception on failure
      *
      */
-    public void addToRegistries( List<Throwable> errors, Registries registries ) throws NamingException
+    public void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )
         {
@@ -348,7 +347,7 @@ public class ObjectClass extends Abstrac
      * @param registries The Registries
      * @exception If the ObjectClass is not valid 
      */
-    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws NamingException
+    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )
         {
@@ -613,7 +612,6 @@ public class ObjectClass extends Abstrac
      * Gets the superclasses of this ObjectClass.
      * 
      * @return the superclasses
-     * @throws NamingException if there is a failure resolving the object
      */
     public List<ObjectClass> getSuperiors()
     {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/PrepareString.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/PrepareString.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/PrepareString.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/PrepareString.java Tue Mar 16 00:31:36 2010
@@ -24,7 +24,6 @@ import java.io.IOException;
 
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.ldap.util.unicode.InvalidCharacterException;
-// import org.apache.directory.shared.ldap.util.unicode.Normalizer;
 
 /**
  * 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaDao.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaDao.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaDao.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaDao.java Tue Mar 16 00:31:36 2010
@@ -4,8 +4,6 @@ package org.apache.directory.shared.ldap
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -58,7 +56,7 @@ public interface SchemaDao
      * @param entityName one of the names of the entity or it's numeric id
      * @return the name of the schema that contains that entity or null if no entity with 
      * that alias name exists
-     * @throws NamingException if more than one entity has the name, or if there 
+     * @throws LdapException if more than one entity has the name, or if there 
      * are underlying data access problems
      */
     String findSchema( String entityName ) throws Exception;
@@ -78,7 +76,7 @@ public interface SchemaDao
      * @param entityName one of the names of the entity or it's numeric id
      * @return the search result for the entity or null if no such entity exists with 
      * that alias or numeric oid
-     * @throws NamingException if more than one entity has the name, or if there 
+     * @throws LdapException if more than one entity has the name, or if there 
      * are underlying data access problems
      */
     Entry find( String entityName ) throws Exception;
@@ -112,7 +110,7 @@ public interface SchemaDao
      * reaction will occur in a replica.
      * 
      * @param schemaName the name of the schema to enable
-     * @throws NamingException if there is a problem updating the schema entry
+     * @throws LdapException if there is a problem updating the schema entry
      */
     void enableSchema( String schemaName ) throws Exception;
 
@@ -123,7 +121,7 @@ public interface SchemaDao
      *
      * @param numericOid the numeric identifier for the entity
      * @return the set of matchingRules and attributeTypes depending on a syntax
-     * @throws NamingException if the dao fails to perform search operations
+     * @throws LdapException if the dao fails to perform search operations
      */
     Set<Entry> listSyntaxDependents( String numericOid ) throws Exception;
 
@@ -139,7 +137,7 @@ public interface SchemaDao
      * 
      * @param schemaName the name of the schema to search for dependees
      * @return a set of SearchResults over the schemas whose m-dependency attribute contains schemaName
-     * @throws NamingException if there is a problem while searching the schema partition
+     * @throws LdapException if there is a problem while searching the schema partition
      */
     Set<Entry> listSchemaDependents( String schemaName ) throws Exception;
 
@@ -149,7 +147,7 @@ public interface SchemaDao
      * 
      * @param schemaName the name of the schema to search for dependencies
      * @return a set of SearchResults over the schemas whose m-dependency attribute contains schemaName
-     * @throws NamingException if there is a problem while searching the schema partition
+     * @throws LdapException if there is a problem while searching the schema partition
      */
     Set<Entry> listEnabledSchemaDependents( String schemaName ) throws Exception;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java Tue Mar 16 00:31:36 2010
@@ -24,8 +24,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
@@ -439,9 +438,9 @@ public interface SchemaManager
      * 
      * @param String oid the OID we are looking for
      * @return The found AttributeType 
-     * @throws NamingException if the OID is not found in the AttributeType registry
+     * @throws LdapException if the OID is not found in the AttributeType registry
      */
-    AttributeType lookupAttributeTypeRegistry( String oid ) throws NamingException;
+    AttributeType lookupAttributeTypeRegistry( String oid ) throws LdapException;
 
 
     /**
@@ -449,9 +448,9 @@ public interface SchemaManager
      * 
      * @param String oid the OID we are looking for
      * @return The found Comparator 
-     * @throws NamingException if the OID is not found in the Comparator registry
+     * @throws LdapException if the OID is not found in the Comparator registry
      */
-    LdapComparator<?> lookupComparatorRegistry( String oid ) throws NamingException;
+    LdapComparator<?> lookupComparatorRegistry( String oid ) throws LdapException;
 
 
     /**
@@ -459,9 +458,9 @@ public interface SchemaManager
      * 
      * @param String oid the OID we are looking for
      * @return The found MatchingRule 
-     * @throws NamingException if the OID is not found in the MatchingRule registry
+     * @throws LdapException if the OID is not found in the MatchingRule registry
      */
-    MatchingRule lookupMatchingRuleRegistry( String oid ) throws NamingException;
+    MatchingRule lookupMatchingRuleRegistry( String oid ) throws LdapException;
 
 
     /**
@@ -469,9 +468,9 @@ public interface SchemaManager
      * 
      * @param String oid the OID we are looking for
      * @return The found Normalizer 
-     * @throws NamingException if the OID is not found in the Normalizer registry
+     * @throws LdapException if the OID is not found in the Normalizer registry
      */
-    Normalizer lookupNormalizerRegistry( String oid ) throws NamingException;
+    Normalizer lookupNormalizerRegistry( String oid ) throws LdapException;
 
 
     /**
@@ -479,9 +478,9 @@ public interface SchemaManager
      * 
      * @param String oid the OID we are looking for
      * @return The found ObjectClass 
-     * @throws NamingException if the OID is not found in the ObjectClass registry
+     * @throws LdapException if the OID is not found in the ObjectClass registry
      */
-    ObjectClass lookupObjectClassRegistry( String oid ) throws NamingException;
+    ObjectClass lookupObjectClassRegistry( String oid ) throws LdapException;
 
 
     /**
@@ -489,9 +488,9 @@ public interface SchemaManager
      * 
      * @param String oid the OID we are looking for
      * @return The found LdapSyntax 
-     * @throws NamingException if the OID is not found in the LdapSyntax registry
+     * @throws LdapException if the OID is not found in the LdapSyntax registry
      */
-    LdapSyntax lookupLdapSyntaxRegistry( String oid ) throws NamingException;
+    LdapSyntax lookupLdapSyntaxRegistry( String oid ) throws LdapException;
 
 
     /**
@@ -499,9 +498,9 @@ public interface SchemaManager
      * 
      * @param String oid the OID we are looking for
      * @return The found SyntaxChecker 
-     * @throws NamingException if the OID is not found in the SyntaxChecker registry
+     * @throws LdapException if the OID is not found in the SyntaxChecker registry
      */
-    SyntaxChecker lookupSyntaxCheckerRegistry( String oid ) throws NamingException;
+    SyntaxChecker lookupSyntaxCheckerRegistry( String oid ) throws LdapException;
 
 
     /**
@@ -674,99 +673,99 @@ public interface SchemaManager
      * Removes the registered attributeType from the attributeTypeRegistry 
      * 
      * @param String the attributeType OID to unregister
-     * @throws NamingException if the attributeType is invalid
+     * @throws LdapException if the attributeType is invalid
      */
-    SchemaObject unregisterAttributeType( String attributeTypeOid ) throws NamingException;
+    SchemaObject unregisterAttributeType( String attributeTypeOid ) throws LdapException;
 
 
     /**
      * Removes the registered Comparator from the ComparatorRegistry 
      * 
      * @param String the Comparator OID to unregister
-     * @throws NamingException if the Comparator is invalid
+     * @throws LdapException if the Comparator is invalid
      */
-    SchemaObject unregisterComparator( String comparatorOid ) throws NamingException;
+    SchemaObject unregisterComparator( String comparatorOid ) throws LdapException;
 
 
     /**
      * Removes the registered DitControlRule from the DitControlRuleRegistry 
      * 
      * @param String the DitControlRule OID to unregister
-     * @throws NamingException if the DitControlRule is invalid
+     * @throws LdapException if the DitControlRule is invalid
      */
-    SchemaObject unregisterDitControlRule( String ditControlRuleOid ) throws NamingException;
+    SchemaObject unregisterDitControlRule( String ditControlRuleOid ) throws LdapException;
 
 
     /**
      * Removes the registered DitStructureRule from the DitStructureRuleRegistry 
      * 
      * @param String the DitStructureRule OID to unregister
-     * @throws NamingException if the DitStructureRule is invalid
+     * @throws LdapException if the DitStructureRule is invalid
      */
-    SchemaObject unregisterDitStructureRule( String ditStructureRuleOid ) throws NamingException;
+    SchemaObject unregisterDitStructureRule( String ditStructureRuleOid ) throws LdapException;
 
 
     /**
      * Removes the registered MatchingRule from the MatchingRuleRegistry 
      * 
      * @param String the MatchingRuleRule OID to unregister
-     * @throws NamingException if the MatchingRule is invalid
+     * @throws LdapException if the MatchingRule is invalid
      */
-    SchemaObject unregisterMatchingRule( String matchingRuleOid ) throws NamingException;
+    SchemaObject unregisterMatchingRule( String matchingRuleOid ) throws LdapException;
 
 
     /**
      * Removes the registered MatchingRuleUse from the MatchingRuleUseRegistry 
      * 
      * @param String the MatchingRuleUse OID to unregister
-     * @throws NamingException if the MatchingRuleUse is invalid
+     * @throws LdapException if the MatchingRuleUse is invalid
      */
-    SchemaObject unregisterMatchingRuleUse( String matchingRuleUseOid ) throws NamingException;
+    SchemaObject unregisterMatchingRuleUse( String matchingRuleUseOid ) throws LdapException;
 
 
     /**
      * Removes the registered NameForm from the NameFormRegistry 
      * 
      * @param String the NameForm OID to unregister
-     * @throws NamingException if the NameForm is invalid
+     * @throws LdapException if the NameForm is invalid
      */
-    SchemaObject unregisterNameForm( String nameFormOid ) throws NamingException;
+    SchemaObject unregisterNameForm( String nameFormOid ) throws LdapException;
 
 
     /**
      * Removes the registered Normalizer from the NormalizerRegistry 
      * 
      * @param String the Normalizer OID to unregister
-     * @throws NamingException if the Normalizer is invalid
+     * @throws LdapException if the Normalizer is invalid
      */
-    SchemaObject unregisterNormalizer( String normalizerOid ) throws NamingException;
+    SchemaObject unregisterNormalizer( String normalizerOid ) throws LdapException;
 
 
     /**
      * Removes the registered ObjectClass from the ObjectClassRegistry 
      * 
      * @param String the ObjectClass OID to unregister
-     * @throws NamingException if the ObjectClass is invalid
+     * @throws LdapException if the ObjectClass is invalid
      */
-    SchemaObject unregisterObjectClass( String objectClassOid ) throws NamingException;
+    SchemaObject unregisterObjectClass( String objectClassOid ) throws LdapException;
 
 
     /**
      * Removes the registered LdapSyntax from the LdapSyntaxRegistry 
      * 
      * @param String the LdapSyntax OID to unregister
-     * @throws NamingException if the LdapSyntax is invalid
+     * @throws LdapException if the LdapSyntax is invalid
      */
-    SchemaObject unregisterLdapSyntax( String ldapSyntaxOid ) throws NamingException;
+    SchemaObject unregisterLdapSyntax( String ldapSyntaxOid ) throws LdapException;
 
 
     /**
      * Removes the registered SyntaxChecker from the SyntaxCheckerRegistry 
      * 
      * @param String the SyntaxChecker OID to unregister
-     * @throws NamingException if the SyntaxChecker is invalid
+     * @throws LdapException if the SyntaxChecker is invalid
      */
-    SchemaObject unregisterSyntaxChecker( String syntaxCheckerOid ) throws NamingException;
+    SchemaObject unregisterSyntaxChecker( String syntaxCheckerOid ) throws LdapException;
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java Tue Mar 16 00:31:36 2010
@@ -24,8 +24,7 @@ import java.io.Serializable;
 import java.util.List;
 import java.util.Map;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
 
 
@@ -115,7 +114,7 @@ public interface SchemaObject extends Se
      * @param errors The errors we got
      * @param registries The Registries
      */
-    void addToRegistries( List<Throwable> errors, Registries registries ) throws NamingException;
+    void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException;
 
 
     /**
@@ -125,7 +124,7 @@ public interface SchemaObject extends Se
      * @param errors The errors we got
      * @param registries The Registries
      */
-    void removeFromRegistries( List<Throwable> errors, Registries registries ) throws NamingException;
+    void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException;
 
 
     /**
@@ -314,9 +313,9 @@ public interface SchemaObject extends Se
      *
      * @param schemaObject the SchemaObject we want to register
      * @param registries The registries in which we want it to be stored
-     * @throws NamingException If the OID is invalid
+     * @throws LdapException If the OID is invalid
      */
-    void registerOid( SchemaObject schemaObject, Registries registries ) throws NamingException;
+    void registerOid( SchemaObject schemaObject, Registries registries ) throws LdapException;
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java Tue Mar 16 00:31:36 2010
@@ -26,14 +26,13 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 
@@ -52,10 +51,10 @@ public class SchemaUtils
      * @param mods the modifications performed on the entry
      * @param entry the source entry that is modified
      * @return the resultant entry after the modifications have taken place
-     * @throws NamingException if there are problems accessing attributes
+     * @throws LdapException if there are problems accessing attributes
      */
     public static Entry getTargetEntry( List<? extends Modification> mods, Entry entry )
-        throws NamingException
+        throws LdapException
     {
         Entry targetEntry = entry.clone();
 
@@ -338,10 +337,10 @@ public class SchemaUtils
      * </pre>
      * @param oc the objectClass to render the description of
      * @return the buffer containing the objectClass description
-     * @throws NamingException if there are any problems accessing objectClass
+     * @throws LdapException if there are any problems accessing objectClass
      * information
      */
-    public static StringBuffer render( ObjectClass oc ) throws NamingException
+    public static StringBuffer render( ObjectClass oc ) throws LdapException
     {
         StringBuffer buf = new StringBuffer();
         buf.append( "( " ).append( oc.getOid() );
@@ -457,10 +456,10 @@ public class SchemaUtils
      * </pre>
      * @param at the AttributeType to render the description for
      * @return the StringBuffer containing the rendered attributeType description
-     * @throws NamingException if there are problems accessing the objects
+     * @throws LdapException if there are problems accessing the objects
      * associated with the attribute type.
      */
-    public static StringBuffer render( AttributeType at ) throws NamingException
+    public static StringBuffer render( AttributeType at ) throws LdapException
     {
         StringBuffer buf = new StringBuffer();
         buf.append( "( " ).append( at.getOid() );
@@ -604,7 +603,7 @@ public class SchemaUtils
      * </pre>
      * @param atd the AttributeTypeDescription to render the description for
      * @return the StringBuffer containing the rendered attributeType description
-     * @throws NamingException if there are problems accessing the objects
+     * @throws LdapException if there are problems accessing the objects
      * associated with the attribute type.
      *
     public static StringBuffer render( AttributeType attributeType )
@@ -780,10 +779,10 @@ public class SchemaUtils
      * </pre>
      * @param mr the MatchingRule to render the description for
      * @return the StringBuffer containing the rendered matchingRule description
-     * @throws NamingException if there are problems accessing the objects
+     * @throws LdapException if there are problems accessing the objects
      * associated with the MatchingRule.
      */
-    public static StringBuffer render( MatchingRule mr ) throws NamingException
+    public static StringBuffer render( MatchingRule mr ) throws LdapException
     {
         StringBuffer buf = new StringBuffer();
         buf.append( "( " ).append( mr.getOid() );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SyntaxChecker.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SyntaxChecker.java Tue Mar 16 00:31:36 2010
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.ldap.schema;
 
 
-import javax.naming.NamingException;
+import org.apache.directory.shared.ldap.exception.LdapException;
 
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -73,9 +73,9 @@ public abstract class SyntaxChecker exte
      * syntax.
      * 
      * @param value the value of some attribute with the syntax
-     * @throws NamingException if the value does not conform to the attribute syntax.
+     * @throws LdapException if the value does not conform to the attribute syntax.
      */
-    public void assertSyntax( Object value ) throws NamingException
+    public void assertSyntax( Object value ) throws LdapException
     {
         if ( !isValidSyntax( value ) )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DnComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DnComparator.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DnComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DnComparator.java Tue Mar 16 00:31:36 2010
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import javax.naming.Name;
-import javax.naming.NamingException;
+import org.apache.directory.shared.ldap.exception.LdapException;
 
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.name.DN;
@@ -59,7 +59,7 @@ public class DnComparator extends LdapCo
             dn0 = getDn( obj0 );
             dn1 = getDn( obj1 );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             // -- what do we do here ?
             return -1;
@@ -69,7 +69,7 @@ public class DnComparator extends LdapCo
     }
 
 
-    public DN getDn( Object obj ) throws NamingException
+    public DN getDn( Object obj ) throws LdapException
     {
         DN dn = null;
         

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/NormalizingComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/NormalizingComparator.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/NormalizingComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/NormalizingComparator.java Tue Mar 16 00:31:36 2010
@@ -22,7 +22,7 @@ package org.apache.directory.shared.ldap
 
 import java.util.Comparator;
 
-import javax.naming.NamingException;
+import org.apache.directory.shared.ldap.exception.LdapException;
 
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -81,7 +81,7 @@ import org.slf4j.LoggerFactory;
         {
             n1 = normalizer.normalize( o1 );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             LOG.warn( "Failed to normalize: " + o1, e );
             n1 = o1;
@@ -91,7 +91,7 @@ import org.slf4j.LoggerFactory;
         {
             n2 = normalizer.normalize( o2 );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             LOG.warn( "Failed to normalize: " + o2, e );
             n2 = o2;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/SerializableComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/SerializableComparator.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/SerializableComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/SerializableComparator.java Tue Mar 16 00:31:36 2010
@@ -22,9 +22,8 @@ package org.apache.directory.shared.ldap
 
 import java.util.Comparator;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 
@@ -76,7 +75,7 @@ public class SerializableComparator<E> e
             {
                 wrapped = (Comparator<E>)schemaManager.lookupComparatorRegistry( matchingRuleOid );
             }
-            catch ( NamingException e )
+            catch ( LdapException e )
             {
                 throw new RuntimeException( I18n.err( I18n.ERR_04221, matchingRuleOid ) );
             }
@@ -97,7 +96,7 @@ public class SerializableComparator<E> e
             {
                 wrapped = (Comparator<E>)schemaManager.lookupComparatorRegistry( matchingRuleOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // Not found : get the default comparator
                 wrapped = (Comparator<E>)new ComparableComparator<Comparable<E>>( matchingRuleOid );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java Tue Mar 16 00:31:36 2010
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import javax.naming.Name;
-import javax.naming.NamingException;
+import org.apache.directory.shared.ldap.exception.LdapException;
 
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.name.DN;
@@ -76,7 +76,7 @@ public class UniqueMemberComparator exte
             {
                 return getDn( dnstr0 ).compareTo( getDn( dnstr1 ) );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 return -1;
             }
@@ -112,7 +112,7 @@ public class UniqueMemberComparator exte
                 {
                     dn0 = new DN( dnstr0.substring( 0, dash0 ) );
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     return -1;
                 }
@@ -133,7 +133,7 @@ public class UniqueMemberComparator exte
                 {
                     dn1 = new DN( dnstr0.substring( 0, dash1 ) );
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     return 1;
                 }
@@ -164,7 +164,7 @@ public class UniqueMemberComparator exte
     }
 
 
-    public DN getDn( Object obj ) throws NamingException
+    public DN getDn( Object obj ) throws LdapException
     {
         DN dn = null;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/BooleanNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/BooleanNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/BooleanNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/BooleanNormalizer.java Tue Mar 16 00:31:36 2010
@@ -23,7 +23,7 @@ package org.apache.directory.shared.ldap
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
-import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 
 
@@ -51,7 +51,7 @@ public class BooleanNormalizer extends N
     /**
      * {@inheritDoc}
      */
-    public Value<?> normalize( Value<?> value ) throws LdapException
+    public Value<?> normalize( Value<?> value ) throws LdapInvalidDnException
     {
         if ( value == null )
         {
@@ -67,7 +67,7 @@ public class BooleanNormalizer extends N
     /**
      * {@inheritDoc}
      */
-    public String normalize( String value ) throws LdapException
+    public String normalize( String value ) throws LdapInvalidDnException
     {
         if ( value == null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ConcreteNameComponentNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ConcreteNameComponentNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ConcreteNameComponentNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ConcreteNameComponentNormalizer.java Tue Mar 16 00:31:36 2010
@@ -22,8 +22,6 @@ package org.apache.directory.shared.ldap
 
 import java.io.UnsupportedEncodingException;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.exception.LdapException;
@@ -131,7 +129,7 @@ public class ConcreteNameComponentNormal
             {
                 String message = I18n.err( I18n.ERR_04222 );
                 LOG.error( message );
-                throw new NamingException( message );
+                throw new LdapException( message );
             }
         }
         
@@ -160,7 +158,7 @@ public class ConcreteNameComponentNormal
             {
                 String message = I18n.err( I18n.ERR_04223 );
                 LOG.error( message );
-                throw new NamingException( message );
+                throw new LdapException( message );
             }
         }
     }
@@ -193,9 +191,9 @@ public class ConcreteNameComponentNormal
      * @param id the name or oid of the attribute in the name component to
      * normalize the value of
      * @return the Normalizer to use for normalizing the value of the attribute
-     * @throws NamingException if there are failures resolving the Normalizer
+     * @throws LdapException if there are failures resolving the Normalizer
      */
-    private Normalizer lookup( String id ) throws NamingException
+    private Normalizer lookup( String id ) throws LdapException
     {
         AttributeType type = schemaManager.lookupAttributeTypeRegistry( id );
         MatchingRule mrule = type.getEquality();
@@ -218,7 +216,7 @@ public class ConcreteNameComponentNormal
     }
 
 
-    public String normalizeName( String attributeName ) throws NamingException
+    public String normalizeName( String attributeName ) throws LdapException
     {
         return schemaManager.getAttributeTypeRegistry().getOidByName( attributeName );
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizer.java Tue Mar 16 00:31:36 2010
@@ -22,11 +22,12 @@ package org.apache.directory.shared.ldap
 
 import java.io.IOException;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.PrepareString;
 
@@ -69,7 +70,7 @@ public class DeepTrimNormalizer extends 
    /**
     * {@inheritDoc}
     */
-   public Value<?> normalize( Value<?> value ) throws NamingException
+   public Value<?> normalize( Value<?> value ) throws LdapException
    {
        try
        {
@@ -80,7 +81,7 @@ public class DeepTrimNormalizer extends 
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
        }
    }
 
@@ -88,7 +89,7 @@ public class DeepTrimNormalizer extends 
    /**
     * {@inheritDoc}
     */
-   public String normalize( String value ) throws NamingException
+   public String normalize( String value ) throws LdapException
    {
        try
        {
@@ -99,7 +100,7 @@ public class DeepTrimNormalizer extends 
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
        }
    }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimToLowerNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimToLowerNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimToLowerNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimToLowerNormalizer.java Tue Mar 16 00:31:36 2010
@@ -22,11 +22,12 @@ package org.apache.directory.shared.ldap
 
 import java.io.IOException;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.PrepareString;
 
@@ -68,7 +69,7 @@ public class DeepTrimToLowerNormalizer e
     /**
      * {@inheritDoc}
      */
-    public Value<?> normalize( Value<?> value ) throws NamingException
+    public Value<?> normalize( Value<?> value ) throws LdapException
     {
         if ( value == null )
         {
@@ -84,7 +85,7 @@ public class DeepTrimToLowerNormalizer e
         }
         catch ( IOException ioe )
         {
-            throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
         }
     }
 
@@ -92,7 +93,7 @@ public class DeepTrimToLowerNormalizer e
     /**
      * {@inheritDoc}
      */
-    public String normalize( String value ) throws NamingException
+    public String normalize( String value ) throws LdapException
     {
         if ( value == null )
         {
@@ -108,7 +109,7 @@ public class DeepTrimToLowerNormalizer e
         }
         catch ( IOException ioe )
         {
-            throw new NamingException( I18n.err( I18n.ERR_04224,  value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224,  value ) );
         }
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DefaultStringNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DefaultStringNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DefaultStringNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DefaultStringNormalizer.java Tue Mar 16 00:31:36 2010
@@ -19,11 +19,10 @@
  */
 package org.apache.directory.shared.ldap.schema.normalizers;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -55,7 +54,7 @@ public class DefaultStringNormalizer ext
     /**
      * {@inheritDoc}
      */
-    public Value<?> normalize( Value<?> value ) throws NamingException
+    public Value<?> normalize( Value<?> value ) throws LdapException
     {
         String str = value.getString();
         
@@ -71,7 +70,7 @@ public class DefaultStringNormalizer ext
     /**
      * {@inheritDoc}
      */
-    public String normalize( String value ) throws NamingException
+    public String normalize( String value ) throws LdapException
     {
         if ( StringTools.isEmpty( value ) )
         {
@@ -87,9 +86,9 @@ public class DefaultStringNormalizer ext
      *
      * @param string The string to normalize
      * @return The normalized object
-     * @throws NamingException If the normalization throws an error
+     * @throws LdapException If the normalization throws an error
      */
-    public static String normalizeString( String string ) throws NamingException
+    public static String normalizeString( String string ) throws LdapException
     {
         return NORMALIZER.normalize( string );
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DnNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DnNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DnNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DnNormalizer.java Tue Mar 16 00:31:36 2010
@@ -20,11 +20,10 @@
 package org.apache.directory.shared.ldap.schema.normalizers;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -56,7 +55,7 @@ public class DnNormalizer extends Normal
     /**
      * {@inheritDoc}
      */
-    public Value<?> normalize( Value<?> value ) throws NamingException
+    public Value<?> normalize( Value<?> value ) throws LdapException
     {
         DN dn = null;
         
@@ -72,7 +71,7 @@ public class DnNormalizer extends Normal
     /**
      * {@inheritDoc}
      */
-    public String normalize( String value ) throws NamingException
+    public String normalize( String value ) throws LdapException
     {
         DN dn = null;
         
@@ -87,9 +86,9 @@ public class DnNormalizer extends Normal
      * Normalize a DN
      * @param value The DN to normalize
      * @return A normalized DN
-     * @throws NamingException
+     * @throws LdapException
      */
-    public String normalize( DN value ) throws NamingException
+    public String normalize( DN value ) throws LdapException
     {
         DN dn = null;
         

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/GeneralizedTimeNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/GeneralizedTimeNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/GeneralizedTimeNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/GeneralizedTimeNormalizer.java Tue Mar 16 00:31:36 2010
@@ -23,12 +23,13 @@ package org.apache.directory.shared.ldap
 import java.io.IOException;
 import java.text.ParseException;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.PrepareString;
 import org.apache.directory.shared.ldap.util.GeneralizedTime;
@@ -68,7 +69,7 @@ public class GeneralizedTimeNormalizer e
     /**
      * {@inheritDoc}
      */
-    public Value<?> normalize( Value<?> value ) throws NamingException
+    public Value<?> normalize( Value<?> value ) throws LdapException
     {
         try
         {
@@ -78,7 +79,7 @@ public class GeneralizedTimeNormalizer e
         }
         catch ( IOException ioe )
         {
-            throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
         }
     }
 
@@ -86,7 +87,7 @@ public class GeneralizedTimeNormalizer e
     /**
      * {@inheritDoc}
      */
-    public String normalize( String value ) throws NamingException
+    public String normalize( String value ) throws LdapException
     {
         try
         {
@@ -100,11 +101,11 @@ public class GeneralizedTimeNormalizer e
         }
         catch ( IOException ioe )
         {
-            throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
         }
         catch ( ParseException pe )
         {
-            throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
         }
     }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NameOrNumericIdNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NameOrNumericIdNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NameOrNumericIdNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NameOrNumericIdNormalizer.java Tue Mar 16 00:31:36 2010
@@ -20,15 +20,12 @@
 package org.apache.directory.shared.ldap.schema.normalizers;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapOtherException;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.NumericOidSyntaxChecker;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizer.java Tue Mar 16 00:31:36 2010
@@ -22,12 +22,12 @@ package org.apache.directory.shared.ldap
 
 import java.io.IOException;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.PrepareString;
 
@@ -54,7 +54,7 @@ public class NumericNormalizer extends N
    /**
     * {@inheritDoc}
     */
-   public Value<?> normalize( Value<?> value ) throws NamingException
+   public Value<?> normalize( Value<?> value ) throws LdapException
    {
        try
        {
@@ -65,7 +65,7 @@ public class NumericNormalizer extends N
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 
@@ -73,7 +73,7 @@ public class NumericNormalizer extends N
    /**
     * {@inheritDoc}
     */
-   public String normalize( String value ) throws NamingException
+   public String normalize( String value ) throws LdapException
    {
        try
        {
@@ -82,7 +82,7 @@ public class NumericNormalizer extends N
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 }
\ No newline at end of file



Mime
View raw message