directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r923708 [1/2] - in /directory/apacheds/trunk/core-entry/src: main/java/org/apache/directory/server/core/entry/ test/java/org/apache/directory/server/core/entry/
Date Tue, 16 Mar 2010 12:27:46 GMT
Author: kayyagari
Date: Tue Mar 16 12:27:46 2010
New Revision: 923708

URL: http://svn.apache.org/viewvc?rev=923708&view=rev
Log:
replaced jndi exceptions with ADS specific exceptions

Modified:
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java
    directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
    directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
    directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerBinaryValueTest.java
    directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java
    directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java Tue Mar 16 12:27:46 2010
@@ -28,13 +28,12 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
@@ -87,37 +86,37 @@ public class ClonedServerEntry implement
     }
 
 
-    public void add( AttributeType attributeType, byte[]... values ) throws NamingException
+    public void add( AttributeType attributeType, byte[]... values ) throws LdapException
     {
         clonedEntry.add( attributeType, values );
     }
 
 
-    public void add( AttributeType attributeType, String... values ) throws NamingException
+    public void add( AttributeType attributeType, String... values ) throws LdapException
     {
         clonedEntry.add( attributeType, values );
     }
 
 
-    public void add( AttributeType attributeType, Value<?>... values ) throws NamingException
+    public void add( AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         clonedEntry.add( attributeType, values );
     }
 
 
-    public void add( String upId, AttributeType attributeType, byte[]... values ) throws NamingException
+    public void add( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
     {
         clonedEntry.add( attributeType, values );
     }
 
 
-    public void add( String upId, AttributeType attributeType, String... values ) throws NamingException
+    public void add( String upId, AttributeType attributeType, String... values ) throws LdapException
     {
         clonedEntry.add( attributeType, values );
     }
 
 
-    public void add( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException
+    public void add( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         clonedEntry.add( attributeType, values );
     }
@@ -183,61 +182,61 @@ public class ClonedServerEntry implement
     }
 
 
-    public EntryAttribute put( AttributeType attributeType, byte[]... values ) throws NamingException
+    public EntryAttribute put( AttributeType attributeType, byte[]... values ) throws LdapException
     {
         return clonedEntry.put( attributeType, values );
     }
 
 
-    public EntryAttribute put( AttributeType attributeType, String... values ) throws NamingException
+    public EntryAttribute put( AttributeType attributeType, String... values ) throws LdapException
     {
         return clonedEntry.put( attributeType, values );
     }
 
 
-    public EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws NamingException
+    public EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         return clonedEntry.put( attributeType, values );
     }
 
 
-    public EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws NamingException
+    public EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
     {
         return clonedEntry.put( attributeType, values );
     }
 
 
-    public EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws NamingException
+    public EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws LdapException
     {
         return clonedEntry.put( upId, attributeType, values );
     }
 
 
-    public EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException
+    public EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         return clonedEntry.put( upId, attributeType, values );
     }
 
 
-    public boolean remove( AttributeType attributeType, byte[]... values ) throws NamingException
+    public boolean remove( AttributeType attributeType, byte[]... values ) throws LdapException
     {
         return clonedEntry.remove( attributeType, values );
     }
 
 
-    public boolean remove( AttributeType attributeType, String... values ) throws NamingException
+    public boolean remove( AttributeType attributeType, String... values ) throws LdapException
     {
         return clonedEntry.remove( attributeType, values );
     }
 
 
-    public boolean remove( AttributeType attributeType, Value<?>... values ) throws NamingException
+    public boolean remove( AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         return clonedEntry.remove( attributeType, values );
     }
 
 
-    public List<EntryAttribute> remove( EntryAttribute... attributes ) throws NamingException
+    public List<EntryAttribute> remove( EntryAttribute... attributes ) throws LdapException
     {
         return clonedEntry.remove( attributes );
     }
@@ -255,25 +254,25 @@ public class ClonedServerEntry implement
     }
 
 
-    public void add( EntryAttribute... attributes ) throws NamingException
+    public void add( EntryAttribute... attributes ) throws LdapException
     {
         clonedEntry.add( attributes );
     }
 
 
-    public void add( String upId, String... values ) throws NamingException
+    public void add( String upId, String... values ) throws LdapException
     {
         clonedEntry.add( upId, values );
     }
 
 
-    public void add( String upId, byte[]... values ) throws NamingException
+    public void add( String upId, byte[]... values ) throws LdapException
     {
         clonedEntry.add( upId, values );
     }
 
 
-    public void add( String upId, Value<?>... values ) throws NamingException
+    public void add( String upId, Value<?>... values ) throws LdapException
     {
         clonedEntry.add( upId, values );
     }
@@ -285,7 +284,7 @@ public class ClonedServerEntry implement
     }
 
 
-    public boolean contains( EntryAttribute... attributes ) throws NamingException
+    public boolean contains( EntryAttribute... attributes ) throws LdapException
     {
         return clonedEntry.contains( attributes );
     }
@@ -339,7 +338,7 @@ public class ClonedServerEntry implement
     }
 
 
-    public List<EntryAttribute> put( EntryAttribute... attributes ) throws NamingException
+    public List<EntryAttribute> put( EntryAttribute... attributes ) throws LdapException
     {
         return clonedEntry.put( attributes );
     }
@@ -363,19 +362,19 @@ public class ClonedServerEntry implement
     }
 
 
-    public boolean remove( String upId, byte[]... values ) throws NamingException
+    public boolean remove( String upId, byte[]... values ) throws LdapException
     {
         return clonedEntry.remove( upId, values );
     }
 
 
-    public boolean remove( String upId, String... values ) throws NamingException
+    public boolean remove( String upId, String... values ) throws LdapException
     {
         return clonedEntry.remove( upId, values );
     }
 
 
-    public boolean remove( String upId, Value<?>... values ) throws NamingException
+    public boolean remove( String upId, Value<?>... values ) throws LdapException
     {
         return clonedEntry.remove( upId, values );
     }
@@ -405,7 +404,7 @@ public class ClonedServerEntry implement
     }
 
 
-    public Entry toClientEntry() throws NamingException
+    public Entry toClientEntry() throws LdapException
     {
         // Copy the DN
         Entry clientEntry = new DefaultClientEntry( clonedEntry.getDn() );
@@ -494,27 +493,27 @@ public class ClonedServerEntry implement
             this.dn = dn;
         }
         
-        public void add( AttributeType attributeType, byte[]... values ) throws NamingException
+        public void add( AttributeType attributeType, byte[]... values ) throws LdapException
         {
         }
 
-        public void add( AttributeType attributeType, String... values ) throws NamingException
+        public void add( AttributeType attributeType, String... values ) throws LdapException
         {
         }
 
-        public void add( AttributeType attributeType, Value<?>... values ) throws NamingException
+        public void add( AttributeType attributeType, Value<?>... values ) throws LdapException
         {
         }
 
-        public void add( String upId, AttributeType attributeType, byte[]... values ) throws NamingException
+        public void add( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
         {
         }
 
-        public void add( String upId, AttributeType attributeType, String... values ) throws NamingException
+        public void add( String upId, AttributeType attributeType, String... values ) throws LdapException
         {
         }
 
-        public void add( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException
+        public void add( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
         {
         }
 
@@ -568,53 +567,53 @@ public class ClonedServerEntry implement
             return false;
         }
 
-        public EntryAttribute put( AttributeType attributeType, byte[]... values ) throws NamingException
+        public EntryAttribute put( AttributeType attributeType, byte[]... values ) throws LdapException
         {
             return null;
         }
 
-        public EntryAttribute put( AttributeType attributeType, String... values ) throws NamingException
+        public EntryAttribute put( AttributeType attributeType, String... values ) throws LdapException
         {
             return null;
         }
 
-        public EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws NamingException
+        public EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws LdapException
         {
             return null;
         }
 
-        public EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws NamingException
+        public EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
         {
             return null;
         }
 
-        public EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws NamingException
+        public EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws LdapException
         {
             return null;
         }
 
         public EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values )
-            throws NamingException
+            throws LdapException
         {
             return null;
         }
 
-        public boolean remove( AttributeType attributeType, byte[]... values ) throws NamingException
+        public boolean remove( AttributeType attributeType, byte[]... values ) throws LdapException
         {
             return false;
         }
 
-        public boolean remove( AttributeType attributeType, String... values ) throws NamingException
+        public boolean remove( AttributeType attributeType, String... values ) throws LdapException
         {
             return false;
         }
 
-        public boolean remove( AttributeType attributeType, Value<?>... values ) throws NamingException
+        public boolean remove( AttributeType attributeType, Value<?>... values ) throws LdapException
         {
             return false;
         }
 
-        public List<EntryAttribute> remove( EntryAttribute... attributes ) throws NamingException
+        public List<EntryAttribute> remove( EntryAttribute... attributes ) throws LdapException
         {
             return Collections.emptyList();
         }
@@ -629,19 +628,19 @@ public class ClonedServerEntry implement
             return Collections.emptyList();
         }
 
-        public void add( EntryAttribute... attributes ) throws NamingException
+        public void add( EntryAttribute... attributes ) throws LdapException
         {
         }
 
-        public void add( String upId, String... values ) throws NamingException
+        public void add( String upId, String... values ) throws LdapException
         {
         }
 
-        public void add( String upId, byte[]... values ) throws NamingException
+        public void add( String upId, byte[]... values ) throws LdapException
         {
         }
 
-        public void add( String upId, Value<?>... values ) throws NamingException
+        public void add( String upId, Value<?>... values ) throws LdapException
         {
         }
 
@@ -649,7 +648,7 @@ public class ClonedServerEntry implement
         {
         }
 
-        public boolean contains( EntryAttribute... attributes ) throws NamingException
+        public boolean contains( EntryAttribute... attributes ) throws LdapException
         {
             return false;
         }
@@ -695,7 +694,7 @@ public class ClonedServerEntry implement
             return ( ( List <EntryAttribute> ) Collections.EMPTY_LIST ).iterator();
         }
 
-        public List<EntryAttribute> put( EntryAttribute... attributes ) throws NamingException
+        public List<EntryAttribute> put( EntryAttribute... attributes ) throws LdapException
         {
             return Collections.emptyList();
         }
@@ -715,17 +714,17 @@ public class ClonedServerEntry implement
             return null;
         }
 
-        public boolean remove( String upId, byte[]... values ) throws NamingException
+        public boolean remove( String upId, byte[]... values ) throws LdapException
         {
             return false;
         }
 
-        public boolean remove( String upId, String... values ) throws NamingException
+        public boolean remove( String upId, String... values ) throws LdapException
         {
             return false;
         }
 
-        public boolean remove( String upId, Value<?>... values ) throws NamingException
+        public boolean remove( String upId, Value<?>... values ) throws LdapException
         {
             return false;
         }
@@ -767,7 +766,7 @@ public class ClonedServerEntry implement
         }
         
         
-        public Entry toClientEntry() throws NamingException
+        public Entry toClientEntry() throws LdapException
         {
             // Copy the DN
             Entry clientEntry = new DefaultClientEntry( dn );

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java Tue Mar 16 12:27:46 2010
@@ -25,7 +25,6 @@ import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
 import javax.naming.NamingException;
-import javax.naming.directory.InvalidAttributeValueException;
 
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.asn1.primitives.OID;
@@ -34,6 +33,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -335,7 +336,7 @@ public final class DefaultServerAttribut
                 {
                     value.normalize();
                 }
-                catch( NamingException ne )
+                catch( LdapException ne )
                 {
                     // The value can't be normalized : we don't add it.
                     LOG.error( I18n.err( I18n.ERR_93, val ) );
@@ -530,7 +531,7 @@ public final class DefaultServerAttribut
                 {
                     value.normalize();
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     return false;
                 }
@@ -678,9 +679,9 @@ public final class DefaultServerAttribut
      *
      * @param attributeId The AttributeType ID to check
      * @return True if the current attribute is of the expected attributeType
-     * @throws InvalidAttributeValueException If there is no AttributeType
+     * @throws LdapInvalidAttributeValueException If there is no AttributeType
      */
-    public boolean instanceOf( String attributeId ) throws InvalidAttributeValueException
+    public boolean instanceOf( String attributeId ) throws LdapInvalidAttributeValueException
     {
         String trimmedId = StringTools.trim( attributeId );
         
@@ -715,7 +716,7 @@ public final class DefaultServerAttribut
      * @return true if the attribute and it's values are valid, false otherwise
      * @throws NamingException if there is a failure to check syntaxes of values
      */
-    public boolean isValid() throws NamingException
+    public boolean isValid() throws LdapException
     {
         // First check if the attribute has more than one value
         // if the attribute is supposed to be SINGLE_VALUE
@@ -1256,7 +1257,7 @@ public final class DefaultServerAttribut
                 {
                     value.normalize();
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     // Do nothing...
                 }

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java Tue Mar 16 12:27:46 2010
@@ -28,8 +28,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -38,6 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.DnSerializer;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -80,7 +79,7 @@ public final class DefaultServerEntry ex
     /**
      * Returns the attributeType from an Attribute ID.
      */
-    private AttributeType getAttributeType( String upId ) throws NamingException
+    private AttributeType getAttributeType( String upId ) throws LdapException
     {
         if ( StringTools.isEmpty( StringTools.trim( upId ) ) )
         {
@@ -146,7 +145,7 @@ public final class DefaultServerEntry ex
                 }
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // do nothing...
         }
@@ -269,7 +268,7 @@ public final class DefaultServerEntry ex
                 // The dn must be normalized
                 dn.normalize( schemaManager.getNormalizerMapping() );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 LOG.warn( "The DN '" + entry.getDn() + "' cannot be normalized" );
             }
@@ -301,7 +300,7 @@ public final class DefaultServerEntry ex
                 // And store it
                 add( serverAttribute );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // Just log a warning
                 LOG.warn( "The attribute '" + attribute.getId() + "' cannot be stored" );
@@ -420,7 +419,7 @@ public final class DefaultServerEntry ex
         {
             put( upId, attributeType, (String)null );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Just discard the AttributeType
             LOG.error( I18n.err( I18n.ERR_100, upId, ne.getLocalizedMessage() ) );
@@ -495,7 +494,7 @@ public final class DefaultServerEntry ex
             {
                 put( attribute );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 LOG.warn( "The ServerAttribute '{}' does not exist. It has been discarded", attribute );
             }
@@ -517,14 +516,14 @@ public final class DefaultServerEntry ex
      * </p>
      * <p>
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *
      * @param attributeType The attribute Type.
      * @param values The list of binary values to inject. It can be empty.
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    public void add( AttributeType attributeType, byte[]... values ) throws NamingException
+    public void add( AttributeType attributeType, byte[]... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -570,14 +569,14 @@ public final class DefaultServerEntry ex
      * </p>
      * <p>public 
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *public 
      * @param attributeType The attribute Type
      * @param values The list of binary values to inject. It can be empty
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    public void add( AttributeType attributeType, String... values ) throws NamingException
+    public void add( AttributeType attributeType, String... values ) throws LdapException
     {    
         if ( attributeType == null )
         {
@@ -615,14 +614,14 @@ public final class DefaultServerEntry ex
      * </p>
      * <p>
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *
      * @param attributeType The attribute Type
      * @param values The list of binary values to inject. It can be empty
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    public void add( AttributeType attributeType, Value<?>... values ) throws NamingException
+    public void add( AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -653,9 +652,9 @@ public final class DefaultServerEntry ex
      * Add some EntryAttributes to the current Entry.
      *
      * @param attributes The attributes to add
-     * @throws NamingException If we can't add any of the attributes
+     * @throws LdapException If we can't add any of the attributes
      */
-    public void add( EntryAttribute... attributes ) throws NamingException
+    public void add( EntryAttribute... attributes ) throws LdapException
     {
         for ( EntryAttribute attribute:attributes )
         {
@@ -696,15 +695,15 @@ public final class DefaultServerEntry ex
      * </p>
      * <p>
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *
      * @param upId The user provided ID for the added AttributeType
      * @param attributeType The attribute Type.
      * @param values The list of binary values to add. It can be empty.
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    public void add( String upId, AttributeType attributeType, byte[]... values ) throws NamingException
+    public void add( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
     {
         // ObjectClass with binary values are not allowed
         if ( attributeType.equals( OBJECT_CLASS_AT ) )
@@ -745,15 +744,15 @@ public final class DefaultServerEntry ex
      * </p>
      * <p>
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *
      * @param upId The user provided ID for the added AttributeType
      * @param attributeType The attribute Type.
      * @param values The list of values to add. It can be empty.
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    public void add( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException
+    public void add( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -787,9 +786,9 @@ public final class DefaultServerEntry ex
      * @param upId The User provided ID
      * @param attributeType The associated AttributeType
      * @param values The String values to store into the new Attribute
-     * @throws NamingException 
+     * @throws LdapException 
      */
-    public void add( String upId, AttributeType attributeType, String... values ) throws NamingException
+    public void add( String upId, AttributeType attributeType, String... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -823,9 +822,9 @@ public final class DefaultServerEntry ex
      *
      * @param upId The attribute ID
      * @param values The list of binary values to inject. It can be empty
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    public void add( String upId, byte[]... values ) throws NamingException
+    public void add( String upId, byte[]... values ) throws LdapException
     {
         add( upId, getAttributeType( upId ), values );
     }
@@ -836,9 +835,9 @@ public final class DefaultServerEntry ex
      *
      * @param upId The attribute ID
      * @param values The list of string values to inject. It can be empty
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    public void add( String upId, String... values ) throws NamingException
+    public void add( String upId, String... values ) throws LdapException
     {
         add( upId, getAttributeType( upId ), values );
     }
@@ -849,9 +848,9 @@ public final class DefaultServerEntry ex
      *
      * @param upId The attribute ID
      * @param values The list of Value values to inject. It can be empty
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    public void add( String upId, Value<?>... values ) throws NamingException
+    public void add( String upId, Value<?>... values ) throws LdapException
     {
         add( upId, getAttributeType( upId ), values );
     }
@@ -953,9 +952,9 @@ public final class DefaultServerEntry ex
      * @param attributes The Attributes to look for
      * @return <code>true</code> if all the attributes are found within 
      * the entry, <code>false</code> if at least one of them is not present.
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    public boolean contains( EntryAttribute... attributes ) throws NamingException
+    public boolean contains( EntryAttribute... attributes ) throws LdapException
     {
         for ( EntryAttribute entryAttribute:attributes )
         {
@@ -1009,7 +1008,7 @@ public final class DefaultServerEntry ex
                 return false;
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             return false;
         }
@@ -1051,7 +1050,7 @@ public final class DefaultServerEntry ex
                 return false;
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             return false;
         }
@@ -1093,7 +1092,7 @@ public final class DefaultServerEntry ex
                 return false;
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             return false;
         }
@@ -1129,7 +1128,7 @@ public final class DefaultServerEntry ex
                     return false;
                 }
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 return false;
             }
@@ -1182,7 +1181,7 @@ public final class DefaultServerEntry ex
         {
             return get( schemaManager.lookupAttributeTypeRegistry( StringTools.trim( StringTools.toLowerCase( alias ) ) ) );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             String message = ne.getLocalizedMessage();
             LOG.error( message );
@@ -1321,9 +1320,9 @@ public final class DefaultServerEntry ex
      * @param values the binary values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures
+     * @throws LdapException if there are failures
      */
-    public EntryAttribute put( AttributeType attributeType, byte[]... values ) throws NamingException
+    public EntryAttribute put( AttributeType attributeType, byte[]... values ) throws LdapException
     {
         return put( null, attributeType, values );
     }
@@ -1346,9 +1345,9 @@ public final class DefaultServerEntry ex
      * @param values the String values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures
+     * @throws LdapException if there are failures
      */
-    public EntryAttribute put( AttributeType attributeType, String... values ) throws NamingException
+    public EntryAttribute put( AttributeType attributeType, String... values ) throws LdapException
     {
         return put( null, attributeType, values );
     }
@@ -1371,9 +1370,9 @@ public final class DefaultServerEntry ex
      * @param values the values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures
+     * @throws LdapException if there are failures
      */
-    public EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws NamingException
+    public EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         return put( null, attributeType, values );
     }
@@ -1392,9 +1391,9 @@ public final class DefaultServerEntry ex
      * @param attributes the attributes to be put
      * @return the old attributes with the same OID, if exist; otherwise
      *         <code>null</code>
-     * @exception NamingException if the operation fails
+     * @exception LdapException if the operation fails
      */
-    public List<EntryAttribute> put( EntryAttribute... attributes ) throws NamingException
+    public List<EntryAttribute> put( EntryAttribute... attributes ) throws LdapException
     {
         List<EntryAttribute> previous = new ArrayList<EntryAttribute>();
         
@@ -1440,9 +1439,9 @@ public final class DefaultServerEntry ex
      * @param values the binary values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures.
+     * @throws LdapException if there are failures.
      */
-    public EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws NamingException
+    public EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -1500,9 +1499,9 @@ public final class DefaultServerEntry ex
      * @param values the String values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures.
+     * @throws LdapException if there are failures.
      */
-    public EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws NamingException
+    public EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -1562,9 +1561,9 @@ public final class DefaultServerEntry ex
      * @param values the values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures.
+     * @throws LdapException if there are failures.
      */
-    public EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException
+    public EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -1616,7 +1615,7 @@ public final class DefaultServerEntry ex
         {
             return put( upId, getAttributeType( upId ), values );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             String message = I18n.err( I18n.ERR_105, upId, ne.getLocalizedMessage() );
             LOG.error( message );
@@ -1648,7 +1647,7 @@ public final class DefaultServerEntry ex
         {
             return put( upId, getAttributeType( upId ), values );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             String message = I18n.err( I18n.ERR_105, upId, ne.getLocalizedMessage() );
             LOG.error( message );
@@ -1679,7 +1678,7 @@ public final class DefaultServerEntry ex
         {
             return put( upId, getAttributeType( upId ), values );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             String message = I18n.err( I18n.ERR_105, upId, ne.getLocalizedMessage() );
             LOG.error( message );
@@ -1709,7 +1708,7 @@ public final class DefaultServerEntry ex
      * @return <code>true</code> if at least a value is removed, <code>false</code>
      * if not all the values have been removed or if the attribute does not exist. 
      */
-    public boolean remove( AttributeType attributeType, byte[]... values ) throws NamingException
+    public boolean remove( AttributeType attributeType, byte[]... values ) throws LdapException
     {
         try
         {
@@ -1774,7 +1773,7 @@ public final class DefaultServerEntry ex
      * @return <code>true</code> if at least a value is removed, <code>false</code>
      * if not all the values have been removed or if the attribute does not exist. 
      */
-    public boolean remove( AttributeType attributeType, String... values ) throws NamingException
+    public boolean remove( AttributeType attributeType, String... values ) throws LdapException
     {
         try
         {
@@ -1839,7 +1838,7 @@ public final class DefaultServerEntry ex
      * @return <code>true</code> if at least a value is removed, <code>false</code>
      * if not all the values have been removed or if the attribute does not exist. 
      */
-    public boolean remove( AttributeType attributeType, Value<?>... values ) throws NamingException
+    public boolean remove( AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         try
         {
@@ -1883,7 +1882,7 @@ public final class DefaultServerEntry ex
     }
     
     
-    public List<EntryAttribute> remove( EntryAttribute... attributes ) throws NamingException
+    public List<EntryAttribute> remove( EntryAttribute... attributes ) throws LdapException
     {
         List<EntryAttribute> removedAttributes = new ArrayList<EntryAttribute>();
         
@@ -1921,7 +1920,7 @@ public final class DefaultServerEntry ex
      * @return <code>true</code> if at least a value is removed, <code>false</code>
      * if not all the values have been removed or if the attribute does not exist. 
      */
-    public boolean remove( String upId, byte[]... values ) throws NamingException
+    public boolean remove( String upId, byte[]... values ) throws LdapException
     {
         try
         {
@@ -1929,7 +1928,7 @@ public final class DefaultServerEntry ex
 
             return remove( attributeType, values );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             LOG.error( I18n.err( I18n.ERR_106, upId ) );
             return false;
@@ -1963,7 +1962,7 @@ public final class DefaultServerEntry ex
      * @return <code>true</code> if at least a value is removed, <code>false</code>
      * if not all the values have been removed or if the attribute does not exist. 
      */
-    public boolean remove( String upId, String... values ) throws NamingException
+    public boolean remove( String upId, String... values ) throws LdapException
     {
         try
         {
@@ -1971,7 +1970,7 @@ public final class DefaultServerEntry ex
 
             return remove( attributeType, values );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             LOG.error( I18n.err( I18n.ERR_106, upId ) );
             return false;
@@ -2005,7 +2004,7 @@ public final class DefaultServerEntry ex
      * @return <code>true</code> if at least a value is removed, <code>false</code>
      * if not all the values have been removed or if the attribute does not exist. 
      */
-    public boolean remove( String upId, Value<?>... values ) throws NamingException
+    public boolean remove( String upId, Value<?>... values ) throws LdapException
     {
         try
         {
@@ -2013,7 +2012,7 @@ public final class DefaultServerEntry ex
 
             return remove( attributeType, values );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             LOG.error( I18n.err( I18n.ERR_106, upId ) );
             return false;
@@ -2103,7 +2102,7 @@ public final class DefaultServerEntry ex
             {
                 attributeType = schemaManager.lookupAttributeTypeRegistry( attribute );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 String message = "The attribute '" + attribute + "' does not exist in the entry";
                 LOG.warn( message );
@@ -2201,7 +2200,7 @@ public final class DefaultServerEntry ex
             {
                 attributeType = getAttributeType( upId );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 LOG.warn( "Trying to add a bad attribute type '{}', error : ", upId, ne.getLocalizedMessage() );
                 continue;
@@ -2237,7 +2236,7 @@ public final class DefaultServerEntry ex
      *
      * @return An instance of ClientEntry
      */
-    public Entry toClientEntry() throws NamingException
+    public Entry toClientEntry() throws LdapException
     {
         // Copy the DN
         Entry clientEntry = new DefaultClientEntry( dn );
@@ -2392,7 +2391,7 @@ public final class DefaultServerEntry ex
                 
                 attributes.put( attributeType, attribute );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // We weren't able to find the OID. The attribute will not be added
                 LOG.warn( I18n.err( I18n.ERR_460, oid ) );

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java Tue Mar 16 12:27:46 2010
@@ -19,11 +19,10 @@
 package org.apache.directory.server.core.entry;
 
 
-import javax.naming.NamingException;
-import javax.naming.directory.InvalidAttributeValueException;
-
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.client.ClientAttribute;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
 
@@ -71,9 +70,9 @@ public interface ServerAttribute extends
      *
      * @param attributeId The AttributeType ID to check
      * @return True if the current attribute is of the expected attributeType
-     * @throws InvalidAttributeValueException If there is no AttributeType
+     * @throws LdapInvalidAttributeValueException If there is no AttributeType
      */
-    boolean instanceOf( String attributeId ) throws InvalidAttributeValueException;
+    boolean instanceOf( String attributeId ) throws LdapInvalidAttributeValueException;
 
 
     /**
@@ -109,9 +108,9 @@ public interface ServerAttribute extends
      * <li>If the attributeType is SINGLE-VALUE, then no more than a value should be present</li>
      *</p>
      * @return true if the attribute and it's values are valid, false otherwise
-     * @throws NamingException if there is a failure to check syntaxes of values
+     * @throws LdapException  if there is a failure to check syntaxes of values
      */
-    boolean isValid() throws NamingException;
+    boolean isValid() throws LdapException;
 
 
     /**

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java Tue Mar 16 12:27:46 2010
@@ -26,12 +26,11 @@ import java.io.ObjectOutput;
 import java.util.Arrays;
 import java.util.Comparator;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
@@ -41,7 +40,6 @@ import org.apache.directory.shared.ldap.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
 /**
  * A server side schema aware wrapper around a binary attribute value.
  * This value wrapper uses schema information to syntax check values,
@@ -168,7 +166,7 @@ public class ServerBinaryValue extends C
     // -----------------------------------------------------------------------
     // ServerValue<byte[]> Methods
     // -----------------------------------------------------------------------
-    public void normalize() throws NamingException
+    public void normalize() throws LdapException
     {
         if ( isNormalized() )
         {
@@ -225,7 +223,7 @@ public class ServerBinaryValue extends C
             {
                 normalize();
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 String message = "Cannot normalize the value :" + ne.getLocalizedMessage();
                 LOG.warn( message );
@@ -260,7 +258,7 @@ public class ServerBinaryValue extends C
             {
                 normalize();
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 String message = "Cannot normalize the value :" + ne.getLocalizedMessage();
                 LOG.warn( message );
@@ -293,7 +291,7 @@ public class ServerBinaryValue extends C
             {
                 normalize();
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 String message = "Cannot normalize the value :" + ne.getLocalizedMessage();
                 LOG.warn( message );
@@ -382,7 +380,7 @@ public class ServerBinaryValue extends C
                         .getNormalizedValueReference() );
                 }
             }
-            catch ( NamingException e )
+            catch ( LdapException e )
             {
                 String msg = I18n.err( I18n.ERR_109, Arrays.toString( getReference() ), value );
                 LOG.error( msg, e );
@@ -417,7 +415,7 @@ public class ServerBinaryValue extends C
      * @return <code>true</code> if the value is associated with the given
      * attributeType or one of its ascendant
      */
-    public boolean instanceOf( AttributeType attributeType ) throws NamingException
+    public boolean instanceOf( AttributeType attributeType ) throws LdapException
     {
         if ( this.attributeType.equals( attributeType ) )
         {
@@ -502,7 +500,7 @@ public class ServerBinaryValue extends C
                     return comparator.compare( getNormalizedValueReference(), other.getNormalizedValueReference() ) == 0;
                 }
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 return false;
             }
@@ -520,9 +518,9 @@ public class ServerBinaryValue extends C
      * returned.
      *
      * @return a matchingRule or null if one cannot be found for the attributeType
-     * @throws NamingException if resolution of schema entities fail
+     * @throws LdapException if resolution of schema entities fail
      */
-    private MatchingRule getMatchingRule() throws NamingException
+    private MatchingRule getMatchingRule() throws LdapException
     {
         MatchingRule mr = attributeType.getEquality();
 
@@ -545,9 +543,9 @@ public class ServerBinaryValue extends C
      * that the normalizer is extracted from.
      *
      * @return a normalizer associated with the attributeType or null if one cannot be found
-     * @throws NamingException if resolution of schema entities fail
+     * @throws LdapException if resolution of schema entities fail
      */
-    private Normalizer getNormalizer() throws NamingException
+    private Normalizer getNormalizer() throws LdapException
     {
         MatchingRule mr = getMatchingRule();
 
@@ -565,9 +563,9 @@ public class ServerBinaryValue extends C
      * that the comparator is extracted from.
      *
      * @return a comparator associated with the attributeType or null if one cannot be found
-     * @throws NamingException if resolution of schema entities fail
+     * @throws LdapException if resolution of schema entities fail
      */
-    private LdapComparator<?> getLdapComparator() throws NamingException
+    private LdapComparator<?> getLdapComparator() throws LdapException
     {
         MatchingRule mr = getMatchingRule();
 
@@ -677,7 +675,7 @@ public class ServerBinaryValue extends C
                         }
                     }
                 }
-                catch ( NamingException ne )
+                catch ( LdapException ne )
                 {
                     // The value can't be normalized, we don't write the 
                     // normalized value.

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java Tue Mar 16 12:27:46 2010
@@ -22,11 +22,10 @@ package org.apache.directory.server.core
 import java.util.List;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
 
@@ -49,14 +48,14 @@ public interface ServerEntry extends Ent
      * </p>
      * <p>
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *
      * @param attributeType The attribute Type.
      * @param values The list of binary values to inject. It can be empty.
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    void add( AttributeType attributeType, byte[]... values ) throws NamingException;
+    void add( AttributeType attributeType, byte[]... values ) throws LdapException;
 
     
     /**
@@ -70,14 +69,14 @@ public interface ServerEntry extends Ent
      * </p>
      * <p> 
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      * 
      * @param attributeType The attribute Type
      * @param values The list of binary values to inject. It can be empty
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    void add( AttributeType attributeType, String... values ) throws NamingException;
+    void add( AttributeType attributeType, String... values ) throws LdapException;
 
     
     /**
@@ -91,14 +90,14 @@ public interface ServerEntry extends Ent
      * </p>
      * <p>
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *
      * @param attributeType The attribute Type
      * @param values The list of binary values to inject. It can be empty
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    void add( AttributeType attributeType, Value<?>... values ) throws NamingException;
+    void add( AttributeType attributeType, Value<?>... values ) throws LdapException;
 
     
     /**
@@ -112,15 +111,15 @@ public interface ServerEntry extends Ent
      * </p>
      * <p>
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *
      * @param upId The user provided ID for the added AttributeType
      * @param attributeType The attribute Type.
      * @param values The list of binary values to add. It can be empty.
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    void add( String upId, AttributeType attributeType, byte[]... values ) throws NamingException;
+    void add( String upId, AttributeType attributeType, byte[]... values ) throws LdapException;
 
     
     /**
@@ -134,15 +133,15 @@ public interface ServerEntry extends Ent
      * </p>
      * <p>
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *
      * @param upId The user provided ID for the added AttributeType
      * @param attributeType The attribute Type.
      * @param values The list of binary values to add. It can be empty.
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    void add( String upId, AttributeType attributeType, String... values ) throws NamingException;
+    void add( String upId, AttributeType attributeType, String... values ) throws LdapException;
 
     
     /**
@@ -156,15 +155,15 @@ public interface ServerEntry extends Ent
      * </p>
      * <p>
      * If the value cannot be added, or if the AttributeType is null or invalid, 
-     * a NamingException is thrown.
+     * a LdapException is thrown.
      * </p>
      *
      * @param upId The user provided ID for the added AttributeType
      * @param attributeType The attribute Type.
      * @param values The list of values to add. It can be empty.
-     * @throws NamingException If the attribute does not exist
+     * @throws LdapException If the attribute does not exist
      */
-    void add( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException;
+    void add( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException;
 
 
     // -----------------------------------------------------------------------
@@ -177,7 +176,7 @@ public interface ServerEntry extends Ent
      * @param values The searched values.
      * @return <code>true</code> if all the values are found within the attribute,
      * <code>false</code> otherwise, or if the attributes does not exist.
-     * @throws NamingException If the attribute does not exists
+     * @throws LdapException If the attribute does not exists
      */
     boolean contains( AttributeType attributeType, byte[]... values );
 
@@ -189,7 +188,7 @@ public interface ServerEntry extends Ent
      * @param values The searched values.
      * @return <code>true</code> if all the values are found within the attribute,
      * <code>false</code> otherwise, or if the attributes does not exist.
-     * @throws NamingException If the attribute does not exists
+     * @throws LdapException If the attribute does not exists
      */
     boolean contains( AttributeType attributeType, String... values );
 
@@ -201,7 +200,7 @@ public interface ServerEntry extends Ent
      * @param values The searched values.
      * @return <code>true</code> if all the values are found within the attribute,
      * <code>false</code> otherwise, or if the attributes does not exist.
-     * @throws NamingException If the attribute does not exists
+     * @throws LdapException If the attribute does not exists
      */
     boolean contains( AttributeType attributeType, Value<?>... values );
 
@@ -304,9 +303,9 @@ public interface ServerEntry extends Ent
      * @param values the binary values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures
+     * @throws LdapException if there are failures
      */
-    EntryAttribute put( AttributeType attributeType, byte[]... values ) throws NamingException;
+    EntryAttribute put( AttributeType attributeType, byte[]... values ) throws LdapException;
 
 
     /**
@@ -326,9 +325,9 @@ public interface ServerEntry extends Ent
      * @param values the String values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures
+     * @throws LdapException if there are failures
      */
-    EntryAttribute put( AttributeType attributeType, String... values ) throws NamingException;
+    EntryAttribute put( AttributeType attributeType, String... values ) throws LdapException;
 
 
     /**
@@ -348,9 +347,9 @@ public interface ServerEntry extends Ent
      * @param values the values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures
+     * @throws LdapException if there are failures
      */
-    EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws NamingException;
+    EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws LdapException;
 
 
     /**
@@ -373,9 +372,9 @@ public interface ServerEntry extends Ent
      * @param values the binary values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures.
+     * @throws LdapException if there are failures.
      */
-    EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws NamingException;
+    EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException;
 
 
     /**
@@ -399,9 +398,9 @@ public interface ServerEntry extends Ent
      * @param values the String values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures.
+     * @throws LdapException if there are failures.
      */
-    EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws NamingException;
+    EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws LdapException;
 
 
     /**
@@ -425,9 +424,9 @@ public interface ServerEntry extends Ent
      * @param values the values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      * <code>null</code>
-     * @throws NamingException if there are failures.
+     * @throws LdapException if there are failures.
      */
-    EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException;
+    EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException;
 
 
     /**
@@ -451,7 +450,7 @@ public interface ServerEntry extends Ent
      * @return <code>true</code> if at least a value is removed, <code>false</code>
      * if not all the values have been removed or if the attribute does not exist. 
      */
-    boolean remove( AttributeType attributeType, byte[]... values ) throws NamingException;
+    boolean remove( AttributeType attributeType, byte[]... values ) throws LdapException;
 
     
     /**
@@ -475,7 +474,7 @@ public interface ServerEntry extends Ent
      * @return <code>true</code> if at least a value is removed, <code>false</code>
      * if not all the values have been removed or if the attribute does not exist. 
      */
-    boolean remove( AttributeType attributeType, String... values ) throws NamingException;
+    boolean remove( AttributeType attributeType, String... values ) throws LdapException;
 
     
     /**
@@ -499,7 +498,7 @@ public interface ServerEntry extends Ent
      * @return <code>true</code> if at least a value is removed, <code>false</code>
      * if not all the values have been removed or if the attribute does not exist. 
      */
-    boolean remove( AttributeType attributeType, Value<?>... values ) throws NamingException;
+    boolean remove( AttributeType attributeType, Value<?>... values ) throws LdapException;
 
     
     /**
@@ -510,7 +509,7 @@ public interface ServerEntry extends Ent
      * @param attributes the attributes to be removed
      * @return the removed attribute, if exists; otherwise <code>null</code>
      */
-    List<EntryAttribute> remove( EntryAttribute... attributes ) throws NamingException;
+    List<EntryAttribute> remove( EntryAttribute... attributes ) throws LdapException;
     
 
     /**
@@ -558,5 +557,5 @@ public interface ServerEntry extends Ent
      *
      * @return An instance of ClientEntry
      */
-    Entry toClientEntry() throws NamingException;
+    Entry toClientEntry() throws LdapException;
 }

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java Tue Mar 16 12:27:46 2010
@@ -41,6 +41,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeTypeException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -194,10 +195,10 @@ public class ServerEntryUtils
      * @param dn The DN which is needed by the ServerEntry 
      * @return An instance of a ServerEntry object
      * 
-     * @throws InvalidAttributeIdentifierException If we get an invalid attribute
+     * @throws LdapInvalidAttributeTypeException If we get an invalid attribute
      */
     public static ServerEntry toServerEntry( Attributes attributes, DN dn, SchemaManager schemaManager ) 
-            throws InvalidAttributeIdentifierException
+            throws LdapInvalidAttributeTypeException
     {
         if ( attributes instanceof BasicAttributes )
         {
@@ -224,9 +225,9 @@ public class ServerEntryUtils
                 
                 return entry;
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
-                throw new InvalidAttributeIdentifierException( ne.getLocalizedMessage() );
+                throw new LdapInvalidAttributeTypeException( ne.getLocalizedMessage() );
             }
         }
         else
@@ -243,9 +244,9 @@ public class ServerEntryUtils
      * @param mod the modification
      * @param entry the source entry that is modified
      * @return the resultant entry after the modification has taken place
-     * @throws NamingException if there are problems accessing attributes
+     * @throws LdapException if there are problems accessing attributes
      */
-    public static ServerEntry getTargetEntry( Modification mod, ServerEntry entry, SchemaManager schemaManager ) throws NamingException
+    public static ServerEntry getTargetEntry( Modification mod, ServerEntry entry, SchemaManager schemaManager ) throws LdapException
     {
         ServerEntry targetEntry = ( ServerEntry ) entry.clone();
         ModificationOperation modOp = mod.getOperation();
@@ -319,7 +320,7 @@ public class ServerEntryUtils
      * @param attr1 the second attribute
      * @return a new attribute with the union of values from both attribute
      *         arguments
-     * @throws NamingException if there are problems accessing attribute values
+     * @throws LdapException if there are problems accessing attribute values
      */
     public static ServerAttribute getUnion( ServerAttribute attr0, ServerAttribute attr1 )
     {
@@ -395,10 +396,10 @@ public class ServerEntryUtils
      * @param modificationImpls
      * @param atRegistry
      * @return
-     * @throws NamingException
+     * @throws LdapException
      */
     public static List<Modification> convertToServerModification( List<ModificationItem> modificationItems, 
-        SchemaManager schemaManager ) throws NamingException
+        SchemaManager schemaManager ) throws LdapException
     {
         if ( modificationItems != null )
         {
@@ -443,7 +444,7 @@ public class ServerEntryUtils
 
     
     public static List<Modification> toServerModification( Modification[] modifications, 
-        SchemaManager schemaManager ) throws NamingException
+        SchemaManager schemaManager ) throws LdapException
     {
         if ( modifications != null )
         {
@@ -487,7 +488,7 @@ public class ServerEntryUtils
 
 
     public static List<Modification> toServerModification( ModificationItem[] modifications, 
-        SchemaManager schemaManager ) throws NamingException
+        SchemaManager schemaManager ) throws LdapException
     {
         if ( modifications != null )
         {

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java Tue Mar 16 12:27:46 2010
@@ -23,13 +23,12 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.client.ClientModification;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.slf4j.Logger;
@@ -101,7 +100,7 @@ public class ServerModification implemen
             
             attribute = new DefaultServerAttribute( at, modAttribute );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // The attributeType is incorrect. Log, but do nothing otherwise.
             LOG.error( I18n.err( I18n.ERR_111, modAttribute.getId() ) );
@@ -275,9 +274,9 @@ public class ServerModification implemen
      * @param atRegistry The AttributeType registry
      * @throws IOException If we weren't able to deserialize the data
      * @throws ClassNotFoundException if we weren't able to construct a Modification instance
-     * @throws NamingException If we didn't found the AttributeType in the registries
+     * @throws LdapException If we didn't found the AttributeType in the registries
      */
-    public void deserialize( ObjectInput in, SchemaManager schemaManager ) throws IOException, ClassNotFoundException, NamingException
+    public void deserialize( ObjectInput in, SchemaManager schemaManager ) throws IOException, ClassNotFoundException, LdapException
     {
         // Read the operation
         int op = in.readInt();

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java Tue Mar 16 12:27:46 2010
@@ -24,12 +24,11 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.NotImplementedException;
 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.AttributeType;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
@@ -38,6 +37,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
+
 /**
  * A server side schema aware wrapper around a String attribute value.
  * This value wrapper uses schema information to syntax check values,
@@ -178,9 +178,9 @@ public class ServerStringValue extends C
      * Compute the normalized (canonical) representation for the wrapped string.
      * If the wrapped String is null, the normalized form will be null too.  
      *
-     * @throws NamingException if the value cannot be properly normalized
+     * @throws LdapException if the value cannot be properly normalized
      */
-    public void normalize() throws NamingException
+    public void normalize() throws LdapException
     {
         // If the value is already normalized, get out.
         if ( normalized )
@@ -212,7 +212,7 @@ public class ServerStringValue extends C
      * to the wrapped value result in attempts to normalize the wrapped value.
      *
      * @return gets the normalized value
-     * @throws NamingException if the value cannot be properly normalized
+     * @throws LdapException if the value cannot be properly normalized
      */
     public String getNormalizedValue() 
     {
@@ -228,7 +228,7 @@ public class ServerStringValue extends C
             {
                 normalize();
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 String message = "Cannot normalize the value :" + ne.getLocalizedMessage();
                 LOG.info( message );
@@ -294,7 +294,7 @@ public class ServerStringValue extends C
             {
                 stringValue.normalize();
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 String message = I18n.err( I18n.ERR_112, stringValue ); 
                 LOG.error( message );
@@ -305,7 +305,7 @@ public class ServerStringValue extends C
             {
                 normalize();
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 String message = I18n.err( I18n.ERR_112, this );
                 LOG.error( message );
@@ -316,7 +316,7 @@ public class ServerStringValue extends C
                 //noinspection unchecked
                 return getLdapComparator().compare( getNormalizedValue(), stringValue.getNormalizedValue() );
             }
-            catch ( NamingException e )
+            catch ( LdapException e )
             {
                 String msg = I18n.err( I18n.ERR_109, this, value );
                 LOG.error( msg, e );
@@ -351,7 +351,7 @@ public class ServerStringValue extends C
      * @return <code>true</code> if the value is associated with the given
      * attributeType or one of its ascendant
      */
-    public boolean instanceOf( AttributeType attributeType ) throws NamingException
+    public boolean instanceOf( AttributeType attributeType ) throws LdapException
     {
         if ( this.attributeType.equals( attributeType ) )
         {
@@ -434,7 +434,7 @@ public class ServerStringValue extends C
                     }
                 }
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 return false;
             }
@@ -454,9 +454,9 @@ public class ServerStringValue extends C
      * returned.
      *
      * @return a matchingRule or null if one cannot be found for the attributeType
-     * @throws NamingException if resolution of schema entities fail
+     * @throws LdapException if resolution of schema entities fail
      */
-    private MatchingRule getMatchingRule() throws NamingException
+    private MatchingRule getMatchingRule() throws LdapException
     {
         MatchingRule mr = attributeType.getEquality();
 
@@ -479,9 +479,9 @@ public class ServerStringValue extends C
      * that the normalizer is extracted from.
      *
      * @return a normalizer associated with the attributeType or null if one cannot be found
-     * @throws NamingException if resolution of schema entities fail
+     * @throws LdapException if resolution of schema entities fail
      */
-    private Normalizer getNormalizer() throws NamingException
+    private Normalizer getNormalizer() throws LdapException
     {
         MatchingRule mr = getMatchingRule();
 
@@ -533,9 +533,9 @@ public class ServerStringValue extends C
      * that the comparator is extracted from.
      *
      * @return a comparator associated with the attributeType or null if one cannot be found
-     * @throws NamingException if resolution of schema entities fail
+     * @throws LdapException if resolution of schema entities fail
      */
-    private LdapComparator<? super Object> getLdapComparator() throws NamingException
+    private LdapComparator<? super Object> getLdapComparator() throws LdapException
     {
         MatchingRule mr = getMatchingRule();
 
@@ -603,7 +603,7 @@ public class ServerStringValue extends C
                     out.writeUTF( normalizedValue );
                 }
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
                 // The value can't be normalized, we don't write the 
                 // normalized value.

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java Tue Mar 16 12:27:46 2010
@@ -18,13 +18,11 @@
  *  
  */
 package org.apache.directory.server.core.entry;
-
-import javax.naming.NamingException;
-
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.LdapSyntax;
@@ -164,7 +162,7 @@ public class TestServerEntryUtils
         {
             private static final long serialVersionUID = 0L;
 
-            public Value<?> normalize( Value<?> value ) throws NamingException
+            public Value<?> normalize( Value<?> value ) throws LdapException
             {
                 if ( !value.isBinary() )
                 {
@@ -175,7 +173,7 @@ public class TestServerEntryUtils
             }
             
             
-            public String normalize( String value ) throws NamingException
+            public String normalize( String value ) throws LdapException
             {
                 return value.toLowerCase();
             }
@@ -256,7 +254,7 @@ public class TestServerEntryUtils
             // The serial UID
             private static final long serialVersionUID = 1L;
             
-            public Value<?> normalize( Value<?> value ) throws NamingException
+            public Value<?> normalize( Value<?> value ) throws LdapException
             {
                 if ( value.isBinary() )
                 {
@@ -278,7 +276,7 @@ public class TestServerEntryUtils
                 throw new IllegalStateException( I18n.err( I18n.ERR_474 ) );
             }
 
-            public String normalize( String value ) throws NamingException
+            public String normalize( String value ) throws LdapException
             {
                 throw new IllegalStateException( I18n.err( I18n.ERR_474 ) );
             }

Modified: directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java?rev=923708&r1=923707&r2=923708&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java (original)
+++ directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java Tue Mar 16 12:27:46 2010
@@ -40,7 +40,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
-import javax.naming.NamingException;
 import javax.naming.directory.InvalidAttributeValueException;
 
 import org.apache.commons.io.FileUtils;
@@ -50,6 +49,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
@@ -358,7 +359,7 @@ public class DefaultServerAttributeTest
      * Test method getBytes()
      */
     @Test
-    public void testGetBytes() throws InvalidAttributeValueException
+    public void testGetBytes() throws LdapInvalidAttributeValueException
     {
         ServerAttribute attr1 = new DefaultServerAttribute( atPwd );
         
@@ -379,7 +380,7 @@ public class DefaultServerAttributeTest
             attr3.getBytes();
             fail();
         }
-        catch ( InvalidAttributeValueException ivae )
+        catch ( LdapInvalidAttributeValueException ivae )
         {
             assertTrue( true );
         }
@@ -411,7 +412,7 @@ public class DefaultServerAttributeTest
      * Test method getString()
      */
     @Test
-    public void testGetString() throws InvalidAttributeValueException
+    public void testGetString() throws LdapInvalidAttributeValueException
     {
         ServerAttribute attr1 = new DefaultServerAttribute( atCN );
         
@@ -432,7 +433,7 @@ public class DefaultServerAttributeTest
             attr3.getString();
             fail();
         }
-        catch ( InvalidAttributeValueException ivae )
+        catch ( LdapInvalidAttributeValueException ivae )
         {
             assertTrue( true );
         }
@@ -693,7 +694,7 @@ public class DefaultServerAttributeTest
      * Test method add( String... )
      */
     @Test
-    public void testAddStringArray() throws InvalidAttributeValueException
+    public void testAddStringArray() throws LdapInvalidAttributeValueException
     {
         ServerAttribute attr1 = new DefaultServerAttribute( atCN );
         
@@ -770,7 +771,7 @@ public class DefaultServerAttributeTest
      * Test method add( byte[]... )
      */
     @Test
-    public void testAddByteArray() throws InvalidAttributeValueException
+    public void testAddByteArray() throws LdapInvalidAttributeValueException
     {
         ServerAttribute attr1 = new DefaultServerAttribute( atPwd );
         
@@ -1186,7 +1187,7 @@ public class DefaultServerAttributeTest
      * Test method put( String... )
      */
     @Test
-    public void testPutStringArray() throws InvalidAttributeValueException
+    public void testPutStringArray() throws LdapInvalidAttributeValueException
     {
         ServerAttribute attr1 = new DefaultServerAttribute( atCN );
         
@@ -2008,7 +2009,7 @@ public class DefaultServerAttributeTest
      * Test the copy constructor of a ServerAttribute
      */
     @Test 
-    public void testCopyConstructorServerAttribute() throws InvalidAttributeValueException
+    public void testCopyConstructorServerAttribute() throws LdapInvalidAttributeValueException
     {
         EntryAttribute attribute = new DefaultServerAttribute( atCN );
         
@@ -2031,7 +2032,7 @@ public class DefaultServerAttributeTest
      * Test the copy constructor of a ClientAttribute
      */
     @Test 
-    public void testCopyConstructorClientAttribute() throws InvalidAttributeValueException
+    public void testCopyConstructorClientAttribute() throws LdapInvalidAttributeValueException
     {
         EntryAttribute attribute = new DefaultClientAttribute( "commonName" );
         attribute.put( "test" );
@@ -2072,7 +2073,7 @@ public class DefaultServerAttributeTest
      * Test the serialization of a complete server attribute
      */
     @Test
-    public void testSerializeCompleteAttribute() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeCompleteAttribute() throws LdapException, IOException, ClassNotFoundException
     {
         DefaultServerAttribute dsa = new DefaultServerAttribute( atCN );
         dsa.setHR( true );
@@ -2094,7 +2095,7 @@ public class DefaultServerAttributeTest
      * Test the serialization of a server attribute with no value
      */
     @Test
-    public void testSerializeAttributeWithNoValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeAttributeWithNoValue() throws LdapException, IOException, ClassNotFoundException
     {
         DefaultServerAttribute dsa = new DefaultServerAttribute( atCN );
         dsa.setHR( true );
@@ -2114,7 +2115,7 @@ public class DefaultServerAttributeTest
      * Test the serialization of a server attribute with a null value
      */
     @Test
-    public void testSerializeAttributeNullValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeAttributeNullValue() throws LdapException, IOException, ClassNotFoundException
     {
         DefaultServerAttribute dsa = new DefaultServerAttribute( atCN );
         dsa.setHR( true );
@@ -2137,7 +2138,7 @@ public class DefaultServerAttributeTest
      * Test the serialization of a server attribute with a binary value
      */
     @Test
-    public void testSerializeAttributeBinaryValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeAttributeBinaryValue() throws LdapException, IOException, ClassNotFoundException
     {
         DefaultServerAttribute dsa = new DefaultServerAttribute( atPwd );
         dsa.setHR( false );



Mime
View raw message