directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r887926 [4/4] - in /directory: apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/ apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/syn...
Date Mon, 07 Dec 2009 14:06:57 GMT
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableLdapSyntaxRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableLdapSyntaxRegistry.java?rev=887926&r1=887925&r2=887926&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableLdapSyntaxRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableLdapSyntaxRegistry.java
Mon Dec  7 14:06:56 2009
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.schema.registries;
 
+
 import java.util.Iterator;
 
 import javax.naming.NamingException;
@@ -41,6 +42,7 @@
     /** The wrapped LdapSyntax registry */
     LdapSyntaxRegistry immutableLdapSyntaxRegistry;
 
+
     /**
      * Creates a new instance of ImmutableLdapSyntaxRegistry.
      *
@@ -50,17 +52,17 @@
     {
         immutableLdapSyntaxRegistry = ldapSyntaxRegistry;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public ImmutableLdapSyntaxRegistry copy()
     {
-        return (ImmutableLdapSyntaxRegistry)immutableLdapSyntaxRegistry.copy();
+        return ( ImmutableLdapSyntaxRegistry ) immutableLdapSyntaxRegistry.copy();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -138,7 +140,8 @@
      */
     public void register( LdapSyntax schemaObject ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -147,7 +150,8 @@
      */
     public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -156,7 +160,8 @@
      */
     public LdapSyntax unregister( String numericOid ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -165,7 +170,8 @@
      */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -183,6 +189,17 @@
      */
     public void clear() throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public LdapSyntax unregister( LdapSyntax schemaObject ) throws NamingException
+    {
+        throw new LdapOperationNotSupportedException( "Cannot modify the LdapSyntaxRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleRegistry.java?rev=887926&r1=887925&r2=887926&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleRegistry.java
Mon Dec  7 14:06:56 2009
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.schema.registries;
 
+
 import java.util.Iterator;
 
 import javax.naming.NamingException;
@@ -30,8 +31,6 @@
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
 
 
-
-
 /**
  * An immutable wrapper of the MatchingRule registry.
  *
@@ -42,7 +41,8 @@
 {
     /** The wrapped MatchingRule registry */
     MatchingRuleRegistry immutableMatchingRuleRegistry;
-    
+
+
     /**
      * Creates a new instance of ImmutableMatchingRuleRegistry.
      *
@@ -52,17 +52,17 @@
     {
         immutableMatchingRuleRegistry = matchingRuleRegistry;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public ImmutableMatchingRuleRegistry copy()
     {
-        return (ImmutableMatchingRuleRegistry)immutableMatchingRuleRegistry.copy();
+        return ( ImmutableMatchingRuleRegistry ) immutableMatchingRuleRegistry.copy();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -140,7 +140,8 @@
      */
     public void register( MatchingRule schemaObject ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -149,7 +150,8 @@
      */
     public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -158,7 +160,8 @@
      */
     public MatchingRule unregister( String numericOid ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -167,7 +170,8 @@
      */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -185,6 +189,17 @@
      */
     public void clear() throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public MatchingRule unregister( MatchingRule schemaObject ) throws NamingException
+    {
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleUseRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleUseRegistry.java?rev=887926&r1=887925&r2=887926&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleUseRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableMatchingRuleUseRegistry.java
Mon Dec  7 14:06:56 2009
@@ -41,7 +41,8 @@
 {
     /** The wrapped MatchingRuleUse registry */
     MatchingRuleUseRegistry immutableMatchingRuleUseRegistry;
-    
+
+
     /**
      * Creates a new instance of ImmutableMatchingRuleUseRegistry.
      *
@@ -51,17 +52,17 @@
     {
         immutableMatchingRuleUseRegistry = matchingRuleUseRegistry;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public ImmutableMatchingRuleUseRegistry copy()
     {
-        return (ImmutableMatchingRuleUseRegistry)immutableMatchingRuleUseRegistry.copy();
+        return ( ImmutableMatchingRuleUseRegistry ) immutableMatchingRuleUseRegistry.copy();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -139,7 +140,8 @@
      */
     public void register( MatchingRuleUse schemaObject ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -148,7 +150,8 @@
      */
     public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -157,7 +160,8 @@
      */
     public MatchingRuleUse unregister( String numericOid ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -166,7 +170,8 @@
      */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -184,6 +189,17 @@
      */
     public void clear() throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public MatchingRuleUse unregister( MatchingRuleUse schemaObject ) throws NamingException
+    {
+        throw new LdapOperationNotSupportedException( "Cannot modify the MatchingRuleUseRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNameFormRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNameFormRegistry.java?rev=887926&r1=887925&r2=887926&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNameFormRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNameFormRegistry.java
Mon Dec  7 14:06:56 2009
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.schema.registries;
 
+
 import java.util.Iterator;
 
 import javax.naming.NamingException;
@@ -30,8 +31,6 @@
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
 
 
-
-
 /**
  * An immutable wrapper of the NameForm registry.
  *
@@ -42,7 +41,8 @@
 {
     /** The wrapped NameForm registry */
     NameFormRegistry immutableNameFormRegistry;
-    
+
+
     /**
      * Creates a new instance of ImmutableNameFormRegistry.
      *
@@ -52,17 +52,17 @@
     {
         immutableNameFormRegistry = nameFormRegistry;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public ImmutableNameFormRegistry copy()
     {
-        return (ImmutableNameFormRegistry)immutableNameFormRegistry.copy();
+        return ( ImmutableNameFormRegistry ) immutableNameFormRegistry.copy();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -140,7 +140,8 @@
      */
     public void register( NameForm schemaObject ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -149,7 +150,8 @@
      */
     public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -158,7 +160,8 @@
      */
     public NameForm unregister( String numericOid ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -167,7 +170,8 @@
      */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -185,6 +189,17 @@
      */
     public void clear() throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public NameForm unregister( NameForm schemaObject ) throws NamingException
+    {
+        throw new LdapOperationNotSupportedException( "Cannot modify the NameFormRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNormalizerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNormalizerRegistry.java?rev=887926&r1=887925&r2=887926&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNormalizerRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableNormalizerRegistry.java
Mon Dec  7 14:06:56 2009
@@ -41,8 +41,8 @@
 {
     /** The wrapped Normalizer registry */
     NormalizerRegistry immutableNormalizerRegistry;
-    
-    
+
+
     /**
      * Creates a new immutable NormalizerRegistry instance.
      * 
@@ -52,14 +52,15 @@
     {
         immutableNormalizerRegistry = normalizerRegistry;
     }
-    
-    
+
+
     /**
      *  {@inheritDoc}
      */
     public void register( Normalizer normalizer ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -68,28 +69,30 @@
      */
     public Normalizer unregister( String numericOid ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
-    
-    
+
+
     /**
      *  {@inheritDoc}
      */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
-    
-    
+
+
     /**
      *  {@inheritDoc}
      */
     public ImmutableNormalizerRegistry copy()
     {
-        return (ImmutableNormalizerRegistry)immutableNormalizerRegistry.copy();
+        return ( ImmutableNormalizerRegistry ) immutableNormalizerRegistry.copy();
     }
-    
-    
+
+
     /**
      *  {@inheritDoc}
      */
@@ -167,7 +170,8 @@
      */
     public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -185,6 +189,17 @@
      */
     public void clear() throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Normalizer unregister( Normalizer schemaObject ) throws NamingException
+    {
+        throw new LdapOperationNotSupportedException( "Cannot modify the NormalizerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableObjectClassRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableObjectClassRegistry.java?rev=887926&r1=887925&r2=887926&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableObjectClassRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableObjectClassRegistry.java
Mon Dec  7 14:06:56 2009
@@ -43,6 +43,7 @@
     /** The wrapped ObjectClass registry */
     private ObjectClassRegistry immutableObjectClassRegistry;
 
+
     /**
      * Creates a new instance of ImmutableAttributeTypeRegistry.
      *
@@ -52,8 +53,8 @@
     {
         immutableObjectClassRegistry = ocRegistry;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -61,8 +62,8 @@
     {
         return immutableObjectClassRegistry.hasDescendants( ancestorId );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -71,54 +72,56 @@
         return immutableObjectClassRegistry.descendants( ancestorId );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
-    public void registerDescendants( ObjectClass objectClass, List<ObjectClass> ancestors
) 
-        throws NamingException
+    public void registerDescendants( ObjectClass objectClass, List<ObjectClass> ancestors
) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
-    public void unregisterDescendants( ObjectClass attributeType, List<ObjectClass>
ancestors ) 
-        throws NamingException
+    public void unregisterDescendants( ObjectClass attributeType, List<ObjectClass>
ancestors ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public void register( ObjectClass objectClass ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public ObjectClass unregister( String numericOid ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
-    
-    
+
+
     /**
      * Clone the ObjectClassRegistry
      */
     public ImmutableObjectClassRegistry copy()
     {
-        return (ImmutableObjectClassRegistry)immutableObjectClassRegistry.copy();
+        return ( ImmutableObjectClassRegistry ) immutableObjectClassRegistry.copy();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -196,7 +199,8 @@
      */
     public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -205,7 +209,8 @@
      */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -223,6 +228,17 @@
      */
     public void clear() throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ObjectClass unregister( ObjectClass schemaObject ) throws NamingException
+    {
+        throw new LdapOperationNotSupportedException( "Cannot modify the ObjectClassRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableSyntaxCheckerRegistry.java?rev=887926&r1=887925&r2=887926&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableSyntaxCheckerRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableSyntaxCheckerRegistry.java
Mon Dec  7 14:06:56 2009
@@ -41,7 +41,8 @@
 {
     /** The wrapped SyntaxChecker registry */
     SyntaxCheckerRegistry immutableSyntaxCheckerRegistry;
-    
+
+
     /**
      * Creates a new instance of ImmutableSyntaxCheckerRegistry.
      *
@@ -51,14 +52,15 @@
     {
         immutableSyntaxCheckerRegistry = syntaxCheckerRegistry;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public void register( SyntaxChecker syntaxChecker ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -67,28 +69,30 @@
      */
     public SyntaxChecker unregister( String numericOid ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public void unregisterSchemaElements( String schemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public ImmutableSyntaxCheckerRegistry copy()
     {
-        return (ImmutableSyntaxCheckerRegistry)immutableSyntaxCheckerRegistry.copy();
+        return ( ImmutableSyntaxCheckerRegistry ) immutableSyntaxCheckerRegistry.copy();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -166,7 +170,8 @@
      */
     public void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 
 
@@ -184,6 +189,17 @@
      */
     public void clear() throws NamingException
     {
-        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy", ResultCodeEnum.NO_SUCH_OPERATION );
+        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public SyntaxChecker unregister( SyntaxChecker schemaObject ) throws NamingException
+    {
+        throw new LdapOperationNotSupportedException( "Cannot modify the SyntaxCheckerRegistry
copy",
+            ResultCodeEnum.NO_SUCH_OPERATION );
     }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java?rev=887926&r1=887925&r2=887926&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
Mon Dec  7 14:06:56 2009
@@ -578,7 +578,7 @@
         // An attributeType has references on Syntax, MatchingRule and itself
         try
         {
-            attributeType.applyRegistries( this );
+            attributeType.addToRegistries( this );
         }
         catch ( NamingException ne )
         {
@@ -716,7 +716,7 @@
     {
         try
         {
-            schemaObject.applyRegistries( errors, this );
+            schemaObject.addToRegistries( errors, this );
         }
         catch ( NamingException ne )
         {
@@ -731,6 +731,27 @@
 
 
     /**
+     * Unlink the SchemaObject references
+     */
+    public void removeReference( List<Throwable> errors, SchemaObject schemaObject
)
+    {
+        try
+        {
+            schemaObject.removeFromRegistries( errors, this );
+        }
+        catch ( NamingException ne )
+        {
+            // Not allowed.
+            String msg = "Cannot remove the references for " + schemaObject.getName() + ",
error : " + ne.getMessage();
+
+            Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX
);
+            errors.add( error );
+            LOG.info( msg );
+        }
+    }
+
+
+    /**
      * Build the MatchingRule references
      */
     private void buildMatchingRuleReferences( List<Throwable> errors )
@@ -885,7 +906,7 @@
         // or to the OctetString SyntaxChecker
         try
         {
-            syntax.applyRegistries( errors, this );
+            syntax.addToRegistries( errors, this );
         }
         catch ( NamingException e )
         {
@@ -905,7 +926,7 @@
         // This is currently doing nothing.
         try
         {
-            normalizer.applyRegistries( errors, this );
+            normalizer.addToRegistries( errors, this );
         }
         catch ( NamingException e )
         {
@@ -925,7 +946,7 @@
         // This is currently doing nothing.
         try
         {
-            comparator.applyRegistries( errors, this );
+            comparator.addToRegistries( errors, this );
         }
         catch ( NamingException e )
         {
@@ -945,7 +966,7 @@
         // This is currently doing nothing.
         try
         {
-            syntaxChecker.applyRegistries( errors, this );
+            syntaxChecker.addToRegistries( errors, this );
         }
         catch ( NamingException e )
         {
@@ -1254,7 +1275,7 @@
         // All is done for this ObjectClass, let's apply the registries
         try
         {
-            objectClass.applyRegistries( errors, this );
+            objectClass.addToRegistries( errors, this );
         }
         catch ( NamingException ne )
         {
@@ -1270,6 +1291,7 @@
     public List<Throwable> add( List<Throwable> errors, SchemaObject schemaObject
) throws NamingException
     {
         // Relax the registries
+        boolean wasRelaxed = isRelaxed;
         setRelaxed();
 
         // Register the SchemaObject in the registries
@@ -1289,6 +1311,49 @@
             errors.addAll( checkErrors );
         }
 
+        // Get back to Strict mode
+        if ( !wasRelaxed )
+        {
+            setStrict();
+        }
+
+        // return the errors
+        return errors;
+    }
+
+
+    /**
+     * Remove the given SchemaObject from the registries
+     */
+    public List<Throwable> delete( List<Throwable> errors, SchemaObject schemaObject
) throws NamingException
+    {
+        // Relax the registries
+        boolean wasRelaxed = isRelaxed;
+        setRelaxed();
+
+        // Remove the SchemaObject from the registries
+        SchemaObject removed = unregister( errors, schemaObject );
+
+        // Remove the SchemaObject from its schema
+        dissociateFromSchema( errors, removed );
+
+        // Unlink the SchemaObject references
+        removeReference( errors, removed );
+
+        if ( errors.isEmpty() )
+        {
+            // Check the registries now
+            List<Throwable> checkErrors = checkRefInteg();
+
+            errors.addAll( checkErrors );
+        }
+
+        // Restore the previous registries state
+        if ( !wasRelaxed )
+        {
+            setStrict();
+        }
+
         // return the errors
         return errors;
     }
@@ -1342,7 +1407,7 @@
     /**
      * Retrieve the schema name for a specific SchemaObject, or return "other" if none is
found.
      */
-    private String getSchemaName( SchemaObject schemaObject ) throws Exception
+    private String getSchemaName( SchemaObject schemaObject )
     {
         String schemaName = StringTools.toLowerCase( schemaObject.getSchemaName() );
 
@@ -1403,13 +1468,20 @@
         LOG.debug( "Registering {}:{}", schemaObject.getObjectType(), schemaObject.getOid()
);
 
         // Check that the SchemaObject is not already registered
-        if ( !( schemaObject instanceof LoadableSchemaObject ) && globalOidRegistry.hasOid(
schemaObject.getOid() ) )
+        if ( !( schemaObject instanceof LoadableSchemaObject ) )
         {
-            // TODO : throw an exception here
-            String msg = "Registering of " + schemaObject.getObjectType() + ":" + schemaObject.getOid()
-                + "failed, it's already present in the Registries";
-            LOG.error( msg );
-            throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM
);
+            // TODO : Check for existing Loadable SchemaObject
+        }
+        else
+        {
+            if ( globalOidRegistry.hasOid( schemaObject.getOid() ) )
+            {
+                // TODO : throw an exception here
+                String msg = "Registering of " + schemaObject.getObjectType() + ":" + schemaObject.getOid()
+                    + "failed, it's already present in the Registries";
+                LOG.error( msg );
+                throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM
);
+            }
         }
 
         // First call the specific registry's register method
@@ -1469,7 +1541,7 @@
      * @param schemaObject The schemaObject to register
      * @throws NamingException If there is a problem
      */
-    public void associateWithSchema( List<Throwable> errors, SchemaObject schemaObject
) //throws NamingException
+    public void associateWithSchema( List<Throwable> errors, SchemaObject schemaObject
)
     {
         LOG.debug( "Registering {}:{}", schemaObject.getObjectType(), schemaObject.getOid()
);
 
@@ -1486,7 +1558,7 @@
         }
 
         // Get a normalized form of schema name
-        String schemaName = StringTools.toLowerCase( schemaObject.getSchemaName() );
+        String schemaName = getSchemaName( schemaObject );
 
         // And register the schemaObject within its schema
         Set<SchemaObjectWrapper> content = schemaObjects.get( schemaName );
@@ -1532,63 +1604,144 @@
 
 
     /**
+     * Store the given SchemaObject in the Map associating SchemaObjetcs to their
+     * related Schema.
+     *
+     * @param schemaObject The schemaObject to register
+     * @throws NamingException If there is a problem
+     */
+
+    public void dissociateFromSchema( List<Throwable> errors, SchemaObject schemaObject
) throws NamingException
+    {
+        LOG.debug( "Unregistering {}:{}", schemaObject.getObjectType(), schemaObject.getOid()
);
+
+        // Check that the SchemaObject is already registered
+        if ( !( schemaObject instanceof LoadableSchemaObject ) && !globalOidRegistry.hasOid(
schemaObject.getOid() ) )
+        {
+            // TODO : throw an exception here
+            String msg = "Unregistering of " + schemaObject.getObjectType() + ":" + schemaObject.getOid()
+                + "failed, it's not present in the Registries";
+            LOG.error( msg );
+            Throwable error = new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM
);
+            errors.add( error );
+            return;
+        }
+
+        // Get a normalized form of schema name
+        String schemaName = getSchemaName( schemaObject );
+        String oid = schemaObject.getOid();
+
+        // And unregister the schemaObject from its schema
+        Set<SchemaObjectWrapper> content = schemaObjects.get( schemaName );
+
+        SchemaObjectWrapper schemaObjectWrapper = new SchemaObjectWrapper( schemaObject );
+
+        if ( !content.contains( schemaObjectWrapper ) )
+        {
+            // Not present !
+            // What should we do ?
+            LOG.info( "Unregistering of {}:{} failed, is not present in the Registries",
schemaObject.getObjectType(),
+                schemaObject.getOid() );
+        }
+        else
+        {
+            // Remove the association
+            content.remove( schemaObjectWrapper );
+
+            // Update the global OidRegistry if the SchemaObject is not
+            // an instance of LoadableSchemaObject
+            if ( !( schemaObject instanceof LoadableSchemaObject ) )
+            {
+                try
+                {
+                    globalOidRegistry.unregister( oid );
+                }
+                catch ( NamingException ne )
+                {
+                    errors.add( ne );
+                    return;
+                }
+            }
+
+            LOG.debug( "Unregistered {} for OID {}", schemaObject.getName(), schemaObject.getOid()
);
+        }
+    }
+
+
+    /**
      * Unregister a SchemaObject from the registries
      *
      * @param schemaObject The SchemaObject we want to deregister
      * @throws NamingException If the removal failed
      */
-    public SchemaObject unregister( SchemaObject schemaObject ) throws NamingException
+    private SchemaObject unregister( List<Throwable> errors, SchemaObject schemaObject
) throws NamingException
     {
         LOG.debug( "Unregistering {}:{}", schemaObject.getObjectType(), schemaObject.getOid()
);
 
-        String oid = schemaObject.getOid();
+        // Check that the SchemaObject is present in the registries
+        if ( schemaObject instanceof LoadableSchemaObject )
+        {
+            // TODO : check for an existing Loadable SchemaObject
+        }
+        else
+        {
+            if ( !globalOidRegistry.hasOid( schemaObject.getOid() ) )
+            {
+                // TODO : throw an exception here
+                String msg = "Unregistering of " + schemaObject.getObjectType() + ":" + schemaObject.getOid()
+                    + "failed, it's not present in the Registries";
+                LOG.error( msg );
+                throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM
);
+            }
+        }
+
         SchemaObject unregistered = null;
 
         // First call the specific registry's register method
         switch ( schemaObject.getObjectType() )
         {
             case ATTRIBUTE_TYPE:
-                unregistered = attributeTypeRegistry.unregister( oid );
+                unregistered = attributeTypeRegistry.unregister( ( AttributeType ) schemaObject
);
                 break;
 
             case COMPARATOR:
-                unregistered = comparatorRegistry.unregister( oid );
+                unregistered = comparatorRegistry.unregister( ( LdapComparator<?> )
schemaObject );
                 break;
 
             case DIT_CONTENT_RULE:
-                unregistered = ditContentRuleRegistry.unregister( oid );
+                unregistered = ditContentRuleRegistry.unregister( ( DITContentRule ) schemaObject
);
                 break;
 
             case DIT_STRUCTURE_RULE:
-                unregistered = ditStructureRuleRegistry.unregister( oid );
+                unregistered = ditStructureRuleRegistry.unregister( ( DITStructureRule )
schemaObject );
                 break;
 
             case LDAP_SYNTAX:
-                unregistered = ldapSyntaxRegistry.unregister( oid );
+                unregistered = ldapSyntaxRegistry.unregister( ( LdapSyntax ) schemaObject
);
                 break;
 
             case MATCHING_RULE:
-                unregistered = matchingRuleRegistry.unregister( oid );
+                unregistered = matchingRuleRegistry.unregister( ( MatchingRule ) schemaObject
);
                 break;
 
             case MATCHING_RULE_USE:
-                unregistered = matchingRuleUseRegistry.unregister( oid );
+                unregistered = matchingRuleUseRegistry.unregister( ( MatchingRuleUse ) schemaObject
);
                 break;
 
             case NAME_FORM:
-                unregistered = nameFormRegistry.unregister( oid );
+                unregistered = nameFormRegistry.unregister( ( NameForm ) schemaObject );
                 break;
 
             case NORMALIZER:
-                unregistered = normalizerRegistry.unregister( oid );
+                unregistered = normalizerRegistry.unregister( ( Normalizer ) schemaObject
);
                 break;
 
             case OBJECT_CLASS:
-                unregistered = objectClassRegistry.unregister( oid );
+                unregistered = objectClassRegistry.unregister( ( ObjectClass ) schemaObject
);
                 break;
 
             case SYNTAX_CHECKER:
-                unregistered = syntaxCheckerRegistry.unregister( oid );
+                unregistered = syntaxCheckerRegistry.unregister( ( SyntaxChecker ) schemaObject
);
                 break;
         }
 
@@ -2305,6 +2458,47 @@
         clone.objectClassRegistry = objectClassRegistry.copy();
         clone.syntaxCheckerRegistry = syntaxCheckerRegistry.copy();
 
+        // Store all the SchemaObjects into the globalOid registry
+        for ( AttributeType attributeType : clone.attributeTypeRegistry )
+        {
+            clone.globalOidRegistry.put( attributeType );
+        }
+
+        for ( DITContentRule ditContentRule : clone.ditContentRuleRegistry )
+        {
+            clone.globalOidRegistry.put( ditContentRule );
+        }
+
+        for ( DITStructureRule ditStructureRule : clone.ditStructureRuleRegistry )
+        {
+            clone.globalOidRegistry.put( ditStructureRule );
+        }
+
+        for ( MatchingRule matchingRule : clone.matchingRuleRegistry )
+        {
+            clone.globalOidRegistry.put( matchingRule );
+        }
+
+        for ( MatchingRuleUse matchingRuleUse : clone.matchingRuleUseRegistry )
+        {
+            clone.globalOidRegistry.put( matchingRuleUse );
+        }
+
+        for ( NameForm nameForm : clone.nameFormRegistry )
+        {
+            clone.globalOidRegistry.put( nameForm );
+        }
+
+        for ( ObjectClass objectClass : clone.objectClassRegistry )
+        {
+            clone.globalOidRegistry.put( objectClass );
+        }
+
+        for ( LdapSyntax syntax : clone.ldapSyntaxRegistry )
+        {
+            clone.globalOidRegistry.put( syntax );
+        }
+
         // Clone the schema list
         clone.loadedSchemas = new HashMap<String, Schema>();
 
@@ -2327,11 +2521,28 @@
 
         clone.schemaObjects = new HashMap<String, Set<SchemaObjectWrapper>>();
 
-        // Last, not least, clone the SchemaObjects Map. It will be empty
+        // Last, not least, clone the SchemaObjects Map, and reference all the copied
+        // SchemaObjects
         for ( String schemaName : schemaObjects.keySet() )
         {
             Set<SchemaObjectWrapper> objects = new HashSet<SchemaObjectWrapper>();
 
+            for ( SchemaObjectWrapper schemaObjectWrapper : schemaObjects.get( schemaName
) )
+            {
+                SchemaObject original = schemaObjectWrapper.get();
+
+                try
+                {
+                    SchemaObject copy = clone.globalOidRegistry.getSchemaObject( original.getOid()
);
+                    SchemaObjectWrapper newWrapper = new SchemaObjectWrapper( copy );
+                    objects.add( newWrapper );
+                }
+                catch ( NamingException ne )
+                {
+                    // Nothing to do
+                }
+            }
+
             clone.schemaObjects.put( schemaName, objects );
         }
 

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java?rev=887926&r1=887925&r2=887926&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
Mon Dec  7 14:06:56 2009
@@ -45,8 +45,8 @@
      * otherwise
      */
     boolean contains( String oid );
-    
-    
+
+
     /**
      * Gets the name of the schema this schema object is associated with.
      *
@@ -55,8 +55,8 @@
      * @throws NamingException if the schema object does not exist
      */
     String getSchemaName( String oid ) throws NamingException;
-    
-    
+
+
     /**
      * Gets the SchemaObject associated with a given OID.
      *
@@ -65,7 +65,7 @@
      */
     SchemaObject get( String oid );
 
-    
+
     /**
      * Modify all the SchemaObject using a schemaName when this name changes.
      *
@@ -74,8 +74,8 @@
      * @throws NamingException if the schema object does not exist
      */
     void renameSchema( String originalSchemaName, String newSchemaName ) throws NamingException;
-    
-    
+
+
     /**
      * Gets an iterator over the registered schema objects in the registry.
      *
@@ -83,7 +83,7 @@
      */
     Iterator<T> iterator();
 
-    
+
     /**
      * Gets an iterator over the registered schema objects'OID in the registry.
      *
@@ -91,7 +91,7 @@
      */
     Iterator<String> oidsIterator();
 
-    
+
     /**
      * Looks up a SchemaObject by its unique Object Identifier or by name.
      *
@@ -100,8 +100,8 @@
      * @throws NamingException if the SchemaObject does not exist
      */
     T lookup( String oid ) throws NamingException;
-    
-    
+
+
     /**
      * Registers a new SchemaObject with this registry.
      *
@@ -120,8 +120,17 @@
      * @throws NamingException if the numeric identifier is invalid
      */
     T unregister( String numericOid ) throws NamingException;
-    
-    
+
+
+    /**
+     * Removes the SchemaObject registered with this registry.
+     * 
+     * @param T the schemaObject to unregister
+     * @throws NamingException if the schemaObject can't be unregistered is invalid
+     */
+    T unregister( T schemaObject ) throws NamingException;
+
+
     /**
      * Unregisters all SchemaObjects defined for a specific schema from
      * this registry.
@@ -129,8 +138,8 @@
      * @param schemaName the name of the schema whose SchemaObjects will be removed from
      */
     void unregisterSchemaElements( String schemaName ) throws NamingException;
-    
-    
+
+
     /**
      * Gets the numericOid for a name/alias if one is associated.  To prevent
      * lookup failures due to case variance in the name, a failure to lookup the
@@ -164,8 +173,8 @@
      *  @return The number of AttributeType stored
      */
     int size();
-    
-    
+
+
     /**
      * Clear the registry from all its content
      */



Mime
View raw message