directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r923524 [3/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/normalizers/ObjectIdentifierNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ObjectIdentifierNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ObjectIdentifierNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ObjectIdentifierNormalizer.java Tue Mar 16 00:31:36 2010
@@ -20,11 +20,10 @@
 package org.apache.directory.shared.ldap.schema.normalizers;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 
 
@@ -51,7 +50,7 @@ public class ObjectIdentifierNormalizer 
     /**
      * {@inheritDoc}
      */
-    public Value<?> normalize( Value<?> value ) throws NamingException
+    public Value<?> normalize( Value<?> value ) throws LdapException
     {
         if ( value == null )
         {
@@ -79,7 +78,7 @@ public class ObjectIdentifierNormalizer 
     /**
      * {@inheritDoc}
      */
-    public String normalize( String value ) throws NamingException
+    public String normalize( String value ) throws LdapException
     {
         if ( value == null )
         {

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

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/UniqueMemberNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/UniqueMemberNormalizer.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/UniqueMemberNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/UniqueMemberNormalizer.java Tue Mar 16 00:31:36 2010
@@ -20,12 +20,11 @@
 package org.apache.directory.shared.ldap.schema.normalizers;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -53,7 +52,7 @@ public class UniqueMemberNormalizer exte
     }
     
 
-    public Value<?> normalize( Value<?> value ) throws NamingException
+    public Value<?> normalize( Value<?> value ) throws LdapException
     {
         String nameAndUid = value.getString();
             
@@ -102,7 +101,7 @@ public class UniqueMemberNormalizer exte
     }
 
 
-    public String normalize( String value ) throws NamingException
+    public String normalize( String value ) throws LdapException
     {
         if ( StringTools.isEmpty( value ) )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistry.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.Map;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
 
@@ -52,10 +51,10 @@ public interface AttributeTypeRegistry e
      * @param ancestorId the name alias or OID for an attributeType
      * @return an Iterator over the AttributeTypes which have the ancestor
      * within their superior chain to the top
-     * @throws NamingException if the ancestor attributeType cannot be 
+     * @throws LdapException if the ancestor attributeType cannot be 
      * discerned from the ancestorId supplied
      */
-    boolean hasDescendants( String ancestorId ) throws NamingException;
+    boolean hasDescendants( String ancestorId ) throws LdapException;
 
 
     /**
@@ -65,10 +64,10 @@ public interface AttributeTypeRegistry e
      * @param ancestorId the name alias or OID for an attributeType
      * @return an Iterator over the AttributeTypes which have the ancestor
      * within their superior chain to the top
-     * @throws NamingException if the ancestor attributeType cannot be 
+     * @throws LdapException if the ancestor attributeType cannot be 
      * discerned from the ancestorId supplied
      */
-    Iterator<AttributeType> descendants( String ancestorId ) throws NamingException;
+    Iterator<AttributeType> descendants( String ancestorId ) throws LdapException;
 
 
     /**
@@ -76,9 +75,9 @@ public interface AttributeTypeRegistry e
      * descendants.
      * 
      * @param attributeType The attributeType to register
-     * @throws NamingException If something went wrong
+     * @throws LdapException If something went wrong
      */
-    void registerDescendants( AttributeType attributeType, AttributeType ancestor ) throws NamingException;
+    void registerDescendants( AttributeType attributeType, AttributeType ancestor ) throws LdapException;
 
 
     /**
@@ -87,21 +86,21 @@ public interface AttributeTypeRegistry e
      * 
      * @param attributeType The attributeType to unregister
      * @param ancestor its ancestor 
-     * @throws NamingException If something went wrong
+     * @throws LdapException If something went wrong
      */
-    void unregisterDescendants( AttributeType attributeType, AttributeType ancestor ) throws NamingException;
+    void unregisterDescendants( AttributeType attributeType, AttributeType ancestor ) throws LdapException;
 
 
     /**
      * Add a new Oid/Normalizer couple in the OidNormalizer map
      */
-    void addMappingFor( AttributeType attributeType ) throws NamingException;
+    void addMappingFor( AttributeType attributeType ) throws LdapException;
 
 
     /**
      * Remove a new Oid/Normalizer couple in the OidNormalizer map
      */
-    void removeMappingFor( AttributeType attributeType ) throws NamingException;
+    void removeMappingFor( AttributeType attributeType ) throws LdapException;
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ComparatorRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ComparatorRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ComparatorRegistry.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.LdapComparator;
 
 
@@ -38,10 +37,10 @@ public interface ComparatorRegistry exte
      * Registers a new LdapComparator with this registry.
      *
      * @param comparator the LdapComparator to register
-     * @throws NamingException if the LdapComparator is already registered or
+     * @throws LdapException if the LdapComparator is already registered or
      * the registration operation is not supported
      */
-    void register( LdapComparator<?> comparator ) throws NamingException;
+    void register( LdapComparator<?> comparator ) throws LdapException;
 
 
     /**
@@ -49,9 +48,9 @@ public interface ComparatorRegistry exte
      * numeric OID.
      * 
      * @param numericOid the numeric identifier
-     * @throws NamingException if the numeric identifier is invalid
+     * @throws LdapException if the numeric identifier is invalid
      */
-    LdapComparator<?> unregister( String numericOid ) throws NamingException;
+    LdapComparator<?> unregister( String numericOid ) throws LdapException;
     
     
     /**
@@ -60,7 +59,7 @@ public interface ComparatorRegistry exte
      * 
      * @param schemaName the name of the schema whose LdapComparators 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/DITStructureRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DITStructureRuleRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DITStructureRuleRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DITStructureRuleRegistry.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.DITStructureRule;
 
 
@@ -68,19 +67,19 @@ public interface DITStructureRuleRegistr
      *
      * @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( int ruleId ) throws NamingException;
+    String getSchemaName( int ruleId ) throws LdapException;
 
     
     /**
      * Registers a new DITStructureRule with this registry.
      *
      * @param ditStructureRule the DITStructureRule to register
-     * @throws NamingException if the DITStructureRule is already registered or
+     * @throws LdapException if the DITStructureRule is already registered or
      * the registration operation is not supported
      */
-    void register( DITStructureRule ditStructureRule ) throws NamingException;
+    void register( DITStructureRule ditStructureRule ) throws LdapException;
 
     
     /**
@@ -89,18 +88,18 @@ public interface DITStructureRuleRegistr
      * 
      * @param ruleId the rule identifier for the DITStructureRule
      * @return the DITStructureRule instance for rule identifier
-     * @throws NamingException if the DITStructureRule does not exist
+     * @throws LdapException if the DITStructureRule does not exist
      */
-    DITStructureRule lookup( int ruleId ) throws NamingException;
+    DITStructureRule lookup( int ruleId ) throws LdapException;
 
 
     /**
      * Unregisters a DITStructureRule using it's rule identifier. 
      * 
      * @param ruleId the rule identifier for the DITStructureRule to unregister
-     * @throws NamingException if no such DITStructureRule exists
+     * @throws LdapException if no such DITStructureRule exists
      */
-    void unregister( int ruleId ) throws NamingException;
+    void unregister( int ruleId ) throws LdapException;
     
     
     /**
@@ -108,9 +107,9 @@ public interface DITStructureRuleRegistr
      * this registry.
      * 
      * @param schemaName the name of the schema whose syntaxCheckers will be removed from
-     * @throws NamingException if no such SchemaElement exists
+     * @throws LdapException if no such SchemaElement exists
      */
-    void unregisterSchemaElements( String schemaName ) throws NamingException;
+    void unregisterSchemaElements( String schemaName ) throws LdapException;
 
     
     /**
@@ -118,9 +117,9 @@ public interface DITStructureRuleRegistr
      *
      * @param originalSchemaName The original Schema name
      * @param newSchemaName The new Schema name
-     * @throws NamingException if the schema can't be renamed
+     * @throws LdapException if the schema can't be renamed
      */
-    void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException;
+    void renameSchema( String originalSchemaName, String newSchemaName ) throws LdapException;
     
     
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultAttributeTypeRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultAttributeTypeRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultAttributeTypeRegistry.java Tue Mar 16 00:31:36 2010
@@ -27,9 +27,8 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
-import javax.naming.directory.NoSuchAttributeException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
@@ -84,7 +83,7 @@ public class DefaultAttributeTypeRegistr
     /**
      * {@inheritDoc}
      */
-    public boolean hasDescendants( String ancestorId ) throws NamingException
+    public boolean hasDescendants( String ancestorId ) throws LdapException
     {
         try
         {
@@ -92,9 +91,9 @@ public class DefaultAttributeTypeRegistr
             Set<AttributeType> descendants = oidToDescendantSet.get( oid );
             return ( descendants != null ) && !descendants.isEmpty();
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
-            throw new NoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage() );
         }
     }
 
@@ -103,7 +102,7 @@ public class DefaultAttributeTypeRegistr
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public Iterator<AttributeType> descendants( String ancestorId ) throws NamingException
+    public Iterator<AttributeType> descendants( String ancestorId ) throws LdapException
     {
         try
         {
@@ -117,9 +116,9 @@ public class DefaultAttributeTypeRegistr
 
             return descendants.iterator();
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
-            throw new NoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage() );
         }
     }
 
@@ -127,7 +126,7 @@ public class DefaultAttributeTypeRegistr
     /**
      * {@inheritDoc}
      */
-    public void registerDescendants( AttributeType attributeType, AttributeType ancestor ) throws NamingException
+    public void registerDescendants( AttributeType attributeType, AttributeType ancestor ) throws LdapException
     {
         // add this attribute to descendant list of other attributes in superior chain
         if ( ancestor == null )
@@ -154,7 +153,7 @@ public class DefaultAttributeTypeRegistr
             // And recurse until we reach the top of the hierarchy
             registerDescendants( attributeType, ancestor.getSuperior() );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             throw new NoSuchAttributeException( ne.getMessage() );
         }
@@ -165,7 +164,7 @@ public class DefaultAttributeTypeRegistr
     /**
      * {@inheritDoc}
      */
-    public void unregisterDescendants( AttributeType attributeType, AttributeType ancestor ) throws NamingException
+    public void unregisterDescendants( AttributeType attributeType, AttributeType ancestor ) throws LdapException
     {
         // add this attribute to descendant list of other attributes in superior chain
         if ( ancestor == null )
@@ -192,7 +191,7 @@ public class DefaultAttributeTypeRegistr
             // And recurse until we reach the top of the hierarchy
             unregisterDescendants( attributeType, ancestor.getSuperior() );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             throw new NoSuchAttributeException( ne.getMessage() );
         }
@@ -203,7 +202,7 @@ public class DefaultAttributeTypeRegistr
     /**
      * {@inheritDoc}
      */
-    public AttributeType unregister( String numericOid ) throws NamingException
+    public AttributeType unregister( String numericOid ) throws LdapException
     {
         try
         {
@@ -221,9 +220,9 @@ public class DefaultAttributeTypeRegistr
 
             return removed;
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
-            throw new NoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage() );
         }
     }
 
@@ -231,7 +230,7 @@ public class DefaultAttributeTypeRegistr
     /**
      * {@inheritDoc}
      */
-    public void addMappingFor( AttributeType attributeType ) throws NamingException
+    public void addMappingFor( AttributeType attributeType ) throws LdapException
     {
         MatchingRule equality = attributeType.getEquality();
         OidNormalizer oidNormalizer;
@@ -261,7 +260,7 @@ public class DefaultAttributeTypeRegistr
     /**
      * Remove the AttributeType normalizer from the OidNormalizer map 
      */
-    public void removeMappingFor( AttributeType attributeType ) throws NamingException
+    public void removeMappingFor( AttributeType attributeType ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -281,15 +280,15 @@ public class DefaultAttributeTypeRegistr
     /**
      * {@inheritDoc}
      */
-    public AttributeType lookup( String oid ) throws NamingException
+    public AttributeType lookup( String oid ) throws LdapException
     {
         try
         {
             return super.lookup( oid );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
-            throw new NoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage() );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultComparatorRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultComparatorRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultComparatorRegistry.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.LdapComparator;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
@@ -56,7 +55,7 @@ public class DefaultComparatorRegistry e
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
         if ( schemaName == null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultDITStructureRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultDITStructureRuleRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultDITStructureRuleRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultDITStructureRuleRegistry.java Tue Mar 16 00:31:36 2010
@@ -24,9 +24,8 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.DITStructureRule;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
@@ -92,7 +91,7 @@ public class DefaultDITStructureRuleRegi
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( int ruleId ) throws NamingException
+    public String getSchemaName( int ruleId ) throws LdapException
     {
         DITStructureRule ditStructureRule = byRuleId.get( ruleId );
 
@@ -103,14 +102,14 @@ public class DefaultDITStructureRuleRegi
         
         String msg = I18n.err( I18n.ERR_04263, ruleId );
         LOG.warn( msg );
-        throw new NamingException( msg );
+        throw new LdapException( msg );
     }
 
     
     /**
      * {@inheritDoc}
      */
-    public void register( DITStructureRule ditStructureRule ) throws NamingException
+    public void register( DITStructureRule ditStructureRule ) throws LdapException
     {
         int ruleId = ditStructureRule.getRuleId();
         
@@ -118,7 +117,7 @@ public class DefaultDITStructureRuleRegi
         {
             String msg = I18n.err( I18n.ERR_04264, ruleId );
             LOG.warn( msg );
-            throw new NamingException( msg );
+            throw new LdapException( msg );
         }
 
         byRuleId.put( ruleId, ditStructureRule );
@@ -133,7 +132,7 @@ public class DefaultDITStructureRuleRegi
     /**
      * {@inheritDoc}
      */
-    public DITStructureRule lookup( int ruleId ) throws NamingException
+    public DITStructureRule lookup( int ruleId ) throws LdapException
     {
         DITStructureRule ditStructureRule = byRuleId.get( ruleId );
 
@@ -141,7 +140,7 @@ public class DefaultDITStructureRuleRegi
         {
             String msg = I18n.err( I18n.ERR_04265, ruleId );
             LOG.debug( msg );
-            throw new NamingException( msg );
+            throw new LdapException( msg );
         }
 
         if ( DEBUG )
@@ -156,7 +155,7 @@ public class DefaultDITStructureRuleRegi
     /**
      * {@inheritDoc}
      */
-    public void unregister( int ruleId ) throws NamingException
+    public void unregister( int ruleId ) throws LdapException
     {
         DITStructureRule ditStructureRule = byRuleId.remove( ruleId );
         

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultNormalizerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultNormalizerRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultNormalizerRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultNormalizerRegistry.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.Normalizer;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
@@ -56,7 +55,7 @@ public class DefaultNormalizerRegistry e
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
         if ( schemaName == null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java Tue Mar 16 00:31:36 2010
@@ -28,9 +28,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
-import javax.naming.directory.NoSuchAttributeException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
@@ -69,7 +68,7 @@ public class DefaultObjectClassRegistry 
     /**
      * {@inheritDoc}
      */
-    public boolean hasDescendants( String ancestorId ) throws NamingException
+    public boolean hasDescendants( String ancestorId ) throws LdapException
     {
         try
         {
@@ -77,9 +76,9 @@ public class DefaultObjectClassRegistry 
             Set<ObjectClass> descendants = oidToDescendants.get( oid );
             return (descendants != null) && !descendants.isEmpty();
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
-            throw new NoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage() );
         }
     }
     
@@ -88,7 +87,7 @@ public class DefaultObjectClassRegistry 
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public Iterator<ObjectClass> descendants( String ancestorId ) throws NamingException
+    public Iterator<ObjectClass> descendants( String ancestorId ) throws LdapException
     {
         try
         {
@@ -102,9 +101,9 @@ public class DefaultObjectClassRegistry 
             
             return descendants.iterator();
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
-            throw new NoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage() );
         }
     }
 
@@ -113,7 +112,7 @@ public class DefaultObjectClassRegistry 
      * {@inheritDoc}
      */
     public void registerDescendants( ObjectClass objectClass, List<ObjectClass> ancestors ) 
-        throws NamingException
+        throws LdapException
     {
         // add this attribute to descendant list of other attributes in superior chain
         if ( ( ancestors == null ) || ( ancestors.size() == 0 ) ) 
@@ -141,9 +140,9 @@ public class DefaultObjectClassRegistry 
                 // And recurse until we reach the top of the hierarchy
                 registerDescendants( objectClass, ancestor.getSuperiors() );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
-                throw new NoSuchAttributeException( ne.getMessage() );
+                throw new LdapNoSuchAttributeException( ne.getMessage() );
             }
         }
     }
@@ -153,7 +152,7 @@ public class DefaultObjectClassRegistry 
      * {@inheritDoc}
      */
     public void unregisterDescendants( ObjectClass attributeType, List<ObjectClass> ancestors ) 
-        throws NamingException
+        throws LdapException
     {
         // add this attribute to descendant list of other attributes in superior chain
         if ( ( ancestors == null ) || ( ancestors.size() == 0 ) ) 
@@ -181,9 +180,9 @@ public class DefaultObjectClassRegistry 
                 // And recurse until we reach the top of the hierarchy
                 unregisterDescendants( attributeType, ancestor.getSuperiors() );
             }
-            catch ( NamingException ne )
+            catch ( LdapException ne )
             {
-                throw new NoSuchAttributeException( ne.getMessage() );
+                throw new LdapNoSuchAttributeException( ne.getMessage() );
             }
         }
     }
@@ -192,7 +191,7 @@ public class DefaultObjectClassRegistry 
     /**
      * {@inheritDoc}
      */
-    public ObjectClass unregister( String numericOid ) throws NamingException
+    public ObjectClass unregister( String numericOid ) throws LdapException
     {
         try
         {
@@ -208,9 +207,9 @@ public class DefaultObjectClassRegistry 
             
             return removed;
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
-            throw new NoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage() );
         }
     }
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchemaObjectRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchemaObjectRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchemaObjectRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchemaObjectRegistry.java Tue Mar 16 00:31:36 2010
@@ -24,10 +24,9 @@ import java.util.HashMap;
 import java.util.Iterator;
 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.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.LoadableSchemaObject;
@@ -91,13 +90,13 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         if ( !OID.isOID( oid ) )
         {
             String msg = I18n.err( I18n.ERR_04267 );
             LOG.warn( msg );
-            throw new NamingException( msg );
+            throw new LdapException( msg );
         }
 
         SchemaObject schemaObject = byName.get( oid );
@@ -109,7 +108,7 @@ public abstract class DefaultSchemaObjec
 
         String msg = I18n.err( I18n.ERR_04268, oid );
         LOG.warn( msg );
-        throw new NamingException( msg );
+        throw new LdapException( msg );
     }
 
 
@@ -156,7 +155,7 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
-    public T lookup( String oid ) throws NamingException
+    public T lookup( String oid ) throws LdapException
     {
         if ( oid == null )
         {
@@ -175,7 +174,7 @@ public abstract class DefaultSchemaObjec
         {
             String msg = I18n.err( I18n.ERR_04269, schemaObjectType.name(), oid );
             LOG.debug( msg );
-            throw new NamingException( msg );
+            throw new LdapException( msg );
         }
 
         if ( DEBUG )
@@ -190,7 +189,7 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
-    public void register( T schemaObject ) throws NamingException
+    public void register( T schemaObject ) throws LdapException
     {
         String oid = schemaObject.getOid();
 
@@ -198,7 +197,7 @@ public abstract class DefaultSchemaObjec
         {
             String msg = I18n.err( I18n.ERR_04270, schemaObjectType.name(), oid );
             LOG.warn( msg );
-            throw new LdapSchemaViolationException( msg, ResultCodeEnum.ATTRIBUTE_OR_VALUE_EXISTS );
+            throw new LdapSchemaViolationException( ResultCodeEnum.ATTRIBUTE_OR_VALUE_EXISTS, msg );
         }
 
         byName.put( oid, schemaObject );
@@ -215,7 +214,7 @@ public abstract class DefaultSchemaObjec
             {
                 String msg = I18n.err( I18n.ERR_04271, schemaObjectType.name(), name );
                 LOG.warn( msg );
-                throw new LdapSchemaViolationException( msg, ResultCodeEnum.ATTRIBUTE_OR_VALUE_EXISTS );
+                throw new LdapSchemaViolationException( ResultCodeEnum.ATTRIBUTE_OR_VALUE_EXISTS, msg );
             }
             else
             {
@@ -236,13 +235,13 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
-    public T unregister( String numericOid ) throws NamingException
+    public T unregister( String numericOid ) throws LdapException
     {
         if ( !OID.isOID( numericOid ) )
         {
             String msg = I18n.err( I18n.ERR_04272, numericOid );
             LOG.error( msg );
-            throw new NamingException( msg );
+            throw new LdapException( msg );
         }
 
         T schemaObject = byName.remove( numericOid );
@@ -267,7 +266,7 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
-    public T unregister( T schemaObject ) throws NamingException
+    public T unregister( T schemaObject ) throws LdapException
     {
         String oid = schemaObject.getOid();
 
@@ -275,7 +274,7 @@ public abstract class DefaultSchemaObjec
         {
             String msg = I18n.err( I18n.ERR_04273, schemaObjectType.name(), oid );
             LOG.warn( msg );
-            throw new NamingException( msg );
+            throw new LdapException( msg );
         }
 
         // Remove the oid
@@ -300,7 +299,7 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
         if ( schemaName == null )
         {
@@ -328,7 +327,7 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         T schemaObject = byName.get( name );
 
@@ -342,7 +341,7 @@ public abstract class DefaultSchemaObjec
             // ok this name is not for a schema object in the registry
             if ( schemaObject == null )
             {
-                throw new NamingException( I18n.err( I18n.ERR_04274, name ) );
+                throw new LdapException( I18n.err( I18n.ERR_04274, name ) );
             }
         }
 
@@ -383,7 +382,7 @@ public abstract class DefaultSchemaObjec
                     {
                         copiedValue = ( T ) oidRegistry.getSchemaObject( value.getOid() );
                     }
-                    catch ( NamingException ne )
+                    catch ( LdapException ne )
                     {
                         // Can't happen
                     }
@@ -414,7 +413,7 @@ public abstract class DefaultSchemaObjec
         {
             return oidRegistry.getSchemaObject( oid );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             return null;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSyntaxCheckerRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSyntaxCheckerRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSyntaxCheckerRegistry.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.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
@@ -56,7 +55,7 @@ public class DefaultSyntaxCheckerRegistr
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
         if ( schemaName == null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableAttributeTypeRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableAttributeTypeRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableAttributeTypeRegistry.java Tue Mar 16 00:31:36 2010
@@ -23,10 +23,9 @@ package org.apache.directory.shared.ldap
 import java.util.Iterator;
 import java.util.Map;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
-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.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -69,7 +68,7 @@ public class ImmutableAttributeTypeRegis
     /**
      * {@inheritDoc}
      */
-    public boolean hasDescendants( String ancestorId ) throws NamingException
+    public boolean hasDescendants( String ancestorId ) throws LdapException
     {
         return immutableAttributeTypeRegistry.hasDescendants( ancestorId );
     }
@@ -78,7 +77,7 @@ public class ImmutableAttributeTypeRegis
     /**
      * {@inheritDoc}
      */
-    public Iterator<AttributeType> descendants( String ancestorId ) throws NamingException
+    public Iterator<AttributeType> descendants( String ancestorId ) throws LdapException
     {
         return immutableAttributeTypeRegistry.descendants( ancestorId );
     }
@@ -87,62 +86,62 @@ public class ImmutableAttributeTypeRegis
     /**
      * {@inheritDoc}
      */
-    public void register( AttributeType attributeType ) throws NamingException
+    public void register( AttributeType attributeType ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04275 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04275 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void registerDescendants( AttributeType attributeType, AttributeType ancestor ) throws NamingException
+    public void registerDescendants( AttributeType attributeType, AttributeType ancestor ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04275 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04275 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterDescendants( AttributeType attributeType, AttributeType ancestor ) throws NamingException
+    public void unregisterDescendants( AttributeType attributeType, AttributeType ancestor ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04275 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04275 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public AttributeType unregister( String numericOid ) throws NamingException
+    public AttributeType unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the AttributeTypeRegistry copy",
-            ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION,
+            "Cannot modify the AttributeTypeRegistry copy" );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void addMappingFor( AttributeType attributeType ) throws NamingException
+    public void addMappingFor( AttributeType attributeType ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04275 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04275 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void removeMappingFor( AttributeType attributeType ) throws NamingException
+    public void removeMappingFor( AttributeType attributeType ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04275 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04275 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public AttributeType lookup( String oid ) throws NamingException
+    public AttributeType lookup( String oid ) throws LdapException
     {
         return immutableAttributeTypeRegistry.lookup( oid );
     }
@@ -205,7 +204,7 @@ public class ImmutableAttributeTypeRegis
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableAttributeTypeRegistry.getOidByName( name );
     }
@@ -214,7 +213,7 @@ public class ImmutableAttributeTypeRegis
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableAttributeTypeRegistry.getSchemaName( oid );
     }
@@ -241,9 +240,9 @@ public class ImmutableAttributeTypeRegis
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04275 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04275 ) );
     }
 
 
@@ -259,17 +258,17 @@ public class ImmutableAttributeTypeRegis
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04275 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04275 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public AttributeType unregister( AttributeType schemaObject ) throws NamingException
+    public AttributeType unregister( AttributeType schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04275 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04275 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableComparatorRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableComparatorRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableComparatorRegistry.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.LdapComparator;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -58,27 +58,27 @@ public class ImmutableComparatorRegistry
     /**
      * {@inheritDoc}
      */
-    public void register( LdapComparator<?> comparator ) throws NamingException
+    public void register( LdapComparator<?> comparator ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04276 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04276 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public LdapComparator<?> unregister( String numericOid ) throws NamingException
+    public LdapComparator<?> unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04276 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04276 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04276 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04276 ) );
     }
 
 
@@ -112,7 +112,7 @@ public class ImmutableComparatorRegistry
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableComparatorRegistry.getOidByName( name );
     }
@@ -121,7 +121,7 @@ public class ImmutableComparatorRegistry
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableComparatorRegistry.getSchemaName( oid );
     }
@@ -148,7 +148,7 @@ public class ImmutableComparatorRegistry
     /**
      * {@inheritDoc}
      */
-    public LdapComparator<?> lookup( String oid ) throws NamingException
+    public LdapComparator<?> lookup( String oid ) throws LdapException
     {
         return immutableComparatorRegistry.lookup( oid );
     }
@@ -166,9 +166,9 @@ public class ImmutableComparatorRegistry
     /**
      * {@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_04276 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04276 ) );
     }
 
 
@@ -184,17 +184,17 @@ public class ImmutableComparatorRegistry
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04276 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04276 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public LdapComparator<?> unregister( LdapComparator<?> schemaObject ) throws NamingException
+    public LdapComparator<?> unregister( LdapComparator<?> schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04276 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04276 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableDITContentRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableDITContentRuleRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableDITContentRuleRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableDITContentRuleRegistry.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.DITContentRule;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -85,7 +85,7 @@ public class ImmutableDITContentRuleRegi
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableDITContentRuleRegistry.getOidByName( name );
     }
@@ -94,7 +94,7 @@ public class ImmutableDITContentRuleRegi
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableDITContentRuleRegistry.getSchemaName( oid );
     }
@@ -121,7 +121,7 @@ public class ImmutableDITContentRuleRegi
     /**
      * {@inheritDoc}
      */
-    public DITContentRule lookup( String oid ) throws NamingException
+    public DITContentRule lookup( String oid ) throws LdapException
     {
         return immutableDITContentRuleRegistry.lookup( oid );
     }
@@ -139,36 +139,36 @@ public class ImmutableDITContentRuleRegi
     /**
      * {@inheritDoc}
      */
-    public void register( DITContentRule schemaObject ) throws NamingException
+    public void register( DITContentRule schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04277 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04277 ) );
     }
 
 
     /**
      * {@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_04277 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04277 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public DITContentRule unregister( String numericOid ) throws NamingException
+    public DITContentRule unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04277 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04277 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04277 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04277 ) );
     }
 
 
@@ -184,17 +184,17 @@ public class ImmutableDITContentRuleRegi
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04277 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04277 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public DITContentRule unregister( DITContentRule schemaObject ) throws NamingException
+    public DITContentRule unregister( DITContentRule schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04277 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04277 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableDITStructureRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableDITStructureRuleRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableDITStructureRuleRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableDITStructureRuleRegistry.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.DITStructureRule;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -85,7 +85,7 @@ public class ImmutableDITStructureRuleRe
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( int ruleId ) throws NamingException
+    public String getSchemaName( int ruleId ) throws LdapException
     {
         return immutableDITStructureRuleRegistry.getSchemaName( ruleId );
     }
@@ -94,7 +94,7 @@ public class ImmutableDITStructureRuleRe
     /**
      * {@inheritDoc}
      */
-    public void register( DITStructureRule ditStructureRule ) throws NamingException
+    public void register( DITStructureRule ditStructureRule ) throws LdapException
     {
     }
 
@@ -102,7 +102,7 @@ public class ImmutableDITStructureRuleRe
     /**
      * {@inheritDoc}
      */
-    public DITStructureRule lookup( int ruleId ) throws NamingException
+    public DITStructureRule lookup( int ruleId ) throws LdapException
     {
         return immutableDITStructureRuleRegistry.lookup( ruleId );
     }
@@ -111,27 +111,27 @@ public class ImmutableDITStructureRuleRe
     /**
      * {@inheritDoc}
      */
-    public void unregister( int ruleId ) throws NamingException
+    public void unregister( int ruleId ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04278 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04278 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04278 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04278 ) );
     }
 
 
     /**
      * {@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_04278 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04278 ) );
     }
 
 
@@ -165,7 +165,7 @@ public class ImmutableDITStructureRuleRe
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableDITStructureRuleRegistry.getOidByName( name );
     }
@@ -174,7 +174,7 @@ public class ImmutableDITStructureRuleRe
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableDITStructureRuleRegistry.getSchemaName( oid );
     }
@@ -192,7 +192,7 @@ public class ImmutableDITStructureRuleRe
     /**
      * {@inheritDoc}
      */
-    public DITStructureRule lookup( String oid ) throws NamingException
+    public DITStructureRule lookup( String oid ) throws LdapException
     {
         return immutableDITStructureRuleRegistry.lookup( oid );
     }
@@ -210,9 +210,9 @@ public class ImmutableDITStructureRuleRe
     /**
      * {@inheritDoc}
      */
-    public DITStructureRule unregister( String numericOid ) throws NamingException
+    public DITStructureRule unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04278 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04278 ) );
     }
 
 
@@ -228,17 +228,17 @@ public class ImmutableDITStructureRuleRe
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04278 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04278 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public DITStructureRule unregister( DITStructureRule schemaObject ) throws NamingException
+    public DITStructureRule unregister( DITStructureRule schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04278 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04278 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableLdapSyntaxRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableLdapSyntaxRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableLdapSyntaxRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableLdapSyntaxRegistry.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.LdapSyntax;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -85,7 +85,7 @@ public class ImmutableLdapSyntaxRegistry
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableLdapSyntaxRegistry.getOidByName( name );
     }
@@ -94,7 +94,7 @@ public class ImmutableLdapSyntaxRegistry
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableLdapSyntaxRegistry.getSchemaName( oid );
     }
@@ -121,7 +121,7 @@ public class ImmutableLdapSyntaxRegistry
     /**
      * {@inheritDoc}
      */
-    public LdapSyntax lookup( String oid ) throws NamingException
+    public LdapSyntax lookup( String oid ) throws LdapException
     {
         return immutableLdapSyntaxRegistry.lookup( oid );
     }
@@ -139,36 +139,36 @@ public class ImmutableLdapSyntaxRegistry
     /**
      * {@inheritDoc}
      */
-    public void register( LdapSyntax schemaObject ) throws NamingException
+    public void register( LdapSyntax schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04279 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04279 ) );
     }
 
 
     /**
      * {@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_04279 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04279 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public LdapSyntax unregister( String numericOid ) throws NamingException
+    public LdapSyntax unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04279 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04279 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04279 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04279 ) );
     }
 
 
@@ -184,17 +184,17 @@ public class ImmutableLdapSyntaxRegistry
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04279 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04279 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public LdapSyntax unregister( LdapSyntax schemaObject ) throws NamingException
+    public LdapSyntax unregister( LdapSyntax schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04279 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04279 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleRegistry.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.MatchingRule;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -85,7 +85,7 @@ public class ImmutableMatchingRuleRegist
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableMatchingRuleRegistry.getOidByName( name );
     }
@@ -94,7 +94,7 @@ public class ImmutableMatchingRuleRegist
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableMatchingRuleRegistry.getSchemaName( oid );
     }
@@ -121,7 +121,7 @@ public class ImmutableMatchingRuleRegist
     /**
      * {@inheritDoc}
      */
-    public MatchingRule lookup( String oid ) throws NamingException
+    public MatchingRule lookup( String oid ) throws LdapException
     {
         return immutableMatchingRuleRegistry.lookup( oid );
     }
@@ -139,36 +139,36 @@ public class ImmutableMatchingRuleRegist
     /**
      * {@inheritDoc}
      */
-    public void register( MatchingRule schemaObject ) throws NamingException
+    public void register( MatchingRule schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04280 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04280 ) );
     }
 
 
     /**
      * {@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_04280 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04280 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public MatchingRule unregister( String numericOid ) throws NamingException
+    public MatchingRule unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04280 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04280 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04280 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04280 ) );
     }
 
 
@@ -184,17 +184,17 @@ public class ImmutableMatchingRuleRegist
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04280 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04280 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public MatchingRule unregister( MatchingRule schemaObject ) throws NamingException
+    public MatchingRule unregister( MatchingRule schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04280 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04280 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleUseRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleUseRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleUseRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleUseRegistry.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.MatchingRuleUse;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -85,7 +85,7 @@ public class ImmutableMatchingRuleUseReg
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableMatchingRuleUseRegistry.getOidByName( name );
     }
@@ -94,7 +94,7 @@ public class ImmutableMatchingRuleUseReg
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableMatchingRuleUseRegistry.getSchemaName( oid );
     }
@@ -121,7 +121,7 @@ public class ImmutableMatchingRuleUseReg
     /**
      * {@inheritDoc}
      */
-    public MatchingRuleUse lookup( String oid ) throws NamingException
+    public MatchingRuleUse lookup( String oid ) throws LdapException
     {
         return immutableMatchingRuleUseRegistry.lookup( oid );
     }
@@ -139,36 +139,36 @@ public class ImmutableMatchingRuleUseReg
     /**
      * {@inheritDoc}
      */
-    public void register( MatchingRuleUse schemaObject ) throws NamingException
+    public void register( MatchingRuleUse schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04281 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
     }
 
 
     /**
      * {@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_04281 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public MatchingRuleUse unregister( String numericOid ) throws NamingException
+    public MatchingRuleUse unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04281 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04281 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
     }
 
 
@@ -184,17 +184,17 @@ public class ImmutableMatchingRuleUseReg
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04281 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public MatchingRuleUse unregister( MatchingRuleUse schemaObject ) throws NamingException
+    public MatchingRuleUse unregister( MatchingRuleUse schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04281 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNameFormRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNameFormRegistry.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNameFormRegistry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNameFormRegistry.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.NameForm;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -85,7 +85,7 @@ public class ImmutableNameFormRegistry i
     /**
      * {@inheritDoc}
      */
-    public String getOidByName( String name ) throws NamingException
+    public String getOidByName( String name ) throws LdapException
     {
         return immutableNameFormRegistry.getOidByName( name );
     }
@@ -94,7 +94,7 @@ public class ImmutableNameFormRegistry i
     /**
      * {@inheritDoc}
      */
-    public String getSchemaName( String oid ) throws NamingException
+    public String getSchemaName( String oid ) throws LdapException
     {
         return immutableNameFormRegistry.getSchemaName( oid );
     }
@@ -121,7 +121,7 @@ public class ImmutableNameFormRegistry i
     /**
      * {@inheritDoc}
      */
-    public NameForm lookup( String oid ) throws NamingException
+    public NameForm lookup( String oid ) throws LdapException
     {
         return immutableNameFormRegistry.lookup( oid );
     }
@@ -139,36 +139,36 @@ public class ImmutableNameFormRegistry i
     /**
      * {@inheritDoc}
      */
-    public void register( NameForm schemaObject ) throws NamingException
+    public void register( NameForm schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04282 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04282 ) );
     }
 
 
     /**
      * {@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_04282 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04282 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public NameForm unregister( String numericOid ) throws NamingException
+    public NameForm unregister( String numericOid ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04282 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04282 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void unregisterSchemaElements( String schemaName ) throws NamingException
+    public void unregisterSchemaElements( String schemaName ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04282 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04282 ) );
     }
 
 
@@ -184,17 +184,17 @@ public class ImmutableNameFormRegistry i
     /**
      * {@inheritDoc}
      */
-    public void clear() throws NamingException
+    public void clear() throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04282 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04282 ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public NameForm unregister( NameForm schemaObject ) throws NamingException
+    public NameForm unregister( NameForm schemaObject ) throws LdapException
     {
-        throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_04282 ), ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04282 ) );
     }
 }



Mime
View raw message