Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 74288 invoked from network); 31 Jan 2007 03:13:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jan 2007 03:13:29 -0000 Received: (qmail 37480 invoked by uid 500); 31 Jan 2007 03:13:35 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 37456 invoked by uid 500); 31 Jan 2007 03:13:35 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 37445 invoked by uid 99); 31 Jan 2007 03:13:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2007 19:13:35 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2007 19:13:27 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id DA0211A981A; Tue, 30 Jan 2007 19:13:06 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r501705 - in /directory/apacheds/trunk: core-unit/src/test/java/org/apache/directory/server/core/schema/ core/src/main/java/org/apache/directory/server/core/schema/ core/src/test/java/org/apache/directory/server/core/authz/support/ core/src... Date: Wed, 31 Jan 2007 03:13:05 -0000 To: commits@directory.apache.org From: akarasulu@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070131031306.DA0211A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: akarasulu Date: Tue Jan 30 19:13:03 2007 New Revision: 501705 URL: http://svn.apache.org/viewvc?view=rev&rev=501705 Log: Adding rename functionality for metaSchemaObjects ... o added functionality for the rename in the MetaSchemaHandler o added test cases for renaming metaSchemaObjects o added more javadocs o added code to correct the problem where the automatic loading of schema dependencies persisted their enabled state on disk o fixed a couple bugs dealing with searching and finding dependencies and handling enable/disable operations Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerITest.java directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerITest.java directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerITest.java directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerITest.java directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxProducer.java directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/NameOrNumericIdMatch.java directory/apacheds/trunk/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AbstractSchemaLoader.java directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/ComparatorRegistry.java directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/NormalizerRegistry.java directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SchemaLoader.java directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SyntaxCheckerRegistry.java Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerITest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerITest.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerITest.java (original) +++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerITest.java Tue Jan 30 19:13:03 2007 @@ -540,5 +540,9 @@ { return null; } + + public void setSchema( String schemaName ) + { + } } } Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerITest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerITest.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerITest.java (original) +++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerITest.java Tue Jan 30 19:13:03 2007 @@ -539,5 +539,9 @@ { return null; } + + public void setSchema( String schemaName ) + { + } } } Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerITest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerITest.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerITest.java (original) +++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerITest.java Tue Jan 30 19:13:03 2007 @@ -28,12 +28,15 @@ import org.apache.directory.server.constants.MetaSchemaConstants; import org.apache.directory.server.core.unit.AbstractAdminTestCase; import org.apache.directory.server.schema.registries.AttributeTypeRegistry; +import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException; import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException; import org.apache.directory.shared.ldap.message.AttributeImpl; import org.apache.directory.shared.ldap.message.AttributesImpl; import org.apache.directory.shared.ldap.message.ModificationItemImpl; import org.apache.directory.shared.ldap.message.ResultCodeEnum; +import sun.awt.GlobalCursorManager; + /** * A test case which tests the correct operation of the schema @@ -272,6 +275,26 @@ // ----------------------------------------------------------------------- + private void enableSchema( String schemaName ) throws NamingException + { + // now enable the test schema + ModificationItemImpl[] mods = new ModificationItemImpl[1]; + Attribute attr = new AttributeImpl( "m-disabled", "FALSE" ); + mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr ); + super.schemaRoot.modifyAttributes( "cn=" + schemaName, mods ); + } + + + private void disableSchema( String schemaName ) throws NamingException + { + // now enable the test schema + ModificationItemImpl[] mods = new ModificationItemImpl[1]; + Attribute attr = new AttributeImpl( "m-disabled", "TRUE" ); + mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr ); + super.schemaRoot.modifyAttributes( "cn=" + schemaName, mods ); + } + + /** * Checks to make sure updates enabling a metaSchema object in * the schema partition triggers the loading of that schema into @@ -289,10 +312,7 @@ assertFalse( atr.hasAttributeType( TEST_ATTR_OID ) ); // now enable the test schema - ModificationItemImpl[] mods = new ModificationItemImpl[1]; - Attribute attr = new AttributeImpl( "m-disabled", "FALSE" ); - mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr ); - super.schemaRoot.modifyAttributes( "cn=nis", mods ); + enableSchema( "nis" ); // now test that the schema is loaded assertNotNull( registries.getLoadedSchemas().get( TEST_SCHEMA ) ); @@ -321,11 +341,9 @@ // in the AttributeTypeRegistry assertTrue( atr.hasAttributeType( TEST_ATTR_OID ) ); - // now disable the test schema - ModificationItemImpl[] mods = new ModificationItemImpl[1]; - Attribute attr = new AttributeImpl( "m-disabled", "TRUE" ); - mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr ); - super.schemaRoot.modifyAttributes( "cn=nis", mods ); + // now disable the test schema + disableSchema( "samba" ); + disableSchema( "nis" ); // now test that the schema is NOT loaded assertNull( registries.getLoadedSchemas().get( TEST_SCHEMA ) ); @@ -346,7 +364,7 @@ // let's enable the test schema and add the dummy schema // as enabled by default and dependends on the test schema -// // enables the test schema +// // enables the test schema and samba testEnableSchema(); // adds enabled dummy schema that depends on the test schema @@ -368,7 +386,7 @@ assertTrue( atr.hasAttributeType( TEST_ATTR_OID ) ); // now try to disable the test schema which should fail - // since it's dependent, the dummy schema, is enabled + // since it's dependent, the dummy schema, is enabled ModificationItemImpl[] mods = new ModificationItemImpl[1]; Attribute attr = new AttributeImpl( "m-disabled", "TRUE" ); mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr ); @@ -390,5 +408,88 @@ // double check and make sure the test attribute from the test // schema is still loaded and present within the attr registry assertTrue( atr.hasAttributeType( TEST_ATTR_OID ) ); + } + + + // ----------------------------------------------------------------------- + // Schema Rename Tests + // ----------------------------------------------------------------------- + + + /** + * Makes sure we can change the name of a schema with entities in it. + * Will use the samba schema which comes out of the box and nothing + * depends on. + */ + public void testSchemaRenameDisabledSchema() throws Exception + { + schemaRoot.rename( "cn=samba", "cn=foo" ); + assertNotNull( schemaRoot.lookup( "cn=foo" ) ); + + try + { + schemaRoot.lookup( "cn=samba" ); + fail( "the samba schema should not be present after a rename to foo" ); + } + catch( LdapNameNotFoundException e ) + { + } + } + + + /** + * Makes sure we can NOT change the name of a schema that has dependents. + * Will use the nis schema which comes out of the box and has samba as + * it's dependent. + */ + public void testRejectSchemaRenameWithDeps() throws Exception + { + try + { + schemaRoot.rename( "cn=nis", "cn=foo" ); + fail( "should not be able to rename nis which has samba as it's dependent" ); + } + catch ( LdapOperationNotSupportedException e ) + { + assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, e.getResultCode() ); + } + + assertNotNull( schemaRoot.lookup( "cn=nis" ) ); + + try + { + schemaRoot.lookup( "cn=foo" ); + fail( "the foo schema should not be present after rejecting the rename" ); + } + catch( LdapNameNotFoundException e ) + { + } + } + + + /** + * Makes sure we can change the name of a schema with entities in it. + * Will use the samba schema which comes out of the box and nothing + * depends on. + */ + public void testSchemaRenameEnabledSchema() throws Exception + { + enableSchema( "samba" ); + assertTrue( registries.getAttributeTypeRegistry().hasAttributeType( "sambaNTPassword" ) ); + assertEquals( "samba", registries.getAttributeTypeRegistry().getSchemaName( "sambaNTPassword" ) ); + + schemaRoot.rename( "cn=samba", "cn=foo" ); + assertNotNull( schemaRoot.lookup( "cn=foo" ) ); + assertTrue( registries.getAttributeTypeRegistry().hasAttributeType( "sambaNTPassword" ) ); + assertEquals( "foo", registries.getAttributeTypeRegistry().getSchemaName( "sambaNTPassword" ) ); + + try + { + schemaRoot.lookup( "cn=samba" ); + fail( "the samba schema should not be present after a rename to foo" ); + } + catch( LdapNameNotFoundException e ) + { + } } } Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerITest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerITest.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerITest.java (original) +++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerITest.java Tue Jan 30 19:13:03 2007 @@ -554,5 +554,9 @@ { return null; } + + public void setSchema( String schemaName ) + { + } } } Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java Tue Jan 30 19:13:03 2007 @@ -20,6 +20,7 @@ package org.apache.directory.server.core.schema; +import java.util.Iterator; import java.util.Map; import java.util.Set; @@ -35,14 +36,16 @@ import org.apache.directory.server.schema.bootstrap.Schema; import org.apache.directory.server.schema.registries.OidRegistry; import org.apache.directory.server.schema.registries.Registries; -import org.apache.directory.shared.ldap.NotImplementedException; +import org.apache.directory.server.schema.registries.SchemaObjectRegistry; import org.apache.directory.shared.ldap.exception.LdapInvalidNameException; import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException; import org.apache.directory.shared.ldap.message.ModificationItemImpl; import org.apache.directory.shared.ldap.message.ResultCodeEnum; import org.apache.directory.shared.ldap.name.LdapDN; import org.apache.directory.shared.ldap.schema.AttributeType; +import org.apache.directory.shared.ldap.schema.SchemaObject; import org.apache.directory.shared.ldap.util.AttributeUtils; +import org.apache.directory.shared.ldap.util.NamespaceTools; /** @@ -226,9 +229,79 @@ */ public void rename( LdapDN name, Attributes entry, String newRdn ) throws NamingException { - throw new NotImplementedException(); - } + String rdnAttribute = NamespaceTools.getRdnAttribute( newRdn ); + String rdnAttributeOid = globalRegistries.getOidRegistry().getOid( rdnAttribute ); + if ( ! rdnAttributeOid.equals( cnAT.getOid() ) ) + { + throw new LdapOperationNotSupportedException( + "Cannot allow rename with rdnAttribute set to " + + rdnAttribute + ": cn must be used instead." , + ResultCodeEnum.UNWILLING_TO_PERFORM ); + } + + /* + * This operation has to do the following: + * + * [1] check and make sure there are no dependent schemas on the + * one being renamed - if so an exception should result + * + * [2] make non-schema object registries modify the mapping + * for their entities: non-schema object registries contain + * objects that are not SchemaObjects and hence do not carry + * their schema within the object as a property + * + * [3] make schema object registries do the same but the way + * they do them will be different since these objects will + * need to be replaced or will require a setter for the + * schema name + */ + + // step [1] + String schemaName = getSchemaName( name ); + Set dependents = loader.listDependentSchemaNames( schemaName ); + if ( ! dependents.isEmpty() ) + { + throw new LdapOperationNotSupportedException( + "Cannot allow a rename on " + schemaName + " schema while it has depentents.", + ResultCodeEnum.UNWILLING_TO_PERFORM ); + } + + // check if the new schema is enabled or disabled + boolean isEnabled = false; + Attribute disabled = AttributeUtils.getAttribute( entry, this.disabledAT ); + if ( disabled == null ) + { + isEnabled = true; + } + else if ( ! disabled.get().equals( "TRUE" ) ) + { + isEnabled = true; + } + + if ( ! isEnabled ) + { + return; + } + // do steps 2 and 3 if the schema has been enabled and is loaded + + // step [2] + String newSchemaName = NamespaceTools.getRdnValue( newRdn ); + globalRegistries.getComparatorRegistry().renameSchema( schemaName, newSchemaName ); + globalRegistries.getNormalizerRegistry().renameSchema( schemaName, newSchemaName ); + globalRegistries.getSyntaxCheckerRegistry().renameSchema( schemaName, newSchemaName ); + + // step [3] + renameSchema( globalRegistries.getAttributeTypeRegistry(), schemaName, newSchemaName ); + renameSchema( globalRegistries.getDitContentRuleRegistry(), schemaName, newSchemaName ); + renameSchema( globalRegistries.getDitStructureRuleRegistry(), schemaName, newSchemaName ); + renameSchema( globalRegistries.getMatchingRuleRegistry(), schemaName, newSchemaName ); + renameSchema( globalRegistries.getMatchingRuleUseRegistry(), schemaName, newSchemaName ); + renameSchema( globalRegistries.getNameFormRegistry(), schemaName, newSchemaName ); + renameSchema( globalRegistries.getObjectClassRegistry(), schemaName, newSchemaName ); + renameSchema( globalRegistries.getSyntaxRegistry(), schemaName, newSchemaName ); + } + /** * Moves are not allowed for metaSchema objects so this always throws an @@ -306,8 +379,8 @@ if ( !isCurrentlyDisabled && isNewStateDisabled ) { disableSchema( getSchemaName( name ) ); - break; } + break; default: throw new IllegalArgumentException( "Unknown modify operation type: " + modOp ); } @@ -347,7 +420,7 @@ } Schema schema = loader.getSchema( schemaName ); - loader.load( schema, globalRegistries ); + loader.loadWithDependencies( schema, globalRegistries ); } @@ -396,6 +469,28 @@ "Unwilling to add schema with missing dependencies: " + dependency, ResultCodeEnum.UNWILLING_TO_PERFORM ); } + } + } + } + + + /** + * Used to iterate through SchemaObjects in a SchemaObjectRegistry and rename + * their schema property to a new schema name. + * + * @param registry the registry whose objects are changed + * @param originalSchemaName the original schema name + * @param newSchemaName the new schema name + */ + private void renameSchema( SchemaObjectRegistry registry, String originalSchemaName, String newSchemaName ) + { + Iterator list = registry.iterator(); + while ( list.hasNext() ) + { + SchemaObject obj = list.next(); + if ( obj.getSchema().equalsIgnoreCase( originalSchemaName ) ) + { + obj.setSchema( newSchemaName ); } } } Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Tue Jan 30 19:13:03 2007 @@ -44,6 +44,7 @@ import org.apache.directory.server.schema.registries.AbstractSchemaLoader; import org.apache.directory.server.schema.registries.AttributeTypeRegistry; import org.apache.directory.server.schema.registries.Registries; +import org.apache.directory.server.schema.registries.SchemaLoader; import org.apache.directory.shared.ldap.name.LdapDN; import org.apache.directory.shared.ldap.schema.AttributeType; import org.apache.directory.shared.ldap.schema.Normalizer; @@ -247,14 +248,24 @@ while ( list.hasNext() ) { Schema schema = ( Schema ) list.next(); - loadDepsFirst( new Stack(), notLoaded, schema, targetRegistries, null ); + loadDepsFirst( schema, new Stack(), notLoaded, schema, targetRegistries, null ); list = notLoaded.values().iterator(); } } - public final void load( Schema schema, Registries targetRegistries ) throws NamingException + /** + * @see {@link SchemaLoader#load(Schema, Registries, boolean)} + */ + public final void load( Schema schema, Registries targetRegistries, boolean isDepLoad ) throws NamingException { + // if we're loading a dependency and it has not been enabled on disk + // on disk then enable it on disk before we proceed to load it + if ( schema.isDisabled() && isDepLoad ) + { + dao.enableSchema( schema.getSchemaName() ); + } + if ( targetRegistries.getLoadedSchemas().containsKey( schema.getSchemaName() ) ) { log.debug( "schema {} already seems to be loaded", schema.getSchemaName() ); @@ -633,6 +644,6 @@ HashMap notLoaded = new HashMap(); notLoaded.put( schema.getSchemaName(), schema ); Properties props = new Properties(); - loadDepsFirst( new Stack(), notLoaded, schema, registries, props ); + loadDepsFirst( schema, new Stack(), notLoaded, schema, registries, props ); } } Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java Tue Jan 30 19:13:03 2007 @@ -606,8 +606,6 @@ { set.add( sr ); } - - set.add( ne.next() ); } } finally Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java (original) +++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java Tue Jan 30 19:13:03 2007 @@ -166,7 +166,10 @@ { return null; } - + + public void setSchema( String schemaName ) + { + } }; } @@ -218,6 +221,11 @@ { return null; } + + + public void setSchema( String schemaName ) + { + } }; } else @@ -302,7 +310,10 @@ { return null; } - + + public void setSchema( String schemaName ) + { + } }; } @@ -365,7 +376,10 @@ { return null; } - + + public void setSchema( String schemaName ) + { + } }; } @@ -416,7 +430,10 @@ { return null; } - + + public void setSchema( String schemaName ) + { + } }; } @@ -467,6 +484,11 @@ public String getSchema() { return null; + } + + + public void setSchema( String schemaName ) + { } }; } Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java (original) +++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java Tue Jan 30 19:13:03 2007 @@ -48,9 +48,9 @@ { BootstrapSchemaLoader loader = new BootstrapSchemaLoader(); registries = new DefaultRegistries( "bootstrap", loader, new DefaultOidRegistry() ); - loader.load( new SystemSchema(), registries ); - loader.load( new ApacheSchema(), registries ); - loader.load( new CoreSchema(), registries ); + loader.load( new SystemSchema(), registries, false ); + loader.load( new ApacheSchema(), registries, false ); + loader.load( new CoreSchema(), registries, false ); } Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java (original) +++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java Tue Jan 30 19:13:03 2007 @@ -93,7 +93,7 @@ public void testSystemSchemaLoad() throws NamingException { SystemSchema systemSchema = new SystemSchema(); - loader.load( systemSchema, registries ); + loader.load( systemSchema, registries, false ); AttributeType type; type = registries.getAttributeTypeRegistry().lookup( "distinguishedName" ); @@ -111,7 +111,7 @@ { testSystemSchemaLoad(); ApacheSchema apacheSchema = new ApacheSchema(); - loader.load( apacheSchema, registries ); + loader.load( apacheSchema, registries, false ); AttributeType type; type = registries.getAttributeTypeRegistry().lookup( "apacheNdn" ); @@ -148,7 +148,7 @@ { testSystemSchemaLoad(); CoreSchema coreSchema = new CoreSchema(); - loader.load( coreSchema, registries ); + loader.load( coreSchema, registries, false ); AttributeType type; type = registries.getAttributeTypeRegistry().lookup( "knowledgeInformation" ); Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java (original) +++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java Tue Jan 30 19:13:03 2007 @@ -30,6 +30,7 @@ import org.apache.directory.server.constants.MetaSchemaConstants; import org.apache.directory.server.schema.registries.Registries; import org.apache.directory.server.schema.registries.SyntaxRegistry; +import org.apache.directory.shared.ldap.NotImplementedException; import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer; import org.apache.directory.shared.ldap.schema.MatchingRule; import org.apache.directory.shared.ldap.schema.NoOpNormalizer; @@ -143,6 +144,11 @@ { return MetaSchemaConstants.SCHEMA_NAME; } + + public void setSchema( String schemaName ) + { + throw new NotImplementedException(); + } } @@ -204,6 +210,11 @@ { return MetaSchemaConstants.SCHEMA_NAME; } + + public void setSchema( String schemaName ) + { + throw new NotImplementedException(); + } } @@ -265,6 +276,11 @@ { return MetaSchemaConstants.SCHEMA_NAME; } + + public void setSchema( String schemaName ) + { + throw new NotImplementedException(); + } } @@ -322,6 +338,11 @@ public String getSchema() { return MetaSchemaConstants.SCHEMA_NAME; + } + + public void setSchema( String schemaName ) + { + throw new NotImplementedException(); } } } Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxProducer.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxProducer.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxProducer.java (original) +++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaSyntaxProducer.java Tue Jan 30 19:13:03 2007 @@ -24,6 +24,7 @@ import org.apache.directory.server.constants.MetaSchemaConstants; import org.apache.directory.server.schema.registries.Registries; +import org.apache.directory.shared.ldap.NotImplementedException; import org.apache.directory.shared.ldap.schema.Syntax; import org.apache.directory.shared.ldap.schema.syntax.NumericOidSyntaxChecker; import org.apache.directory.shared.ldap.schema.syntax.NumericStringSyntaxChecker; @@ -120,6 +121,11 @@ { return MetaSchemaConstants.SCHEMA_NAME; } + + public void setSchema( String schemaName ) + { + throw new NotImplementedException(); + } } @@ -169,6 +175,11 @@ { return MetaSchemaConstants.SCHEMA_NAME; } + + public void setSchema( String schemaName ) + { + throw new NotImplementedException(); + } } @@ -218,6 +229,11 @@ { return MetaSchemaConstants.SCHEMA_NAME; } + + public void setSchema( String schemaName ) + { + throw new NotImplementedException(); + } } @@ -266,6 +282,11 @@ public String getSchema() { return MetaSchemaConstants.SCHEMA_NAME; + } + + public void setSchema( String schemaName ) + { + throw new NotImplementedException(); } } } Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java (original) +++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java Tue Jan 30 19:13:03 2007 @@ -104,7 +104,7 @@ notLoaded.put( schema.getSchemaName(), schema ); Properties props = new Properties(); props.put( "package", ( ( BootstrapSchema ) schema ).getPackageName() ); - loadDepsFirst( new Stack(), notLoaded, schema, registries, props ); + loadDepsFirst( schema, new Stack(), notLoaded, schema, registries, props ); } @@ -133,7 +133,7 @@ // Create system schema and kick it off by loading system which // will never depend on anything. schema = new SystemSchema(); - load( schema, registries ); + load( schema, registries, false ); notLoaded.remove( schema.getSchemaName() ); // Remove if user specified it. loaded.put( schema.getSchemaName(), schema ); @@ -143,7 +143,7 @@ schema = ( BootstrapSchema ) list.next(); Properties props = new Properties(); props.put( "package", schema.getPackageName() ); - loadDepsFirst( new Stack(), notLoaded, schema, registries, props ); + loadDepsFirst( schema, new Stack(), notLoaded, schema, registries, props ); list = notLoaded.values().iterator(); } } @@ -156,7 +156,7 @@ * @param registries the registries to fill with producer created objects * @throws NamingException if there are any failures during this process */ - public final void load( Schema schema, Registries registries ) throws NamingException + public final void load( Schema schema, Registries registries, boolean isDepLoad ) throws NamingException { if ( registries.getLoadedSchemas().containsKey( schema.getSchemaName() ) ) { Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/NameOrNumericIdMatch.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/NameOrNumericIdMatch.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/NameOrNumericIdMatch.java (original) +++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/NameOrNumericIdMatch.java Tue Jan 30 19:13:03 2007 @@ -25,6 +25,7 @@ import org.apache.directory.server.schema.registries.OidRegistry; import org.apache.directory.server.schema.registries.Registries; +import org.apache.directory.shared.ldap.NotImplementedException; import org.apache.directory.shared.ldap.schema.MatchingRule; import org.apache.directory.shared.ldap.schema.Normalizer; import org.apache.directory.shared.ldap.schema.Syntax; @@ -146,5 +147,11 @@ public String getSchema() { return schema; + } + + + public void setSchema( String schemaName ) + { + throw new NotImplementedException(); } } Modified: directory/apacheds/trunk/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java (original) +++ directory/apacheds/trunk/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java Tue Jan 30 19:13:03 2007 @@ -134,8 +134,8 @@ { ApacheSchema apacheSchema = new ApacheSchema(); BootstrapSchemaLoader loader = new BootstrapSchemaLoader(); - loader.load( new SystemSchema(), registries ); - loader.load( apacheSchema, registries ); + loader.load( new SystemSchema(), registries, false ); + loader.load( apacheSchema, registries, false ); AttributeType type; type = registries.getAttributeTypeRegistry().lookup( "apacheNdn" ); @@ -174,8 +174,8 @@ { CoreSchema coreSchema = new CoreSchema(); BootstrapSchemaLoader loader = new BootstrapSchemaLoader(); - loader.load( new SystemSchema(), registries ); - loader.load( coreSchema, registries ); + loader.load( new SystemSchema(), registries, false ); + loader.load( coreSchema, registries, false ); AttributeType type; type = registries.getAttributeTypeRegistry().lookup( "knowledgeInformation" ); @@ -195,7 +195,7 @@ JavaSchema javaSchema = new JavaSchema(); BootstrapSchemaLoader loader = new BootstrapSchemaLoader(); - loader.load( javaSchema, registries ); + loader.load( javaSchema, registries, false ); AttributeType type; type = registries.getAttributeTypeRegistry().lookup( "javaFactory" ); Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AbstractSchemaLoader.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AbstractSchemaLoader.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AbstractSchemaLoader.java (original) +++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AbstractSchemaLoader.java Tue Jan 30 19:13:03 2007 @@ -74,6 +74,7 @@ * and tracks what schemas it has seen so the recursion does not go out of * control with depenency cycle detection. * + * @param rootAncestor the triggering schema load request: the root ancestor of dependency chain * @param beenthere stack of schema names we have visited and have yet to load * @param notLoaded hash of schemas keyed by name which have yet to be loaded * @param schema the current schema we are attempting to load @@ -82,7 +83,7 @@ * @throws NamingException if there is a cycle detected and/or another * failure results while loading, producing and or registering schema objects */ - protected final void loadDepsFirst( Stack beenthere, Map notLoaded, Schema schema, + protected final void loadDepsFirst( Schema rootAncestor, Stack beenthere, Map notLoaded, Schema schema, Registries registries, Properties props ) throws NamingException { if ( registries.getLoadedSchemas().containsKey( schema.getSchemaName() ) ) @@ -97,7 +98,15 @@ // if no deps then load this guy and return if ( deps == null || deps.length == 0 ) { - load( schema, registries ); + if ( rootAncestor == schema ) + { + load( schema, registries, false ); + } + else + { + load( schema, registries, true ); + } + notLoaded.remove( schema.getSchemaName() ); beenthere.pop(); return; @@ -131,11 +140,19 @@ throw new NamingException( "schema dependency cycle detected: " + beenthere ); } - loadDepsFirst( beenthere, notLoaded, dep, registries, props ); + loadDepsFirst( rootAncestor, beenthere, notLoaded, dep, registries, props ); } // We have loaded all our deps so we can load this schema - load( schema, registries ); + if ( rootAncestor == schema ) + { + load( schema, registries, false ); + } + else + { + load( schema, registries, true ); + } + notLoaded.remove( schema.getSchemaName() ); beenthere.pop(); } Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/ComparatorRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/ComparatorRegistry.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/ComparatorRegistry.java (original) +++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/ComparatorRegistry.java Tue Jan 30 19:13:03 2007 @@ -102,4 +102,14 @@ * from this registry */ void unregisterSchemaElements( String schemaName ); + + + /** + * Renames the schemaName associated with entities within this + * registry to a new schema name. + * + * @param originalSchemaName the original schema name + * @param newSchemaName the new name to give to the schema + */ + void renameSchema( String originalSchemaName, String newSchemaName ); } Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java (original) +++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java Tue Jan 30 19:13:03 2007 @@ -156,4 +156,19 @@ } } } + + + public void renameSchema( String originalSchemaName, String newSchemaName ) + { + List oids = new ArrayList( byOid.keySet() ); + for ( String oid : oids ) + { + String schemaNameForOid = oidToSchema.get( oid ); + if ( schemaNameForOid.equalsIgnoreCase( originalSchemaName ) ) + { + oidToSchema.remove( oid ); + oidToSchema.put( oid, newSchemaName ); + } + } + } } Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java (original) +++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java Tue Jan 30 19:13:03 2007 @@ -155,4 +155,19 @@ } } } + + + public void renameSchema( String originalSchemaName, String newSchemaName ) + { + List oids = new ArrayList( byOid.keySet() ); + for ( String oid : oids ) + { + String schemaNameForOid = oidToSchema.get( oid ); + if ( schemaNameForOid.equalsIgnoreCase( originalSchemaName ) ) + { + oidToSchema.remove( oid ); + oidToSchema.put( oid, newSchemaName ); + } + } + } } Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java (original) +++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java Tue Jan 30 19:13:03 2007 @@ -506,7 +506,7 @@ } loadedByName.put( schema.getSchemaName(), schema ); - schemaLoader.load( schema, this ); + schemaLoader.load( schema, this, false ); } Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java (original) +++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java Tue Jan 30 19:13:03 2007 @@ -156,4 +156,19 @@ } } } + + + public void renameSchema( String originalSchemaName, String newSchemaName ) + { + List oids = new ArrayList( byOid.keySet() ); + for ( String oid : oids ) + { + String schemaNameForOid = oidToSchema.get( oid ); + if ( schemaNameForOid.equalsIgnoreCase( originalSchemaName ) ) + { + oidToSchema.remove( oid ); + oidToSchema.put( oid, newSchemaName ); + } + } + } } Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/NormalizerRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/NormalizerRegistry.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/NormalizerRegistry.java (original) +++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/NormalizerRegistry.java Tue Jan 30 19:13:03 2007 @@ -77,6 +77,7 @@ */ boolean hasNormalizer( String oid ); + /** * Used to iterate through all normalizers. We have to iterate over the * OID String keys because these objects do not associate a matchingRule OID @@ -86,6 +87,7 @@ */ Iterator oidIterator(); + /** * Unregisters a normalizer from this registry by OID. * @@ -94,6 +96,7 @@ */ void unregister( String oid ) throws NamingException; + /** * Unregisters normalizers from this registry associated with a schema. * @@ -101,4 +104,14 @@ * removed from this registry */ void unregisterSchemaElements( String schemaName ); + + + /** + * Renames the schemaName associated with entities within this + * registry to a new schema name. + * + * @param originalSchemaName the original schema name + * @param newSchemaName the new name to give to the schema + */ + void renameSchema( String originalSchemaName, String newSchemaName ); } Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SchemaLoader.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SchemaLoader.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SchemaLoader.java (original) +++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SchemaLoader.java Tue Jan 30 19:13:03 2007 @@ -87,7 +87,8 @@ * * @param schema the schema to load * @param registries the registries to populate with these schemas + * @param isDepLoad tells the loader if this load request is to satisfy a dependency * @throws NamingException if any kind of problems are encountered during the load */ - void load( Schema schema, Registries registries ) throws NamingException; + void load( Schema schema, Registries registries, boolean isDepLoad ) throws NamingException; } Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SyntaxCheckerRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SyntaxCheckerRegistry.java?view=diff&rev=501705&r1=501704&r2=501705 ============================================================================== --- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SyntaxCheckerRegistry.java (original) +++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/SyntaxCheckerRegistry.java Tue Jan 30 19:13:03 2007 @@ -102,4 +102,14 @@ * @param schemaName the name of the schema whose syntaxCheckers will be removed */ void unregisterSchemaElements( String schemaName ); + + + /** + * Renames the schemaName associated with entities within this + * registry to a new schema name. + * + * @param originalSchemaName the original schema name + * @param newSchemaName the new name to give to the schema + */ + void renameSchema( String originalSchemaName, String newSchemaName ); }