directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r818148 - /directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/
Date Wed, 23 Sep 2009 15:58:11 GMT
Author: elecharny
Date: Wed Sep 23 15:58:10 2009
New Revision: 818148

URL: http://svn.apache.org/viewvc?rev=818148&view=rev
Log:
Modified the rename() method, the DN has been removed (it's already present in the entry to
be renamed)

Modified:
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitContentRuleSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitStructureRuleSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleUseSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NameFormSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -120,9 +120,12 @@
     }
 
 
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws Exception
     {
-        String schemaName = getSchemaName( name );
+        String schemaName = getSchemaName( entry.getDn() );
         AttributeType oldAt = factory.getAttributeType( entry, registries, schemaName );
 
         ServerEntry targetEntry = ( ServerEntry ) entry.clone();

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -114,7 +114,10 @@
     }
 
     
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws Exception
     {
         String oldOid = getOid( entry );
 
@@ -129,7 +132,7 @@
         String oid = ( String ) newRdn.getValue();
         checkOidIsUniqueForComparator( oid );
         
-        String schemaName = getSchemaName( name );
+        String schemaName = getSchemaName( entry.getDn() );
         
         Schema schema = registries.getLoadedSchema( schemaName );
         

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitContentRuleSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitContentRuleSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitContentRuleSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitContentRuleSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -95,10 +95,10 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.schema.SchemaChangeHandler#rename(org.apache.directory.shared.ldap.name.LdapDN,
javax.naming.directory.Attributes, java.lang.String)
+    /**
+     * {@inheritDoc}
      */
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
NamingException
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitStructureRuleSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitStructureRuleSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitStructureRuleSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/DitStructureRuleSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -105,11 +105,10 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.schema.SchemaChangeHandler#rename(
-     * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes, java.lang.String)
+    /**
+     * {@inheritDoc}
      */
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
NamingException
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -113,9 +113,12 @@
     }
 
     
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws Exception
     {
-        String schemaName = getSchemaName( name );
+        String schemaName = getSchemaName( entry.getDn() );
         MatchingRule oldMr = factory.getMatchingRule( entry, registries, schemaName );
         ServerEntry targetEntry = ( ServerEntry ) entry.clone();
         String newOid = ( String ) newRdn.getValue();

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleUseSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleUseSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleUseSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleUseSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -80,7 +80,10 @@
     }
 
 
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
NamingException
+    /**
+     * {@inheritDoc}
+     */
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NameFormSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NameFormSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NameFormSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NameFormSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -100,11 +100,10 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.schema.SchemaChangeHandler#rename(
-     * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes, Rdn,
boolean)
+    /**
+     * {@inheritDoc}
      */
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
NamingException
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -118,7 +118,10 @@
     }
     
 
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws Exception
     {
         String oldOid = getOid( entry );
 
@@ -133,7 +136,7 @@
         String oid = ( String ) newRdn.getValue();
         checkOidIsUniqueForNormalizer( oid );
         
-        if ( isSchemaLoaded( name ) )
+        if ( isSchemaLoaded( entry.getDn() ) )
         {
             Normalizer normalizer = factory.getNormalizer( entry, registries );
             normalizerRegistry.unregister( oldOid );

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -109,9 +109,12 @@
     }
 
 
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws Exception
     {
-        String schemaName = getSchemaName( name );
+        String schemaName = getSchemaName( entry.getDn() );
         ObjectClass oldOc = factory.getObjectClass( entry, registries, schemaName );
 
         // Dependency constraints are not managed by this class

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -49,7 +49,16 @@
     
     void delete( LdapDN name, ServerEntry entry, boolean cascaded ) throws Exception;
     
-    void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascaded ) throws Exception;
+    
+    /**
+     * Rename a schemaObject. It is not supposed to have any child
+     *
+     * @param entry The entry to be renamed
+     * @param newRdn The new entry name
+     * @param cascaded unused
+     * @throws Exception If the rename failed
+     */
+    void rename( ServerEntry entry, Rdn newRdn, boolean cascaded ) throws Exception;
     
     boolean modify( LdapDN name, ModificationOperation modOp, ServerEntry mods, ServerEntry
entry, ServerEntry targetEntry, boolean cascaded ) 
         throws Exception;

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
Wed Sep 23 15:58:10 2009
@@ -315,13 +315,14 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.schema.SchemaChangeManager#modifyRn(org.apache.directory.server.core.interceptor.context.RenameOperationContext,
org.apache.directory.server.core.entry.ServerEntry, boolean)
+    /**
+     * {@inheritDoc}
      */
-    public void rename( RenameOperationContext opContext, ServerEntry entry, boolean doCascadeModify
) 
+    public void rename( RenameOperationContext opContext, boolean doCascadeModify ) 
         throws Exception
     {
-        EntryAttribute oc = entry.get( objectClassAT );
+        ServerEntry originalEntry = opContext.getEntry().getOriginalEntry();
+        EntryAttribute oc = originalEntry.get( objectClassAT );
         
         for ( Value<?> value:oc )
         {
@@ -330,14 +331,14 @@
             if ( objectClass2synchronizerMap.containsKey( oid ) )
             {
                 RegistrySynchronizer synchronizer = objectClass2synchronizerMap.get( oid
);
-                synchronizer.rename( opContext.getDn(), entry, opContext.getNewRdn(), doCascadeModify
);
+                synchronizer.rename( originalEntry, opContext.getNewRdn(), doCascadeModify
);
                 return;
             }
         }
 
         if ( oc.contains( MetaSchemaConstants.META_SCHEMA_OC ) )
         {
-            schemaSynchronizer.rename( opContext.getDn(), entry, opContext.getNewRdn(), doCascadeModify
);
+            schemaSynchronizer.rename( originalEntry, opContext.getNewRdn(), doCascadeModify
);
             return;
         }
         

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -289,10 +289,11 @@
      * @param entry the entry of the metaSchema object before the rename
      * @param newRdn the new commonName of the metaSchema object
      */
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
Exception
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws Exception
     {
         String rdnAttribute = newRdn.getUpType();
         String rdnAttributeOid = globalRegistries.getAttributeTypeRegistry().getOidByName(
rdnAttribute );
+
         if ( ! rdnAttributeOid.equals( cnAT.getOid() ) )
         {
             throw new LdapOperationNotSupportedException( 
@@ -319,7 +320,7 @@
          */
         
         // step [1]
-        String schemaName = getSchemaName( name );
+        String schemaName = getSchemaName( entry.getDn() );
         Set<String> dependents = loader.listDependentSchemaNames( schemaName );
         if ( ! dependents.isEmpty() )
         {

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -125,7 +125,10 @@
     }
 
 
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws Exception
     {
         String oldOid = getOid( entry );
 
@@ -139,6 +142,7 @@
 
         ServerEntry targetEntry = ( ServerEntry ) entry.clone();
         String newOid = ( String ) newRdn.getValue();
+        
         if ( registries.getSyntaxCheckerRegistry().contains( newOid ) )
         {
             throw new LdapNamingException( "Oid " + newOid + " for new schema syntaxChecker
is not unique.", 
@@ -146,7 +150,8 @@
         }
 
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
-        if ( isSchemaLoaded( name ) )
+        
+        if ( isSchemaLoaded( entry.getDn() ) )
         {
             SyntaxChecker syntaxChecker = factory.getSyntaxChecker( targetEntry, registries
);
             syntaxCheckerRegistry.unregister( oldOid );

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java?rev=818148&r1=818147&r2=818148&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
Wed Sep 23 15:58:10 2009
@@ -111,7 +111,10 @@
     }
 
     
-    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws
Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void rename( ServerEntry entry, Rdn newRdn, boolean cascade ) throws Exception
     {
         String oldOid = getOid( entry );
 
@@ -132,9 +135,9 @@
         checkOidIsUnique( newOid );
         
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
-        LdapSyntax syntax = factory.getSyntax( targetEntry, registries, getSchemaName( name
) );
+        LdapSyntax syntax = factory.getSyntax( targetEntry, registries, getSchemaName( entry.getDn()
) );
         
-        if ( isSchemaLoaded( name ) )
+        if ( isSchemaLoaded( entry.getDn() ) )
         {
             syntaxRegistry.unregister( oldOid );
             syntaxRegistry.register( syntax );



Mime
View raw message