directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r923524 [4/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/registries/ImmutableNormalizerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNormalizerRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNormalizerRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNormalizerRegistry.java Tue Mar 16 00:31:36 2010
@@ -22,10 +22,10 @@ package org.apache.directory.shared.ldap
 
 import java.util.Iterator;
 
-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.exception.LdapOperationNotSupportedException;
+import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -58,27 +58,27 @@ public class ImmutableNormalizerRegistry
     /**
      *  {@inheritDoc}
      */
-    public void register( Normalizer normalizer ) throws NamingException
+    public void register( Normalizer normalizer ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04283 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04283 ) );
     }
 
 
     /**
      *  {@inheritDoc}
      */
-    public Normalizer unregister( String numericOid ) throws NamingException
+    public Normalizer unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04283 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04283 ) );
     }
 
 
     /**
      *  {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04283 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04283 ) );
     }
 
 
@@ -112,7 +112,7 @@ public class ImmutableNormalizerRegistry
     /**
      *  {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableNormalizerRegistry.getOidByName( name );
     }
@@ -121,7 +121,7 @@ public class ImmutableNormalizerRegistry
     /**
      *  {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableNormalizerRegistry.getSchemaName( oid );
     }
@@ -148,7 +148,7 @@ public class ImmutableNormalizerRegistry
     /**
      *  {@inheritDoc}
      */
-    public Normalizer lookup( String oid ) throws NamingException
+    public Normalizer lookup( String oid ) throws LdapException
     {
         return immutableNormalizerRegistry.lookup( oid );
     }
@@ -166,9 +166,9 @@ public class ImmutableNormalizerRegistry
     /**
      *  {@inheritDoc}
      */
-    public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
+    public void renameSchema( String originalSchemaName, String newSchemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04283 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04283 ) );
     }
 
 
@@ -184,17 +184,17 @@ public class ImmutableNormalizerRegistry
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04283 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04283 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public Normalizer unregister( Normalizer schemaObject ) throws NamingException
+    public Normalizer unregister( Normalizer schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04283 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04283 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableObjectClassRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableObjectClassRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableObjectClassRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableObjectClassRegistry.java Tue Mar 16 00:31:36 2010
@@ -23,10 +23,10 @@ package org.apache.directory.shared.ldap
 import java.util.Iterator;
 import java.util.List;
 
-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.exception.LdapOperationNotSupportedException;
+import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -59,7 +59,7 @@ public class ImmutableObjectClassRegistr
     /**
      * {@inheritDoc}
      */
-    public boolean hasDescendants( String ancestorId ) throws NamingException
+    public boolean hasDescendants( String ancestorId ) throws LdapException
     {
         return immutableObjectClassRegistry.hasDescendants( ancestorId );
     }
@@ -68,7 +68,7 @@ public class ImmutableObjectClassRegistr
     /**
      * {@inheritDoc}
      */
-    public Iterator<ObjectClass> descendants( String ancestorId ) throws NamingException
+    public Iterator<ObjectClass> descendants( String ancestorId ) throws LdapException
     {
         return immutableObjectClassRegistry.descendants( ancestorId );
     }
@@ -77,36 +77,36 @@ public class ImmutableObjectClassRegistr
     /**
      * {@inheritDoc}
      */
-    public void registerDescendants( ObjectClass objectClass, List<ObjectClass> ancestors ) throws NamingException
+    public void registerDescendants( ObjectClass objectClass, List<ObjectClass> ancestors ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04284 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04284 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterDescendants( ObjectClass attributeType, List<ObjectClass> ancestors ) throws NamingException
+    public void unregisterDescendants( ObjectClass attributeType, List<ObjectClass> ancestors ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04284 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04284 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void register( ObjectClass objectClass ) throws NamingException
+    public void register( ObjectClass objectClass ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04284 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04284 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public ObjectClass unregister( String numericOid ) throws NamingException
+    public ObjectClass unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04284 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04284 ) );
     }
 
 
@@ -140,7 +140,7 @@ public class ImmutableObjectClassRegistr
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableObjectClassRegistry.getOidByName( name );
     }
@@ -149,7 +149,7 @@ public class ImmutableObjectClassRegistr
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableObjectClassRegistry.getSchemaName( oid );
     }
@@ -176,7 +176,7 @@ public class ImmutableObjectClassRegistr
     /**
      * {@inheritDoc}
      */
-    public ObjectClass lookup( String oid ) throws NamingException
+    public ObjectClass lookup( String oid ) throws LdapException
     {
         return immutableObjectClassRegistry.lookup( oid );
     }
@@ -194,18 +194,18 @@ public class ImmutableObjectClassRegistr
     /**
      * {@inheritDoc}
      */
-    public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
+    public void renameSchema( String originalSchemaName, String newSchemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04284 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04284 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04284 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04284 ) );
     }
 
 
@@ -221,17 +221,17 @@ public class ImmutableObjectClassRegistr
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04284 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04284 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public ObjectClass unregister( ObjectClass schemaObject ) throws NamingException
+    public ObjectClass unregister( ObjectClass schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04284 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04284 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableSyntaxCheckerRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableSyntaxCheckerRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableSyntaxCheckerRegistry.java Tue Mar 16 00:31:36 2010
@@ -22,10 +22,10 @@ package org.apache.directory.shared.ldap
 
 import java.util.Iterator;
 
-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.exception.LdapOperationNotSupportedException;
+import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
@@ -58,27 +58,27 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public void register( SyntaxChecker syntaxChecker ) throws NamingException
+    public void register( SyntaxChecker syntaxChecker ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04285 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public SyntaxChecker unregister( String numericOid ) throws NamingException
+    public SyntaxChecker unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04285 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04285 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
     }
 
 
@@ -112,7 +112,7 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableSyntaxCheckerRegistry.getOidByName( name );
     }
@@ -121,7 +121,7 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableSyntaxCheckerRegistry.getSchemaName( oid );
     }
@@ -148,7 +148,7 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public SyntaxChecker lookup( String oid ) throws NamingException
+    public SyntaxChecker lookup( String oid ) throws LdapException
     {
         return immutableSyntaxCheckerRegistry.lookup( oid );
     }
@@ -166,9 +166,9 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
+    public void renameSchema( String originalSchemaName, String newSchemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04285 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
     }
 
 
@@ -184,17 +184,17 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04285 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public SyntaxChecker unregister( SyntaxChecker schemaObject ) throws NamingException
+    public SyntaxChecker unregister( SyntaxChecker schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04285 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/NormalizerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/NormalizerRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/NormalizerRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/NormalizerRegistry.java Tue Mar 16 00:31:36 2010
@@ -19,9 +19,7 @@
  */
 package org.apache.directory.shared.ldap.schema.registries;
 
-
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 
 
@@ -38,10 +36,10 @@ public interface NormalizerRegistry exte
      * Registers a new Normalizer with this registry.
      *
      * @param normalizer the Normalizer to register
-     * @throws NamingException if the Normalizer is already registered or
+     * @throws LdapException if the Normalizer is already registered or
      * the registration operation is not supported
      */
-    void register( Normalizer normalizer ) throws NamingException;
+    void register( Normalizer normalizer ) throws LdapException;
 
 
     /**
@@ -49,9 +47,9 @@ public interface NormalizerRegistry exte
      * numeric OID.
      * 
      * @param numericOid the numeric identifier
-     * @throws NamingException if the numeric identifier is invalid
+     * @throws LdapException if the numeric identifier is invalid
      */
-    Normalizer unregister( String numericOid ) throws NamingException;
+    Normalizer unregister( String numericOid ) throws LdapException;
     
     
     /**
@@ -60,7 +58,7 @@ public interface NormalizerRegistry exte
      * 
      * @param schemaName the name of the schema whose Normalizers will be removed from
      */
-    void unregisterSchemaElements( String schemaName ) throws NamingException;
+    void unregisterSchemaElements( String schemaName ) throws LdapException;
     
     
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ObjectClassRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ObjectClassRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ObjectClassRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ObjectClassRegistry.java Tue Mar 16 00:31:36 2010
@@ -23,8 +23,7 @@ package org.apache.directory.shared.ldap
 import java.util.Iterator;
 import java.util.List;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 
 
@@ -43,10 +42,10 @@ public interface ObjectClassRegistry ext
      * @param ancestorId the name alias or OID for an ObjectClass
      * @return an Iterator over the ObjectClasses which have the ancestor
      * within their superior chain to the top
-     * @throws NamingException if the ancestor ObjectClass cannot be 
+     * @throws LdapException if the ancestor ObjectClass cannot be 
      * discerned from the ancestorId supplied
      */
-    boolean hasDescendants( String ancestorId ) throws NamingException;
+    boolean hasDescendants( String ancestorId ) throws LdapException;
     
     
     /**
@@ -56,10 +55,10 @@ public interface ObjectClassRegistry ext
      * @param ancestorId the name alias or OID for an ObjectClass
      * @return an Iterator over the ObjectClasses which have the ancestor
      * within their superior chain to the top
-     * @throws NamingException if the ancestor ObjectClass cannot be 
+     * @throws LdapException if the ancestor ObjectClass cannot be 
      * discerned from the ancestorId supplied
      */
-    Iterator<ObjectClass> descendants( String ancestorId ) throws NamingException;
+    Iterator<ObjectClass> descendants( String ancestorId ) throws LdapException;
 
     
     /**
@@ -67,10 +66,10 @@ public interface ObjectClassRegistry ext
      * descendants.
      * 
      * @param attributeType The ObjectClass to register
-     * @throws NamingException If something went wrong
+     * @throws LdapException If something went wrong
      */
     void registerDescendants( ObjectClass objectClass, List<ObjectClass> ancestors ) 
-        throws NamingException;
+        throws LdapException;
     
     
     /**
@@ -79,29 +78,29 @@ public interface ObjectClassRegistry ext
      * 
      * @param attributeType The ObjectClass to unregister
      * @param ancestor its ancestor 
-     * @throws NamingException If something went wrong
+     * @throws LdapException If something went wrong
      */
     void unregisterDescendants( ObjectClass attributeType, List<ObjectClass> ancestors ) 
-        throws NamingException;
+        throws LdapException;
     
     
     /**
      * Registers a new ObjectClass with this registry.
      *
      * @param objectClass the ObjectClass to register
-     * @throws NamingException if the ObjectClass is already registered or
+     * @throws LdapException if the ObjectClass is already registered or
      * the registration operation is not supported
      */
-    void register( ObjectClass objectClass ) throws NamingException;
+    void register( ObjectClass objectClass ) throws LdapException;
     
     
     /**
      * Removes the ObjectClass registered with this registry.
      * 
      * @param numericOid the numeric identifier
-     * @throws NamingException if the numeric identifier is invalid
+     * @throws LdapException if the numeric identifier is invalid
      */
-    ObjectClass unregister( String numericOid ) throws NamingException;
+    ObjectClass unregister( String numericOid ) throws LdapException;
     
     
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/OidRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/OidRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/OidRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/OidRegistry.java Tue Mar 16 00:31:36 2010
@@ -26,10 +26,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 import org.slf4j.Logger;
@@ -73,9 +72,9 @@ public class OidRegistry implements Iter
      * 
      * @param oid the object identifier
      * @return the primary name
-     * @throws NamingException if oid does not exist
+     * @throws LdapException if oid does not exist
      */
-    public String getPrimaryName( String oid ) throws NamingException
+    public String getPrimaryName( String oid ) throws LdapException
     {
         SchemaObject schemaObject = byOid.get( oid );
 
@@ -87,7 +86,7 @@ public class OidRegistry implements Iter
         {
             String msg = I18n.err( I18n.ERR_04286, oid );
             LOG.error( msg );
-            throw new NamingException( msg );
+            throw new LdapException( msg );
         }
     }
 
@@ -97,9 +96,9 @@ public class OidRegistry implements Iter
      * 
      * @param oid the object identifier
      * @return the associated SchemaObject
-     * @throws NamingException if oid does not exist
+     * @throws LdapException if oid does not exist
      */
-    public SchemaObject getSchemaObject( String oid ) throws NamingException
+    public SchemaObject getSchemaObject( String oid ) throws LdapException
     {
         SchemaObject schemaObject = byOid.get( oid );
 
@@ -111,7 +110,7 @@ public class OidRegistry implements Iter
         {
             String msg = I18n.err( I18n.ERR_04287, oid );
             LOG.error( msg );
-            throw new NamingException( msg );
+            throw new LdapException( msg );
         }
     }
 
@@ -126,9 +125,9 @@ public class OidRegistry implements Iter
      * 
      * @param oid the OID for which we return the set of common names
      * @return a sorted set of names
-     * @throws NamingException if oid does not exist
+     * @throws LdapException if oid does not exist
      */
-    public List<String> getNameSet( String oid ) throws NamingException
+    public List<String> getNameSet( String oid ) throws LdapException
     {
         SchemaObject schemaObject = byOid.get( oid );
 
@@ -136,7 +135,7 @@ public class OidRegistry implements Iter
         {
             String msg = I18n.err( I18n.ERR_04288, oid );
             LOG.error( msg );
-            throw new NamingException( msg );
+            throw new LdapException( msg );
         }
 
         List<String> names = schemaObject.getNames();
@@ -178,14 +177,14 @@ public class OidRegistry implements Iter
      * @param type The SchemaObjectType the oid belongs to
      * @param oid the OID to add or associate a new name with
      */
-    public void register( SchemaObject schemaObject ) throws NamingException
+    public void register( SchemaObject schemaObject ) throws LdapException
     {
         if ( schemaObject == null )
         {
             String message = I18n.err( I18n.ERR_04289 );
 
             LOG.debug( message );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
 
         String oid = schemaObject.getOid();
@@ -195,7 +194,7 @@ public class OidRegistry implements Iter
             String message = I18n.err( I18n.ERR_04290 );
 
             LOG.debug( message );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
 
         /*
@@ -236,9 +235,9 @@ public class OidRegistry implements Iter
      * Removes an oid from this registry.
      *
      * @param oid the numeric identifier for the object
-     * @throws NamingException if the identifier is not numeric
+     * @throws LdapException if the identifier is not numeric
      */
-    public void unregister( String oid ) throws NamingException
+    public void unregister( String oid ) throws LdapException
     {
         // Removes the <OID, names> from the byOID map
         SchemaObject removed = byOid.remove( oid );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java Tue Mar 16 00:31:36 2010
@@ -28,11 +28,10 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-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.exception.LdapOperationNotSupportedException;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -294,7 +293,7 @@ public class Registries implements Schem
                 return attributeType.getOid();
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Fall down to the next registry
         }
@@ -309,7 +308,7 @@ public class Registries implements Schem
                 return objectClass.getOid();
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Fall down to the next registry
         }
@@ -324,7 +323,7 @@ public class Registries implements Schem
                 return ldapSyntax.getOid();
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Fall down to the next registry
         }
@@ -339,7 +338,7 @@ public class Registries implements Schem
                 return matchingRule.getOid();
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Fall down to the next registry
         }
@@ -354,7 +353,7 @@ public class Registries implements Schem
                 return matchingRuleUse.getOid();
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Fall down to the next registry
         }
@@ -369,7 +368,7 @@ public class Registries implements Schem
                 return nameForm.getOid();
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Fall down to the next registry
         }
@@ -384,7 +383,7 @@ public class Registries implements Schem
                 return ditContentRule.getOid();
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Fall down to the next registry
         }
@@ -399,7 +398,7 @@ public class Registries implements Schem
                 return ditStructureRule.getOid();
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // No more registries to look at...
         }
@@ -581,7 +580,7 @@ public class Registries implements Schem
         {
             attributeType.addToRegistries( this );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             String msg = "Cannot build the AttributeType references for the object " + attributeType.getName() +
                 ", error : " + ne.getMessage();
@@ -616,7 +615,7 @@ public class Registries implements Schem
         {
             attributeTypeRegistry.addMappingFor( attributeType );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             errors.add( ne );
             LOG.info( ne.getMessage() );
@@ -719,12 +718,12 @@ public class Registries implements Schem
         {
             schemaObject.addToRegistries( errors, this );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Not allowed.
             String msg = I18n.err( I18n.ERR_04292, schemaObject.getName(), ne.getLocalizedMessage() );
 
-            Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
             errors.add( error );
             LOG.info( msg );
         }
@@ -740,12 +739,12 @@ public class Registries implements Schem
         {
             schemaObject.removeFromRegistries( errors, this );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Not allowed.
             String msg = I18n.err( I18n.ERR_04293, schemaObject.getName(), ne.getLocalizedMessage() );
 
-            Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
             errors.add( error );
             LOG.info( msg );
         }
@@ -909,7 +908,7 @@ public class Registries implements Schem
         {
             syntax.addToRegistries( errors, this );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             errors.add( e );
         }
@@ -929,7 +928,7 @@ public class Registries implements Schem
         {
             normalizer.addToRegistries( errors, this );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             errors.add( e );
         }
@@ -949,7 +948,7 @@ public class Registries implements Schem
         {
             comparator.addToRegistries( errors, this );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             errors.add( e );
         }
@@ -969,7 +968,7 @@ public class Registries implements Schem
         {
             syntaxChecker.addToRegistries( errors, this );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             errors.add( e );
         }
@@ -992,7 +991,7 @@ public class Registries implements Schem
             {
                 ldapSyntaxRegistry.lookup( syntaxOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // This MR's syntax has not been loaded into the Registries.
                 errors.add( ne );
@@ -1001,8 +1000,8 @@ public class Registries implements Schem
         else
         {
             // This is an error. 
-            Throwable error = new LdapSchemaViolationException( I18n.err( I18n.ERR_04294, matchingRule.getOid() ), 
-            		ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, 
+            		I18n.err( I18n.ERR_04294, matchingRule.getOid() ) );
             errors.add( error );
         }
 
@@ -1012,8 +1011,8 @@ public class Registries implements Schem
         if ( normalizer == null )
         {
             // Ok, no normalizer, this is an error
-            Throwable error = new LdapSchemaViolationException( I18n.err( I18n.ERR_04295, matchingRule.getOid() ),
-            		ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+            		I18n.err( I18n.ERR_04295, matchingRule.getOid() ) );
             errors.add( error );
         }
 
@@ -1023,8 +1022,8 @@ public class Registries implements Schem
         if ( comparator == null )
         {
             // Ok, no comparator, this is an error
-            Throwable error = new LdapSchemaViolationException( I18n.err( I18n.ERR_04296, matchingRule.getOid() ),
-            		ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+            		I18n.err( I18n.ERR_04296, matchingRule.getOid() ) );
             errors.add( error );
         }
     }
@@ -1047,7 +1046,7 @@ public class Registries implements Schem
             {
                 superior = attributeTypeRegistry.lookup( superiorOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // This AT's superior has not been loaded into the Registries.
                 if ( !processed.contains( superiorOid ) )
@@ -1068,8 +1067,8 @@ public class Registries implements Schem
                 else
                 {
                     // Not allowed : we have a cyle
-                    Throwable error = new LdapSchemaViolationException( I18n.err( I18n.ERR_04297, attributeType.getOid() ),
-                        ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                    Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                        I18n.err( I18n.ERR_04297, attributeType.getOid() ) );
                     errors.add( error );
                     return;
                 }
@@ -1087,7 +1086,7 @@ public class Registries implements Schem
             {
                 ldapSyntaxRegistry.lookup( syntaxOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // This AT's syntax has not been loaded into the Registries.
                 errors.add( ne );
@@ -1100,8 +1099,8 @@ public class Registries implements Schem
             {
                 // This is an error. if the AT does not have a Syntax,
                 // then it must have a superior, which syntax is get from.
-                Throwable error = new LdapSchemaViolationException( I18n.err( I18n.ERR_04298, attributeType.getOid() ),
-                    ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                    I18n.err( I18n.ERR_04298, attributeType.getOid() ) );
                 errors.add( error );
             }
         }
@@ -1117,7 +1116,7 @@ public class Registries implements Schem
             {
                 matchingRuleRegistry.lookup( equalityOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // This AT's EQUALITY matchingRule has not been loaded into the Registries.
                 errors.add( ne );
@@ -1135,7 +1134,7 @@ public class Registries implements Schem
             {
                 matchingRuleRegistry.lookup( orderingOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // This AT's ORDERING matchingRule has not been loaded into the Registries.
                 errors.add( ne );
@@ -1153,7 +1152,7 @@ public class Registries implements Schem
             {
                 matchingRuleRegistry.lookup( substringOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // This AT's SUBSTR matchingRule has not been loaded into the Registries.
                 errors.add( ne );
@@ -1235,8 +1234,8 @@ public class Registries implements Schem
                 if ( musts.contains( may ) )
                 {
                     // This is not allowed.
-                    Throwable error = new LdapSchemaViolationException( I18n.err( I18n.ERR_04299, objectClass.getOid() ),
-                        ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                    Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
+                        I18n.err( I18n.ERR_04299, objectClass.getOid() ) );
                     errors.add( error );
                     return;
                 }
@@ -1258,7 +1257,7 @@ public class Registries implements Schem
             {
                 superior = objectClassRegistry.lookup( superiorOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // This OC's superior has not been loaded into the Registries.
                 if ( !processed.contains( superiorOid ) )
@@ -1279,8 +1278,8 @@ public class Registries implements Schem
                 else
                 {
                     // Not allowed : we have a cyle
-                    Throwable error = new LdapSchemaViolationException( I18n.err( I18n.ERR_04300, objectClass.getOid(), superior) ,
-                        ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
+                    Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ,
+                        I18n.err( I18n.ERR_04300, objectClass.getOid(), superior) );
                     errors.add( error );
                     return;
                 }
@@ -1295,7 +1294,7 @@ public class Registries implements Schem
             {
                 attributeTypeRegistry.lookup( mayOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // This AT has not been loaded into the Registries.
                 errors.add( ne );
@@ -1310,7 +1309,7 @@ public class Registries implements Schem
             {
                 attributeTypeRegistry.lookup( mustOid );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // This AT has not been loaded into the Registries.
                 errors.add( ne );
@@ -1322,7 +1321,7 @@ public class Registries implements Schem
         {
             objectClass.addToRegistries( errors, this );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Do nothing. We may have a broken OC, 
             // but at this point, it doesn't matter.
@@ -1333,7 +1332,7 @@ public class Registries implements Schem
     /**
      * Applies the added SchemaObject to the given register
      */
-    public List<Throwable> add( List<Throwable> errors, SchemaObject schemaObject ) throws NamingException
+    public List<Throwable> add( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
     {
         // Relax the registries
         boolean wasRelaxed = isRelaxed;
@@ -1370,7 +1369,7 @@ public class Registries implements Schem
     /**
      * Remove the given SchemaObject from the registries
      */
-    public List<Throwable> delete( List<Throwable> errors, SchemaObject schemaObject ) throws NamingException
+    public List<Throwable> delete( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
     {
         // Relax the registries
         boolean wasRelaxed = isRelaxed;
@@ -1508,7 +1507,7 @@ public class Registries implements Schem
     /**
      * Register the given SchemaObject into the associated Registry
      */
-    private void register( List<Throwable> errors, SchemaObject schemaObject ) throws NamingException
+    private void register( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
     {
         LOG.debug( "Registering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
 
@@ -1524,7 +1523,7 @@ public class Registries implements Schem
                 // TODO : throw an exception here
                 String msg = I18n.err( I18n.ERR_04301, schemaObject.getObjectType(), schemaObject.getOid() );
                 LOG.error( msg );
-                Throwable error = new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
+                Throwable error = new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
                 errors.add( error );
                 return;
             }
@@ -1592,7 +1591,7 @@ public class Registries implements Schem
      * related Schema.
      *
      * @param schemaObject The schemaObject to register
-     * @throws NamingException If there is a problem
+     * @throws LdapException If there is a problem
      */
     public void associateWithSchema( List<Throwable> errors, SchemaObject schemaObject )
     {
@@ -1604,7 +1603,7 @@ public class Registries implements Schem
             // TODO : throw an exception here
             String msg = I18n.err( I18n.ERR_04301, schemaObject.getObjectType(), schemaObject.getOid() );
             LOG.error( msg );
-            Throwable error = new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
+            Throwable error = new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
             errors.add( error );
             return;
         }
@@ -1643,7 +1642,7 @@ public class Registries implements Schem
                 {
                     globalOidRegistry.register( schemaObject );
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     errors.add( ne );
                     return;
@@ -1660,10 +1659,10 @@ public class Registries implements Schem
      * related Schema.
      *
      * @param schemaObject The schemaObject to register
-     * @throws NamingException If there is a problem
+     * @throws LdapException If there is a problem
      */
 
-    public void dissociateFromSchema( List<Throwable> errors, SchemaObject schemaObject ) throws NamingException
+    public void dissociateFromSchema( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
     {
         LOG.debug( "Unregistering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
 
@@ -1673,7 +1672,7 @@ public class Registries implements Schem
             // TODO : throw an exception here
             String msg = I18n.err( I18n.ERR_04302, schemaObject.getObjectType(), schemaObject.getOid() );
             LOG.error( msg );
-            Throwable error = new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
+            Throwable error = new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
             errors.add( error );
             return;
         }
@@ -1707,7 +1706,7 @@ public class Registries implements Schem
                 {
                     globalOidRegistry.unregister( oid );
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     errors.add( ne );
                     return;
@@ -1723,9 +1722,9 @@ public class Registries implements Schem
      * Unregister a SchemaObject from the registries
      *
      * @param schemaObject The SchemaObject we want to deregister
-     * @throws NamingException If the removal failed
+     * @throws LdapException If the removal failed
      */
-    private SchemaObject unregister( List<Throwable> errors, SchemaObject schemaObject ) throws NamingException
+    private SchemaObject unregister( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
     {
         LOG.debug( "Unregistering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
 
@@ -1741,7 +1740,7 @@ public class Registries implements Schem
                 // TODO : throw an exception here
                 String msg = I18n.err( I18n.ERR_04302, schemaObject.getObjectType(), schemaObject.getOid() );
                 LOG.error( msg );
-                throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
+                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
             }
         }
 
@@ -1804,9 +1803,9 @@ public class Registries implements Schem
      * related Schema.
      *
      * @param schemaObject The schemaObject to remove
-     * @throws NamingException If there is a problem
+     * @throws LdapException If there is a problem
      */
-    public void dissociateFromSchema( SchemaObject schemaObject ) throws NamingException
+    public void dissociateFromSchema( SchemaObject schemaObject ) throws LdapException
     {
         // And unregister the schemaObject within its schema
         Set<SchemaObjectWrapper> content = schemaObjects.get( StringTools.toLowerCase( schemaObject.getSchemaName() ) );
@@ -2598,7 +2597,7 @@ public class Registries implements Schem
                         objects.add(  newWrapper );
                     }
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     int i = 0;
                     i++;
@@ -2697,9 +2696,9 @@ public class Registries implements Schem
     /**
      * Clear the registries from all its elements
      *
-     * @throws NamingException If something goes wrong
+     * @throws LdapException If something goes wrong
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
         // The AttributeTypeRegistry
         if ( attributeTypeRegistry != null )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java Tue Mar 16 00:31:36 2010
@@ -22,8 +22,7 @@ package org.apache.directory.shared.ldap
 
 import java.util.Iterator;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
 
@@ -52,9 +51,9 @@ public interface SchemaObjectRegistry<T 
      *
      * @param id the object identifier or the name
      * @return the schema name
-     * @throws NamingException if the schema object does not exist
+     * @throws LdapException if the schema object does not exist
      */
-    String getSchemaName( String oid ) throws NamingException;
+    String getSchemaName( String oid ) throws LdapException;
 
 
     /**
@@ -71,9 +70,9 @@ public interface SchemaObjectRegistry<T 
      *
      * @param originalSchemaName The original Schema name
      * @param newSchemaName The new Schema name
-     * @throws NamingException if the schema object does not exist
+     * @throws LdapException if the schema object does not exist
      */
-    void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException;
+    void renameSchema( String originalSchemaName, String newSchemaName ) throws LdapException;
 
 
     /**
@@ -97,19 +96,19 @@ public interface SchemaObjectRegistry<T 
      *
      * @param oid the object identifier or name
      * @return the SchemaObject instance for the id
-     * @throws NamingException if the SchemaObject does not exist
+     * @throws LdapException if the SchemaObject does not exist
      */
-    T lookup( String oid ) throws NamingException;
+    T lookup( String oid ) throws LdapException;
 
 
     /**
      * Registers a new SchemaObject with this registry.
      *
      * @param schemaObject the SchemaObject to register
-     * @throws NamingException if the SchemaObject is already registered or
+     * @throws LdapException if the SchemaObject is already registered or
      * the registration operation is not supported
      */
-    void register( T schemaObject ) throws NamingException;
+    void register( T schemaObject ) throws LdapException;
 
 
     /**
@@ -117,18 +116,18 @@ public interface SchemaObjectRegistry<T 
      * numeric OID.
      * 
      * @param numericOid the numeric identifier
-     * @throws NamingException if the numeric identifier is invalid
+     * @throws LdapException if the numeric identifier is invalid
      */
-    T unregister( String numericOid ) throws NamingException;
+    T unregister( String numericOid ) throws LdapException;
 
 
     /**
      * Removes the SchemaObject registered with this registry.
      * 
      * @param T the schemaObject to unregister
-     * @throws NamingException if the schemaObject can't be unregistered is invalid
+     * @throws LdapException if the schemaObject can't be unregistered is invalid
      */
-    T unregister( T schemaObject ) throws NamingException;
+    T unregister( T schemaObject ) throws LdapException;
 
 
     /**
@@ -137,7 +136,7 @@ public interface SchemaObjectRegistry<T 
      * 
      * @param schemaName the name of the schema whose SchemaObjects will be removed from
      */
-    void unregisterSchemaElements( String schemaName ) throws NamingException;
+    void unregisterSchemaElements( String schemaName ) throws LdapException;
 
 
     /**
@@ -149,9 +148,9 @@ public interface SchemaObjectRegistry<T 
      * 
      * @param name The name we are looking the oid for
      * @return The numericOID associated with this name
-     * @throws NamingException If the OID can't be found
+     * @throws LdapException If the OID can't be found
      */
-    String getOidByName( String name ) throws NamingException;
+    String getOidByName( String name ) throws LdapException;
 
 
     /**
@@ -178,5 +177,5 @@ public interface SchemaObjectRegistry<T 
     /**
      * Clear the registry from all its content
      */
-    void clear() throws NamingException;
+    void clear() throws LdapException;
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SyntaxCheckerRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SyntaxCheckerRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SyntaxCheckerRegistry.java Tue Mar 16 00:31:36 2010
@@ -20,8 +20,7 @@
 package org.apache.directory.shared.ldap.schema.registries;
 
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
 
 
@@ -38,10 +37,10 @@ public interface SyntaxCheckerRegistry e
      * Registers a new SyntaxChecker with this registry.
      *
      * @param syntaxChecker the SyntaxChecker to register
-     * @throws NamingException if the SyntaxChecker is already registered or
+     * @throws LdapException if the SyntaxChecker is already registered or
      * the registration operation is not supported
      */
-    void register( SyntaxChecker syntaxChecker ) throws NamingException;
+    void register( SyntaxChecker syntaxChecker ) throws LdapException;
 
 
     /**
@@ -49,9 +48,9 @@ public interface SyntaxCheckerRegistry e
      * numeric OID.
      * 
      * @param numericOid the numeric identifier
-     * @throws NamingException if the numeric identifier is invalid
+     * @throws LdapException if the numeric identifier is invalid
      */
-    SyntaxChecker unregister( String numericOid ) throws NamingException;
+    SyntaxChecker unregister( String numericOid ) throws LdapException;
     
     
     /**
@@ -60,7 +59,7 @@ public interface SyntaxCheckerRegistry e
      * 
      * @param schemaName the name of the schema whose SyntaxCheckers will be removed from
      */
-    void unregisterSchemaElements( String schemaName ) throws NamingException;
+    void unregisterSchemaElements( String schemaName ) throws LdapException;
     
     
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java Tue Mar 16 00:31:36 2010
@@ -40,6 +40,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeTypeException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -244,9 +246,9 @@ public class AttributeUtils
      * @param compared The object we are looking for
      * @param type The attribute type
      * @return <code>true</code> if the value exists in the attribute</code>
-     * @throws NamingException If something went wrong while accessing the data
+     * @throws LdapException If something went wrong while accessing the data
      */
-    public static boolean containsValue( Attribute attr, Value<?> compared, AttributeType type ) throws NamingException
+    public static boolean containsValue( Attribute attr, Value<?> compared, AttributeType type ) throws LdapException
     {
         // quick bypass test
         if ( attr.contains( compared ) )
@@ -973,9 +975,9 @@ public class AttributeUtils
      * 
      * @param entry The entry on which we want to apply a modification
      * @param modification the Modification to be applied
-     * @throws NamingException if some operation fails.
+     * @throws LdapException if some operation fails.
      */
-    public static void applyModification( Entry entry, Modification modification ) throws NamingException
+    public static void applyModification( Entry entry, Modification modification ) throws LdapException
     {
         EntryAttribute modAttr = modification.getAttribute();
         String modificationId = modAttr.getId();
@@ -1193,7 +1195,7 @@ public class AttributeUtils
      * 
      * @throws InvalidAttributeIdentifierException If we get an invalid attribute
      */
-    public static Entry toClientEntry( Attributes attributes, DN dn ) throws InvalidAttributeIdentifierException
+    public static Entry toClientEntry( Attributes attributes, DN dn ) throws LdapException
     {
         if ( attributes instanceof BasicAttributes )
         {
@@ -1215,9 +1217,9 @@ public class AttributeUtils
 
                 return entry;
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
-                throw new InvalidAttributeIdentifierException( ne.getMessage() );
+                throw new LdapInvalidAttributeTypeException( ne.getMessage() );
             }
         }
         else

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java Tue Mar 16 00:31:36 2010
@@ -24,9 +24,9 @@ import java.util.ArrayList;
 import java.util.List;
 
 import javax.naming.Name;
-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.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.name.DN;
 
@@ -77,7 +77,7 @@ public class NamespaceTools
      * @param name2 the second name
      * @return true if the names are siblings, false otherwise.
      */
-    public static boolean isSibling( Name name1, Name name2 ) throws NamingException
+    public static boolean isSibling( Name name1, Name name2 ) throws LdapException
     {
         if ( name1.size() == name2.size() )
         {
@@ -112,9 +112,9 @@ public class NamespaceTools
      * @param descendant the normalized distinguished name of the descendant context
      * @return the relatve normalized name between the ancestor and the
      *         descendant contexts
-     * @throws javax.naming.NamingException if the contexts are not related in the ancestual sense
+     * @throws javax.naming.LdapException if the contexts are not related in the ancestual sense
      */
-    public static Name getRelativeName( Name ancestor, Name descendant ) throws NamingException
+    public static Name getRelativeName( Name ancestor, Name descendant ) throws LdapException
     {
         DN rdn = null;
         
@@ -130,7 +130,7 @@ public class NamespaceTools
             }
             catch( LdapInvalidDnException e )
             {
-                throw new NamingException( e.getMessage() );
+                throw new LdapException( e.getMessage() );
             }
         }
 
@@ -143,7 +143,7 @@ public class NamespaceTools
         }
         else
         {
-            NamingException e = new NamingException( I18n.err( I18n.ERR_04417, descendant, ancestor ) );
+            LdapException e = new LdapException( I18n.err( I18n.ERR_04417, descendant, ancestor ) );
 
             throw e;
         }
@@ -193,10 +193,10 @@ public class NamespaceTools
      * 
      * @param compositeNameComponent a single name component not a whole name
      * @return the components of the complex name component in order
-     * @throws NamingException
+     * @throws LdapException
      *             if nameComponent is invalid (starts with a +)
      */
-    public static String[] getCompositeComponents( String compositeNameComponent ) throws NamingException
+    public static String[] getCompositeComponents( String compositeNameComponent ) throws LdapException
     {
         int lastIndex = compositeNameComponent.length() - 1;
         List<String> comps = new ArrayList<String>();
@@ -207,7 +207,7 @@ public class NamespaceTools
             {
                 if ( ii == 0 )
                 {
-                    throw new NamingException( I18n.err( I18n.ERR_04418, compositeNameComponent ) );
+                    throw new LdapException( I18n.err( I18n.ERR_04418, compositeNameComponent ) );
                 }
                 
                 if ( compositeNameComponent.charAt( ii - 1 ) != '\\' )
@@ -254,9 +254,9 @@ public class NamespaceTools
      * 
      * @param name The name to check 
      * @return <code>true</code> if the name has composite components
-     * @throws NamingException If the name is invalid
+     * @throws LdapException If the name is invalid
      */
-    public static boolean hasCompositeComponents( String name ) throws NamingException
+    public static boolean hasCompositeComponents( String name ) throws LdapException
     {
         for ( int ii = name.length() - 1; ii >= 0; ii-- )
         {
@@ -264,7 +264,7 @@ public class NamespaceTools
             {
                 if ( ii == 0 )
                 {
-                    throw new NamingException( I18n.err( I18n.ERR_04418, name ) );
+                    throw new LdapException( I18n.err( I18n.ERR_04418, name ) );
                 }
                 if ( name.charAt( ii - 1 ) != '\\' )
                 {

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java Tue Mar 16 00:31:36 2010
@@ -27,8 +27,6 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
@@ -38,6 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.ResponseCarryingException;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.ModifyResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
@@ -57,7 +56,7 @@ public class ModifyRequestTest
      * Test the decoding of a ModifyRequest
      */
     @Test
-    public void testDecodeModifyRequest2AttrsSuccess() throws NamingException
+    public void testDecodeModifyRequest2AttrsSuccess() throws LdapException
     {
         Asn1Decoder ldapDecoder = new Asn1Decoder();
 
@@ -231,7 +230,7 @@ public class ModifyRequestTest
      * Test the decoding of a ModifyRequest, with different operations
      */
     @Test
-    public void testDecodeModifyRequestManyOperations() throws NamingException
+    public void testDecodeModifyRequestManyOperations() throws LdapException
     {
         Asn1Decoder ldapDecoder = new Asn1Decoder();
 
@@ -348,7 +347,7 @@ public class ModifyRequestTest
      * Test the decoding of a ModifyRequest, with different operations, take 2
      */
     @Test
-    public void testDecodeModifyRequestManyOperations2() throws NamingException
+    public void testDecodeModifyRequestManyOperations2() throws LdapException
     {
         Asn1Decoder ldapDecoder = new Asn1Decoder();
 
@@ -480,7 +479,7 @@ public class ModifyRequestTest
      * Test the decoding of a ModifyRequest
      */
     @Test
-    public void testDecodeModifyRequest2Attrs3valsSuccess() throws NamingException
+    public void testDecodeModifyRequest2Attrs3valsSuccess() throws LdapException
     {
         Asn1Decoder ldapDecoder = new Asn1Decoder();
 
@@ -1213,7 +1212,7 @@ public class ModifyRequestTest
      * modification with a type and two vals
      */
     @Test
-    public void testDecodeModifyRequestAddOperationModificationType2Vals() throws NamingException
+    public void testDecodeModifyRequestAddOperationModificationType2Vals() throws LdapException
     {
         Asn1Decoder ldapDecoder = new Asn1Decoder();
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java Tue Mar 16 00:31:36 2010
@@ -32,9 +32,8 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.util.Arrays;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -58,7 +57,7 @@ public class ClientBinaryValueTest
     {
         private static final long serialVersionUID = 1L;
         
-        public Value<?> normalize( Value<?> value ) throws NamingException
+        public Value<?> normalize( Value<?> value ) throws LdapException
         {
             if ( value.isBinary() )
             {
@@ -78,7 +77,7 @@ public class ClientBinaryValueTest
             throw new IllegalStateException( "expected byte[] to normalize" );
         }
 
-        public String normalize( String value ) throws NamingException
+        public String normalize( String value ) throws LdapException
         {
             throw new IllegalStateException( "expected byte[] to normalize" );
         }
@@ -92,7 +91,7 @@ public class ClientBinaryValueTest
     {
         private static final long serialVersionUID = 1L;
         
-        public Value<?> normalize( Value<?> value ) throws NamingException
+        public Value<?> normalize( Value<?> value ) throws LdapException
         {
             if ( value.isBinary() )
             {
@@ -102,7 +101,7 @@ public class ClientBinaryValueTest
             throw new IllegalStateException( "expected byte[] to normalize" );
         }
 
-        public String normalize( String value ) throws NamingException
+        public String normalize( String value ) throws LdapException
         {
             throw new IllegalStateException( "expected byte[] to normalize" );
         }
@@ -214,7 +213,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testClear() throws NamingException
+    public void testClear() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue( BYTES2 );
         cbv.normalize( BINARY_NORMALIZER );
@@ -234,7 +233,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testClientBinaryValueNull() throws NamingException
+    public void testClientBinaryValueNull() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue( null );
         
@@ -247,7 +246,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testClientBinaryValueEmpty() throws NamingException
+    public void testClientBinaryValueEmpty() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue( StringTools.EMPTY_BYTES );
         
@@ -264,7 +263,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testClientBinaryValue() throws NamingException
+    public void testClientBinaryValue() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue( BYTES1 );
         
@@ -280,7 +279,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testSetByteArray() throws NamingException
+    public void testSetByteArray() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -298,7 +297,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testGetNormalizedValueCopy()  throws NamingException
+    public void testGetNormalizedValueCopy()  throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue( BYTES2 );
         
@@ -320,7 +319,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testNormalizeNormalizer() throws NamingException
+    public void testNormalizeNormalizer() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -349,7 +348,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testCompareToValueOfbyte() throws NamingException
+    public void testCompareToValueOfbyte() throws LdapException
     {
         ClientBinaryValue cbv1 = new ClientBinaryValue();
         ClientBinaryValue cbv2 = new ClientBinaryValue();
@@ -371,7 +370,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testEquals() throws NamingException
+    public void testEquals() throws LdapException
     {
         ClientBinaryValue cbv1 = new ClientBinaryValue();
         ClientBinaryValue cbv2 = new ClientBinaryValue();
@@ -436,7 +435,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testCompareTo() throws NamingException
+    public void testCompareTo() throws LdapException
     {
         ClientBinaryValue cbv1 = new ClientBinaryValue();
         ClientBinaryValue cbv2 = new ClientBinaryValue();
@@ -529,7 +528,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testGetNormalizedValue() throws NamingException
+    public void testGetNormalizedValue() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -550,7 +549,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testGetNormalizedValueReference() throws NamingException
+    public void testGetNormalizedValueReference() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -589,7 +588,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testIsValid() throws NamingException
+    public void testIsValid() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -615,7 +614,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testIsValidSyntaxChecker() throws NamingException
+    public void testIsValidSyntaxChecker() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -633,7 +632,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testNormalize() throws NamingException
+    public void testNormalize() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -654,7 +653,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testSet() throws NamingException
+    public void testSet() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -681,7 +680,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testIsNormalized() throws NamingException
+    public void testIsNormalized() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -704,7 +703,7 @@ public class ClientBinaryValueTest
 
 
     @Test
-    public void testSetNormalized() throws NamingException
+    public void testSetNormalized() throws LdapException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         
@@ -735,7 +734,7 @@ public class ClientBinaryValueTest
      * Test the serialization of a CBV with a value and a normalized value
      */
     @Test
-    public void testSerializeStandard() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeStandard() throws LdapException, IOException, ClassNotFoundException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         cbv.setNormalized( true );
@@ -756,7 +755,7 @@ public class ClientBinaryValueTest
      * Test the serialization of a CBV with a value and no normalized value
      */
     @Test
-    public void testSerializeNotNormalized() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeNotNormalized() throws LdapException, IOException, ClassNotFoundException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         cbv.setNormalized( false );
@@ -776,7 +775,7 @@ public class ClientBinaryValueTest
      * Test the serialization of a CBV with a value and an empty normalized value
      */
     @Test
-    public void testSerializeEmptyNormalized() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeEmptyNormalized() throws LdapException, IOException, ClassNotFoundException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         cbv.setNormalized( true );
@@ -797,7 +796,7 @@ public class ClientBinaryValueTest
      * Test the serialization of a CBV with a null value
      */
     @Test
-    public void testSerializeNullValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeNullValue() throws LdapException, IOException, ClassNotFoundException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         cbv.setNormalized( true );
@@ -818,7 +817,7 @@ public class ClientBinaryValueTest
      * Test the serialization of a CBV with an empty value
      */
     @Test
-    public void testSerializeEmptyValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeEmptyValue() throws LdapException, IOException, ClassNotFoundException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         cbv.setNormalized( true );
@@ -839,7 +838,7 @@ public class ClientBinaryValueTest
      * Test the serialization of a CBV with an empty value not normalized
      */
     @Test
-    public void testSerializeEmptyValueNotNormalized() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeEmptyValueNotNormalized() throws LdapException, IOException, ClassNotFoundException
     {
         ClientBinaryValue cbv = new ClientBinaryValue();
         cbv.setNormalized( false );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientStringValueTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientStringValueTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientStringValueTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientStringValueTest.java Tue Mar 16 00:31:36 2010
@@ -31,8 +31,7 @@ import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.Ia5StringSyntaxChecker;
 import org.junit.Test;
@@ -141,7 +140,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#ClientStringValue()}.
      */
     @Test
-    public void testClientStringValueNull() throws NamingException
+    public void testClientStringValueNull() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue();
         
@@ -157,7 +156,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#ClientStringValue(java.lang.String)}.
      */
     @Test
-    public void testClientStringValueEmpty() throws NamingException
+    public void testClientStringValueEmpty() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue( "" );
         
@@ -175,7 +174,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#ClientStringValue(java.lang.String)}.
      */
     @Test
-    public void testClientStringValueString() throws NamingException
+    public void testClientStringValueString() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue( "test" );
         
@@ -228,7 +227,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#set(java.lang.String)}.
      */
     @Test
-    public void testSet() throws NamingException
+    public void testSet() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue();
         
@@ -277,7 +276,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#clear()}.
      */
     @Test
-    public void testClear() throws NamingException
+    public void testClear() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue();
         
@@ -297,7 +296,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#isNormalized()}.
      */
     @Test
-    public void testIsNormalized() throws NamingException
+    public void testIsNormalized() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue();
         
@@ -320,7 +319,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#setNormalized(boolean)}.
      */
     @Test
-    public void testSetNormalized() throws NamingException
+    public void testSetNormalized() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue();
         
@@ -351,7 +350,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#getNormalizedValue()}.
      */
     @Test
-    public void testGetNormalizedValue() throws NamingException
+    public void testGetNormalizedValue() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue();
         
@@ -374,7 +373,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#getNormalizedValueCopy()}.
      */
     @Test
-    public void getNormalizedValueCopy() throws NamingException
+    public void getNormalizedValueCopy() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue();
         
@@ -397,7 +396,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#normalize(org.apache.directory.shared.ldap.schema.Normalizer)}.
      */
     @Test
-    public void testNormalize() throws NamingException
+    public void testNormalize() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue();
 
@@ -421,7 +420,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#isValid(org.apache.directory.shared.ldap.schema.SyntaxChecker)}.
      */
     @Test
-    public void testIsValid() throws NamingException
+    public void testIsValid() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue( "Test" );
         
@@ -436,7 +435,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#compareTo(org.apache.directory.shared.ldap.entry.Value)}.
      */
     @Test
-    public void testCompareTo() throws NamingException
+    public void testCompareTo() throws LdapException
     {
         ClientStringValue csv1 = new ClientStringValue();
         ClientStringValue csv2 = new ClientStringValue();
@@ -470,7 +469,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#clone()}.
      */
     @Test
-    public void testClone() throws NamingException
+    public void testClone() throws LdapException
     {
         ClientStringValue csv = new ClientStringValue();
         
@@ -499,7 +498,7 @@ public class ClientStringValueTest
      * Test method for {@link org.apache.directory.shared.ldap.entry.client.ClientStringValue#equals(java.lang.Object)}.
      */
     @Test
-    public void testEquals() throws NamingException
+    public void testEquals() throws LdapException
     {
         ClientStringValue csv1 = new ClientStringValue();
         ClientStringValue csv2 = new ClientStringValue();
@@ -545,7 +544,7 @@ public class ClientStringValueTest
      * Test the serialization of a CSV with a value and a normalized value
      */
     @Test
-    public void testSerializeStandard() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeStandard() throws LdapException, IOException, ClassNotFoundException
     {
         ClientStringValue csv = new ClientStringValue( "TEST");
         csv.setNormalized( true );
@@ -565,7 +564,7 @@ public class ClientStringValueTest
      * Test the serialization of a CSV with a value and no normalized value
      */
     @Test
-    public void testSerializeNotNormalized() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeNotNormalized() throws LdapException, IOException, ClassNotFoundException
     {
         ClientStringValue csv = new ClientStringValue( "Test" );
         csv.setNormalized( false );
@@ -584,7 +583,7 @@ public class ClientStringValueTest
      * Test the serialization of a CSV with a value and an empty normalized value
      */
     @Test
-    public void testSerializeEmptyNormalized() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeEmptyNormalized() throws LdapException, IOException, ClassNotFoundException
     {
         ClientStringValue csv = new ClientStringValue( "  " );
         csv.setNormalized( true );
@@ -604,7 +603,7 @@ public class ClientStringValueTest
      * Test the serialization of a CSV with a null value
      */
     @Test
-    public void testSerializeNullValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeNullValue() throws LdapException, IOException, ClassNotFoundException
     {
         ClientStringValue csv = new ClientStringValue( null );
         csv.setNormalized( true );
@@ -624,7 +623,7 @@ public class ClientStringValueTest
      * Test the serialization of a CSV with an empty value
      */
     @Test
-    public void testSerializeEmptyValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeEmptyValue() throws LdapException, IOException, ClassNotFoundException
     {
         ClientStringValue csv = new ClientStringValue( "" );
         csv.setNormalized( true );
@@ -644,7 +643,7 @@ public class ClientStringValueTest
      * Test the serialization of a CSV with an empty value not normalized
      */
     @Test
-    public void testSerializeEmptyValueNotNormalized() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeEmptyValueNotNormalized() throws LdapException, IOException, ClassNotFoundException
     {
         ClientStringValue csv = new ClientStringValue( "" );
         csv.setNormalized( false );



Mime
View raw message