directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r601982 [1/3] - in /directory: apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/ apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ apacheds/branches/bigbang/core/src/...
Date Fri, 07 Dec 2007 04:29:10 GMT
Author: akarasulu
Date: Thu Dec  6 20:29:07 2007
New Revision: 601982

URL: http://svn.apache.org/viewvc?rev=601982&view=rev
Log:
changes ...

 o fixed several bugs dealing with various normalization issues
 o fixed problem with move and rename operations (bugs)
 o using Rdn instead of String now in various context for move 
   and rename
 o fixed various issues with the registries

WARNING: 

  Some things are still broken yet they will fall in place shortly
  these changes were so critical that I had to check point after
  hours of debugging.


Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionViewer.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaOperationControl.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
    directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AbstractSchemaLoader.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitContentRuleRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitStructureRuleRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultMatchingRuleRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultMatchingRuleUseRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNameFormRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultOidRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Thu Dec  6 20:29:07 2007
@@ -717,8 +717,7 @@
     public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws NamingException
     {
         LdapDN name = renameContext.getDn();
-        String newRdn = renameContext.getNewRdn();
-        
+
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
@@ -727,7 +726,8 @@
         LdapDN principalDn = principal.getJndiName();
         LdapDN newName = ( LdapDN ) name.clone();
         newName.remove( name.size() - 1 );
-        newName.add( parseNormalized( newRdn ).get( 0 ) );
+
+        newName.add( ( String ) renameContext.getNewRdn().getValue() );
 
         // bypass authz code if we are disabled
         if ( !enabled )
@@ -768,8 +768,7 @@
     {
         LdapDN oriChildName = moveAndRenameContext.getDn();
         LdapDN newParentName = moveAndRenameContext.getParent();
-        String newRn = moveAndRenameContext.getNewRdn();
-        
+
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
@@ -777,7 +776,7 @@
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN principalDn = principal.getJndiName();
         LdapDN newName = ( LdapDN ) newParentName.clone();
-        newName.add( newRn );
+        newName.add( moveAndRenameContext.getNewRdn().getUpName() );
 
         // bypass authz code if we are disabled
         if ( !enabled )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java Thu Dec  6 20:29:07 2007
@@ -253,7 +253,7 @@
         forward.setChangeType( ChangeType.ModDn );
         forward.setDn( opCtx.getDn().getUpName() );
         forward.setDeleteOldRdn( opCtx.getDelOldDn() );
-        forward.setNewRdn( opCtx.getNewRdn() );
+        forward.setNewRdn( opCtx.getNewRdn().getUpName() );
         forward.setNewSuperior( opCtx.getParent().getUpName() );
 
         Entry reverse = LdifUtils.reverseModifyRdn( attributes, opCtx.getParent(), opCtx.getDn(),

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Thu Dec  6 20:29:07 2007
@@ -445,8 +445,7 @@
     {
         LdapDN oriChildName = opContext.getDn();
         LdapDN parent = opContext.getParent();
-        String newRn = opContext.getNewRdn();
-        
+
         if ( oriChildName.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
         {
             throw new LdapOperationNotSupportedException( 
@@ -465,14 +464,13 @@
 
         // check to see if target entry exists
         LdapDN target = ( LdapDN ) parent.clone();
-        target.add( newRn );
-        target.normalize( normalizerMap );
-        
+        target.add( opContext.getNewRdn() );
+
         if ( nextInterceptor.hasEntry( new EntryOperationContext( target ) ) )
         {
             // we must calculate the resolved name using the user provided Rdn value
             LdapDN upTarget = ( LdapDN ) parent.clone();
-            upTarget.add( newRn );
+            upTarget.add( opContext.getNewRdn() );
 
             LdapNameAlreadyBoundException e;
             e = new LdapNameAlreadyBoundException( "target entry " + upTarget.getUpName() + " already exists!" );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java Thu Dec  6 20:29:07 2007
@@ -19,7 +19,10 @@
  */
 package org.apache.directory.server.core.interceptor.context;
 
+
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
+
 
 /**
  * A Move And Rename context used for Interceptors. It contains all the informations
@@ -32,28 +35,32 @@
 {
     /** The parent DN */
     private LdapDN parent;
-    
+
+
     /**
-     * 
      * Creates a new instance of MoveAndRenameOperationContext.
-     *
      */
     public MoveAndRenameOperationContext()
     {
     	super();
     }
 
+
     /**
-     * 
      * Creates a new instance of MoveAndRenameOperationContext.
      *
+     * @param oldDn the original source entry DN to be moved and renamed
+     * @param parent the new entry superior of the target after the move
+     * @param newRdn the new rdn to use for the target once renamed
+     * @param delOldRdn true if the old rdn value is deleted, false otherwise
      */
-    public MoveAndRenameOperationContext( LdapDN oldDn, LdapDN parent, String newRdn, boolean delOldDn )
+    public MoveAndRenameOperationContext( LdapDN oldDn, LdapDN parent, Rdn newRdn, boolean delOldRdn )
     {
-        super( oldDn, newRdn, delOldDn );
+        super( oldDn, newRdn, delOldRdn );
         this.parent = parent;
     }
 
+
     /**
      *  @return The parent DN
      */
@@ -62,6 +69,7 @@
         return parent;
     }
 
+
     /**
      * Set the parent DN
      *
@@ -72,6 +80,7 @@
         this.parent = parent;
     }
 
+
     /**
      * @see Object#toString()
      */
@@ -80,5 +89,4 @@
         return "ReplaceContext for old DN '" + getDn().getUpName() + "'" +
         ", parent '" + parent + "'";
     }
-
 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java Thu Dec  6 20:29:07 2007
@@ -19,7 +19,10 @@
  */
 package org.apache.directory.server.core.interceptor.context;
 
+
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
+
 
 /**
  * A RenameService context used for Interceptors. It contains all the informations
@@ -33,33 +36,36 @@
 public class RenameOperationContext extends AbstractOperationContext
 {
     /** The new DN */
-    private String newRdn;
+    private Rdn newRdn;
 
     /** The flag to remove the old DN Attribute  */
     private boolean delOldDn;
-    
+
+
     /**
-     * 
      * Creates a new instance of RenameOperationContext.
-     *
      */
     public RenameOperationContext()
     {
     	super();
     }
 
+
     /**
-     * 
      * Creates a new instance of RenameOperationContext.
      *
+     * @param oldDn the dn of the entry before the rename
+     * @param newRdn the new RDN to use for the target
+     * @param delOldDn true if we delete the old RDN value
      */
-    public RenameOperationContext( LdapDN oldDn, String newRdn, boolean delOldDn )
+    public RenameOperationContext( LdapDN oldDn, Rdn newRdn, boolean delOldDn )
     {
         super( oldDn );
         this.newRdn = newRdn;
         this.delOldDn = delOldDn;
     }
 
+
     /**
      * @return The delete old DN flag
      */
@@ -68,7 +74,8 @@
 		return delOldDn;
 	}
 
-	/**
+
+    /**
 	 * Set the flag to delete the old DN
 	 * @param delOldDn the flag to set
 	 */
@@ -77,24 +84,27 @@
 		this.delOldDn = delOldDn;
 	}
 
-	/**
+
+    /**
 	 * @return The new RDN
 	 */
-	public String getNewRdn() 
+	public Rdn getNewRdn()
 	{
 		return newRdn;
 	}
 
-	/**
+
+    /**
 	 * Set the new RDN
-	 * @param newDn The new RDN
+	 * @param newRdn The new RDN
 	 */
-	public void setNewRdn( String newRdn ) 
+	public void setNewRdn( Rdn newRdn )
 	{
 		this.newRdn = newRdn;
 	}
 
-	/**
+
+    /**
      * @see Object#toString()
      */
     public String toString()

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Thu Dec  6 20:29:07 2007
@@ -335,7 +335,8 @@
         throws NamingException
     {
         // setup the op context and populate with request controls
-        MoveAndRenameOperationContext opCtx = new MoveAndRenameOperationContext( oldDn, parent, newRdn, delOldDn );
+        MoveAndRenameOperationContext opCtx =
+                new MoveAndRenameOperationContext( oldDn, parent, new Rdn( newRdn ), delOldDn );
         opCtx.addRequestControls( requestControls );
         
         // execute moveAndRename operation
@@ -389,7 +390,7 @@
     protected void doRename( LdapDN oldDn, String newRdn, boolean delOldRdn ) throws NamingException
     {
         // setup the op context and populate with request controls
-        RenameOperationContext opCtx = new RenameOperationContext( oldDn, newRdn, delOldRdn );
+        RenameOperationContext opCtx = new RenameOperationContext( oldDn, new Rdn( newRdn ), delOldRdn );
         opCtx.addRequestControls( requestControls );
         
         // execute rename operation

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java Thu Dec  6 20:29:07 2007
@@ -88,40 +88,42 @@
     // Normalize all Name based arguments for ContextPartition interface operations
     // ------------------------------------------------------------------------
 
-    public void add(NextInterceptor nextInterceptor, AddOperationContext opContext)
-        throws NamingException
+    public void add( NextInterceptor nextInterceptor, AddOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         nextInterceptor.add( opContext );
     }
 
 
     public void delete( NextInterceptor nextInterceptor, DeleteOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         nextInterceptor.delete( opContext );
     }
 
 
-    public void modify( NextInterceptor nextInterceptor, ModifyOperationContext opContext )
-        throws NamingException
+    public void modify( NextInterceptor nextInterceptor, ModifyOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         nextInterceptor.modify( opContext );
     }
 
 
-    public void rename( NextInterceptor nextInterceptor, RenameOperationContext opContext )
-        throws NamingException
+    public void rename( NextInterceptor nextInterceptor, RenameOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        LdapDN rdn = new LdapDN();
+        rdn.add( opContext.getNewRdn() );
+        rdn.normalize( attrNormalizers );
+        opContext.setNewRdn( rdn.getRdn() );
+
+        opContext.getDn().normalize( attrNormalizers );
         nextInterceptor.rename( opContext );
     }
 
 
     public void move( NextInterceptor nextInterceptor, MoveOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         opContext.getParent().normalize( attrNormalizers);
         nextInterceptor.move( opContext );
     }
@@ -130,20 +132,23 @@
     public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext )
         throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
-        LdapDN.normalize( opContext.getParent(), attrNormalizers);
+        LdapDN rdn = new LdapDN();
+        rdn.add( opContext.getNewRdn() );
+        rdn.normalize( attrNormalizers );
+        opContext.setNewRdn( rdn.getRdn() );
+
+        opContext.getDn().normalize( attrNormalizers );
+        opContext.getParent().normalize( attrNormalizers );
         nextInterceptor.moveAndRename( opContext );
     }
 
+
     public NamingEnumeration<SearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
     {
-        LdapDN base = opContext.getDn();
         ExprNode filter = opContext.getFilter();
-        
-        base.normalize( attrNormalizers);
+        opContext.getDn().normalize( attrNormalizers );
+        ExprNode result = ( ExprNode ) filter.accept( normVisitor );
 
-        ExprNode result = (ExprNode)filter.accept( normVisitor );
-        
         if ( result == null )
         {
             LOG.warn( "undefined filter based on undefined attributeType not evaluted at all.  Returning empty enumeration." );
@@ -154,268 +159,26 @@
             opContext.setFilter( result );
             return nextInterceptor.search( opContext );
         }
-        /*
-         * If we have a leaf that uses a unknown attribute then we must return
-         * an empty result to the user.
-         */
-        /*
-        if ( filter.isLeaf() )
-        {
-            LeafNode ln = ( LeafNode ) filter;
-            
-            if ( !attributeRegistry.hasAttributeType( ln.getAttribute() ) )
-            {
-                StringBuffer buf = new StringBuffer();
-                buf.append( "undefined filter based on undefined attributeType '" );
-                buf.append( ln.getAttribute() );
-                buf.append( "' not evaluted at all.  Returning empty enumeration." );
-                LOG.warn( buf.toString() );
-                return new EmptyEnumeration<SearchResult>();
-            }
-        }
-
-        boolean isFailure = true;
-        
-        while ( isFailure && ( filter != null ) )
-        {
-            try
-            {
-                if ( filter.isLeaf() )
-                {
-                    LeafNode ln = ( LeafNode ) filter;
-                    
-                    if ( !attributeRegistry.hasAttributeType( ln.getAttribute() ) )
-                    {
-                        StringBuffer buf = new StringBuffer();
-                        buf.append( "undefined filter based on undefined attributeType '" );
-                        buf.append( ln.getAttribute() );
-                        buf.append( "' not evaluted at all.  Returning empty enumeration." );
-                        LOG.warn( buf.toString() );
-                        return new EmptyEnumeration<SearchResult>();
-                    }
-                }
-
-                ExprNode result = (ExprNode)filter.accept( normVisitor );
-                
-                isFailure = false;
-            }
-            catch( UndefinedFilterAttributeException e )
-            {
-                isFailure = true;
-                
-                if ( LOG.isWarnEnabled() )
-                {
-                    LOG.warn( "An undefined attribute was found within the supplied search filter.  " +
-                            "The node associated with the filter has been removed.", e.getCause() );
-                }
-
-                // we can only get here if the filter is a branch node with only leaves
-                // note that in this case the undefined node will not be removed.
-                BranchNode bnode = ( BranchNode ) filter;
-                
-                if ( bnode instanceof NotNode )
-                {
-                    return new EmptyEnumeration<SearchResult>();
-                }
-                
-                bnode.getChildren().remove( e.getUndefinedFilterNode() );
-                
-                if ( bnode instanceof AndNode )
-                {
-                    return new EmptyEnumeration<SearchResult>();
-                }
-                
-                if ( bnode.getChildren().size() < 2 )
-                {
-                    filter = bnode.getFirstChild();
-                }
-            }
-        }
-
-        // check that after pruning we have valid branch node at the top
-        if ( !filter.isLeaf() )
-        {
-            BranchNode child = ( BranchNode ) filter;
-
-            // if the remaining filter branch node has no children return an empty enumeration
-            if ( child.getChildren().size() == 0 || child.get( "undefined" ) == Boolean.TRUE )
-            {
-                LOG.warn( "Undefined branchnode filter without child nodes not " +
-                        "evaluted at all.  Returning empty enumeration." );
-                return new EmptyEnumeration<SearchResult>();
-            }
-
-            // now for AND & OR nodes with a single child left replace them with their child
-            if ( child.getChildren().size() == 1 && ! ( child instanceof NotNode ) )
-            {
-                filter = child.getFirstChild();
-            }
-        }
-        
-        // --------------------------------------------------------------------
-        // The filter below this point is now expanded to include specific
-        // attributes when a general one is supplied.
-        // --------------------------------------------------------------------
-
-        if ( !filter.isLeaf() )
-        {
-            expVisitor.visit( filter );
-        }
-        else
-        {
-            LeafNode leaf = ( LeafNode ) filter;
-            
-            if ( attributeRegistry.hasDescendants( leaf.getAttribute() ) )
-            {
-                // create new OR node and add the filter leaf to it 
-                // and set filter to this new branch node
-                BranchNode bnode = new OrNode();
-                bnode.getChildren().add( filter );
-                filter = bnode;
-                
-                // add descendant nodes to this new branch node
-                Iterator descendants = attributeRegistry.descendants( leaf.getAttribute() );
-                
-                while ( descendants.hasNext() )
-                {
-                    LeafNode newLeaf = null;
-                    AttributeType descendant = ( AttributeType ) descendants.next();
-                    
-                    if ( leaf instanceof PresenceNode )
-                    {
-                    	newLeaf = new PresenceNode( descendant.getOid() );
-                    } 
-                    else if ( leaf instanceof EqualityNode )
-                    {
-                    	EqualityNode equalityNode = ( EqualityNode ) leaf;
-                    	
-                        if ( equalityNode.getValue() instanceof String )
-                        {
-                            newLeaf = new EqualityNode( descendant.getOid(), 
-                                ( String ) equalityNode.getValue() );
-                        }
-                        else if ( equalityNode.getValue() instanceof byte[] )
-                        {
-                            newLeaf = new EqualityNode( descendant.getOid(), 
-                                ( byte[] ) equalityNode.getValue() );
-                        }
-                        else
-                        {
-                            newLeaf = new EqualityNode( descendant.getOid(), 
-                            		equalityNode.getValue().toString() );
-                        }
-                    }
-                    else if ( leaf instanceof GreaterEqNode )
-                    {
-                    	GreaterEqNode greaterEqNode = ( GreaterEqNode ) leaf;
-                    	
-                        if ( greaterEqNode.getValue() instanceof String )
-                        {
-                            newLeaf = new GreaterEqNode( descendant.getOid(), 
-                                ( String ) greaterEqNode.getValue() );
-                        }
-                        else if ( greaterEqNode.getValue() instanceof byte[] )
-                        {
-                            newLeaf = new GreaterEqNode( descendant.getOid(), 
-                                ( byte[] ) greaterEqNode.getValue() );
-                        }
-                        else
-                        {
-                            newLeaf = new GreaterEqNode( descendant.getOid(), 
-                            		greaterEqNode.getValue().toString() );
-                        }
-                    }
-                    else if ( leaf instanceof LessEqNode )
-                    {
-                    	LessEqNode lessEqNode = ( LessEqNode ) leaf;
-                    	
-                        if ( lessEqNode.getValue() instanceof String )
-                        {
-                            newLeaf = new LessEqNode( descendant.getOid(), 
-                                ( String ) lessEqNode.getValue() );
-                        }
-                        else if ( lessEqNode.getValue() instanceof byte[] )
-                        {
-                            newLeaf = new LessEqNode( descendant.getOid(), 
-                                ( byte[] ) lessEqNode.getValue() );
-                        }
-                        else
-                        {
-                            newLeaf = new LessEqNode( descendant.getOid(), 
-                            		lessEqNode.getValue().toString() );
-                        }
-                    }
-                    else if ( leaf instanceof ApproximateNode )
-                    {
-                    	ApproximateNode approximateNode = ( ApproximateNode ) leaf;
-                    	
-                        if ( approximateNode.getValue() instanceof String )
-                        {
-                            newLeaf = new ApproximateNode( descendant.getOid(), 
-                                ( String ) approximateNode.getValue()  );
-                        }
-                        else if ( approximateNode.getValue() instanceof byte[] )
-                        {
-                            newLeaf = new ApproximateNode( descendant.getOid(), 
-                                ( byte[] ) approximateNode.getValue()  );
-                        }
-                        else
-                        {
-                            newLeaf = new ApproximateNode( descendant.getOid(), 
-                            		approximateNode.getValue().toString() );
-                        }
-                    }
-                    else if ( leaf instanceof SubstringNode )
-                    {
-                        SubstringNode substringNode = ( SubstringNode ) leaf;
-                        
-                        newLeaf = new SubstringNode( descendant.getOid(), 
-                            substringNode.getInitial(), 
-                            substringNode.getFinal() );
-                    }
-                    else if ( leaf instanceof ExtensibleNode )
-                    {
-                        ExtensibleNode extensibleNode = ( ExtensibleNode ) leaf;
-                        
-                        newLeaf = new ExtensibleNode( descendant.getOid(), 
-                            extensibleNode.getValue(),  
-                            extensibleNode.getMatchingRuleId(), 
-                            extensibleNode.dnAttributes() );
-                    	
-                    }
-                    else
-                    {
-                        throw new IllegalStateException( "Unknown assertion type: " + leaf );
-                    }
-                    
-                    bnode.getChildren().add( newLeaf );
-                }
-            }
-        }
-        
-        opContext.setFilter( filter );
-        return nextInterceptor.search( opContext );
-        */
     }
 
 
     public boolean hasEntry( NextInterceptor nextInterceptor, EntryOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         return nextInterceptor.hasEntry( opContext );
     }
 
 
     public NamingEnumeration<SearchResult> list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         return nextInterceptor.list( opContext );
     }
 
 
     public Attributes lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         return nextInterceptor.lookup( opContext );
     }
 
@@ -426,28 +189,28 @@
 
     public LdapDN getMatchedName ( NextInterceptor nextInterceptor, GetMatchedNameOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         return nextInterceptor.getMatchedName( opContext );
     }
 
 
     public LdapDN getSuffix ( NextInterceptor nextInterceptor, GetSuffixOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         return nextInterceptor.getSuffix( opContext );
     }
 
 
     public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         return next.compare( opContext );
     }
     
     
     public void bind( NextInterceptor next, BindOperationContext opContext )  throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         next.bind( opContext );
     }
 
@@ -460,7 +223,7 @@
 
     public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext opContext ) throws NamingException
     {
-        LdapDN.normalize( opContext.getDn(), attrNormalizers );
+        opContext.getDn().normalize( attrNormalizers );
         next.removeContextPartition( opContext );
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Thu Dec  6 20:29:07 2007
@@ -318,7 +318,7 @@
 
     public void inspect() throws Exception
     {
-        PartitionViewer viewer = new PartitionViewer( this, searchEngine );
+        PartitionViewer viewer = new PartitionViewer( this );
         viewer.execute();
     }
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Thu Dec  6 20:29:07 2007
@@ -65,7 +65,6 @@
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
 import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
-import org.apache.directory.server.core.partition.impl.btree.SearchEngine;
 
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
@@ -87,7 +86,7 @@
  */
 public class PartitionFrame extends JFrame
 {
-    private static final Logger log = LoggerFactory.getLogger( PartitionFrame.class );
+    private static final Logger LOG = LoggerFactory.getLogger( PartitionFrame.class );
 
     private static final long serialVersionUID = 4049353102291513657L;
 
@@ -111,20 +110,21 @@
     private JMenu indices = new JMenu();
 
     // Non Swing Stuff
-    private BTreePartition partition = null;
-    private boolean doCleanUp = false;
-    private Map<Long, EntryNode> nodes = null;
-    private EntryNode root = null;
-    private SearchEngine eng = null;
+    private BTreePartition partition;
+    private boolean doCleanUp;
+    private Map<Long, EntryNode> nodes;
+    private EntryNode root;
 
 
     /**
      * Creates new form JFrame
+     * 
+     * @param db the partition to view
+     * @throws NamingException if there are problems accessing the partition
      */
-    public PartitionFrame(BTreePartition db, SearchEngine eng) throws NamingException
+    public PartitionFrame( BTreePartition db ) throws NamingException
     {
         partition = db;
-        this.eng = eng;
 
         initialize();
         buildIndicesMenu( partition );
@@ -135,6 +135,8 @@
 
     /**
      * This method is called from within the constructor to initialize the form
+     *
+     * @throws NamingException on partition access errors
      */
     private void initialize() throws NamingException
     {
@@ -302,8 +304,8 @@
         {
             public void actionPerformed( ActionEvent an_event )
             {
-                if ( log.isDebugEnabled() )
-                    log.debug( "action command = " + an_event.getActionCommand() );
+                if ( LOG.isDebugEnabled() )
+                    LOG.debug( "action command = " + an_event.getActionCommand() );
 
                 try
                 {
@@ -392,6 +394,7 @@
      * 
      * @return the DN of the selected tree node or the root Dn of the tree if 
      * nothing has been selected yet.
+     * @throws NamingException on partition access errors
      */
     public String getSelectedDn() throws NamingException
     {
@@ -427,7 +430,7 @@
 
     public void doImport()
     {
-        FileReader in = null;
+        FileReader in;
         JFileChooser chooser = new JFileChooser();
         int choice = chooser.showOpenDialog( this );
         File selected = chooser.getSelectedFile();
@@ -461,19 +464,16 @@
         {
             // @todo display popup with error here!
             e.printStackTrace();
-            return;
         }
         catch ( FileNotFoundException e )
         {
             // @todo display popup with error here!
             e.printStackTrace();
-            return;
         }
         catch ( Exception e )
         {
             // @todo display popup with error here!
             e.printStackTrace();
-            return;
         }
     }
 
@@ -508,15 +508,15 @@
     {
         try
         {
-            if ( mode == FilterDialog.RUN_MODE )
+            if ( mode.equals( FilterDialog.RUN_MODE ) )
             {
                 doRun( dialog.getFilter(), dialog.getScope(), dialog.getBase(), dialog.getLimit() );
             }
-            else if ( mode == FilterDialog.DEBUG_MODE )
+            else if ( mode.equals( FilterDialog.DEBUG_MODE ) )
             {
                 doDebug( dialog.getFilter(), dialog.getScope(), dialog.getBase(), dialog.getLimit() );
             }
-            else if ( mode == FilterDialog.ANNOTATE_MODE )
+            else if ( mode.equals( FilterDialog.ANNOTATE_MODE ) )
             {
                 if ( doAnnotate( dialog.getFilter() ) )
                 {
@@ -528,6 +528,8 @@
                     // allow user to make edits.
                     return;
                 }
+
+                LOG.debug( "call to annotate" );
             }
             else
             {
@@ -589,13 +591,13 @@
 
     public boolean doRun( String filter, String scope, String base, String limit ) throws Exception
     {
-        if ( log.isDebugEnabled() )
+        if ( LOG.isDebugEnabled() )
         {
-            log.debug( "Search attempt using filter '" + filter + "' " + "with scope '" + scope
+            LOG.debug( "Search attempt using filter '" + filter + "' " + "with scope '" + scope
                 + "' and a return limit of '" + limit + "'" );
         }
 
-        ExprNode root = null;
+        ExprNode root;
 
         try
         {
@@ -620,15 +622,15 @@
 
         SearchControls ctls = new SearchControls();
 
-        if ( scope == FilterDialog.BASE_SCOPE )
+        if ( scope.equals( FilterDialog.BASE_SCOPE ) )
         {
             ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
         }
-        else if ( scope == FilterDialog.SINGLE_SCOPE )
+        else if ( scope.equals( FilterDialog.SINGLE_SCOPE ) )
         {
             ctls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         }
-        else if ( scope == FilterDialog.SUBTREE_SCOPE )
+        else if ( scope.equals( FilterDialog.SUBTREE_SCOPE ) )
         {
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         }
@@ -643,7 +645,8 @@
             limitMax = Integer.parseInt( limit );
         }
 
-        NamingEnumeration cursor = eng.search( new LdapDN( base ), AliasDerefMode.DEREF_ALWAYS, root, ctls );
+        NamingEnumeration cursor = partition
+                .getSearchEngine().search( new LdapDN( base ), AliasDerefMode.DEREF_ALWAYS, root, ctls );
         String[] cols = new String[2];
         cols[0] = "id";
         cols[1] = "dn";
@@ -690,18 +693,20 @@
 
     public void doDebug( String filter, String scope, String base, String limit )
     {
-        if ( log.isDebugEnabled() )
+        if ( LOG.isDebugEnabled() )
         {
-            log.debug( "Search attempt using filter '" + filter + "' " + "with scope '" + scope
+            LOG.debug( "debug attempt using base '" + base + "' filter '" + filter + "' " + "with scope '" + scope
                 + "' and a return limit of '" + limit + "'" );
         }
+
+        LOG.warn( "NOT IMPLMENTED YET" );
     }
 
 
     public void selectTreeNode( Long id )
     {
         Stack<TreeNode> stack = new Stack<TreeNode>();
-        Object[] comps = null;
+        Object[] comps;
         TreeNode parent = nodes.get( id );
 
         while ( parent != null && ( parent != parent.getParent() ) )
@@ -734,7 +739,7 @@
 
     public boolean doAnnotate( String filter ) throws Exception
     {
-        ExprNode root = null;
+        ExprNode root;
 
         try
         {
@@ -759,7 +764,7 @@
         AnnotatedFilterTreeDialog treeDialog = new AnnotatedFilterTreeDialog( PartitionFrame.this, false );
         treeDialog.setFilter( filter );
 
-        eng.getOptimizer().annotate( root );
+        partition.getSearchEngine().getOptimizer().annotate( root );
         TreeNode astRoot = new ASTNode( null, root );
         TreeModel model = new DefaultTreeModel( astRoot, true );
         treeDialog.setModel( model );
@@ -776,7 +781,7 @@
      */
     public void showIndexDialog( String idxAttr ) throws Exception
     {
-        Index index = null;
+        Index index;
         boolean isSystem = partition.hasSystemIndexOn( idxAttr );
 
         if ( isSystem )
@@ -800,7 +805,7 @@
 
     public void buildIndicesMenu( BTreePartition partition )
     {
-        JMenuItem item = null;
+        JMenuItem item;
 
         ActionListener listener = new ActionListener()
         {
@@ -925,5 +930,11 @@
         {
             tree.validate();
         }
+    }
+
+
+    public void setDoCleanUp( boolean doCleanUp )
+    {
+        this.doCleanUp = doCleanUp;
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionViewer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionViewer.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionViewer.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionViewer.java Thu Dec  6 20:29:07 2007
@@ -20,17 +20,16 @@
 package org.apache.directory.server.core.partition.impl.btree.gui;
 
 
-import java.awt.Dimension;
-import java.awt.Toolkit;
-
-import javax.naming.NamingException;
-
-import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
-import org.apache.directory.server.core.partition.impl.btree.SearchEngine;
-
+import org.apache.directory.server.core.partition.impl.btree.*;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.naming.NamingException;
+import java.awt.*;
+
 
 /**
  * A partition database viewer.
@@ -40,66 +39,46 @@
  */
 public class PartitionViewer
 {
-    private static final Logger log = LoggerFactory.getLogger( PartitionViewer.class );
+    private static final Logger LOG = LoggerFactory.getLogger( PartitionViewer.class );
 
     /** A handle on the atomic partition */
     private BTreePartition partition;
-    private SearchEngine eng;
 
 
-    public PartitionViewer(BTreePartition db, SearchEngine eng)
+    public PartitionViewer( BTreePartition db )
     {
         this.partition = db;
-        this.eng = eng;
     }
 
 
-    //    /**
-    //     * Viewer main is not really used.
-    //     *
-    //     * @param argv the var args
-    //     */
-    //    public static void main( String [] argv )
-    //    {
-    //        // set up system Look&Feel
-    //        try
-    //        {
-    //            UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() ) ;
-    //        }
-    //        catch ( Exception e )
-    //        {
-    //            System.out.println( "Could not set look and feel to use " +
-    //                UIManager.getSystemLookAndFeelClassName() + "." ) ;
-    //            e.printStackTrace() ;
-    //        }
-    //
-    //        PartitionViewer viewer = new PartitionViewer(  ) ;
-    //
-    //        try
-    //        {
-    //            viewer.execute() ;
-    //        }
-    //        catch ( Exception e )
-    //        {
-    //            e.printStackTrace() ;
-    //            System.exit( -1 ) ;
-    //        }
-    //    }
-
-    
     // added return value so expressions in debugger does not freak with void
     public int execute() throws NamingException
     {
-        PartitionFrame frame = new PartitionFrame( partition, eng );
-
-        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-        Dimension frameSize = frame.getSize();
-        frameSize.height = ( ( frameSize.height > screenSize.height ) ? screenSize.height : frameSize.height );
-        frameSize.width = ( ( frameSize.width > screenSize.width ) ? screenSize.width : frameSize.width );
-        frame.setLocation( ( screenSize.width - frameSize.width ) / 2, ( screenSize.height - frameSize.height ) / 2 );
+        Thread t = new Thread( new Runnable() {
+            public void run()
+            {
+                PartitionFrame frame = null;
+                try
+                {
+                    frame = new PartitionFrame( PartitionViewer.this.partition );
+                }
+                catch ( NamingException e )
+                {
+                    e.printStackTrace();
+                    return;
+                }
+                Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+                Dimension frameSize = frame.getSize();
+                frameSize.height = ( ( frameSize.height > screenSize.height ) ? screenSize.height : frameSize.height );
+                frameSize.width = ( ( frameSize.width > screenSize.width ) ? screenSize.width : frameSize.width );
+                frame.setLocation( ( screenSize.width - frameSize.width ) / 2, ( screenSize.height - frameSize.height ) / 2 );
+
+                frame.setVisible( true );
+                LOG.debug( frameSize + "" );
+            }
+        });
 
-        frame.setVisible( true );
-        log.debug( frameSize + "" );
+        t.run();
         return 0;
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Thu Dec  6 20:29:07 2007
@@ -256,7 +256,7 @@
 
     public final void addIndexOn( Index index ) throws NamingException
     {
-        if ( index instanceof JdbmIndex)
+        if ( index instanceof JdbmIndex )
         {
             store.addIndex( ( JdbmIndex ) index );
         }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Thu Dec  6 20:29:07 2007
@@ -671,9 +671,7 @@
         LdapDN newName = ( LdapDN ) oldName.clone();
         newName.remove( oldName.size() - 1 );
 
-        LdapDN newRdnName = new LdapDN( opContext.getNewRdn() );
-        newRdnName.normalize( attrRegistry.getNormalizerMapping() );
-        newName.add( newRdnName.toNormName() );
+        newName.add( opContext.getNewRdn() );
 
         // handle a normal modify without following referrals
         if ( refval == null || refval.equals( IGNORE ) )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java Thu Dec  6 20:29:07 2007
@@ -38,7 +38,6 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.util.NamespaceTools;
 
 
 /**
@@ -136,7 +135,7 @@
     }
 
 
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         Schema schema = getSchema( name );
         AttributeType oldAt = factory.getAttributeType( entry, targetRegistries, schema.getSchemaName() );
@@ -151,7 +150,7 @@
         }
 
         Attributes targetEntry = ( Attributes ) entry.clone();
-        String newOid = NamespaceTools.getRdnValue( newRdn );
+        String newOid = ( String ) newRdn.getValue();
         checkOidIsUnique( newOid );
         targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
         AttributeType at = factory.getAttributeType( targetEntry, targetRegistries, schema.getSchemaName() );
@@ -170,7 +169,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn,
         Attributes entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
@@ -188,7 +187,7 @@
 
         Schema newSchema = getSchema( newParentName );
         Attributes targetEntry = ( Attributes ) entry.clone();
-        String newOid = NamespaceTools.getRdnValue( newRn );
+        String newOid = ( String ) newRn.getValue();
         targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
         checkOidIsUnique( newOid );
         AttributeType at = factory.getAttributeType( targetEntry, targetRegistries, newSchema.getSchemaName() );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java Thu Dec  6 20:29:07 2007
@@ -44,7 +44,6 @@
 import org.apache.directory.shared.ldap.schema.syntax.ComparatorDescription;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.Base64;
-import org.apache.directory.shared.ldap.util.NamespaceTools;
 
 
 /**
@@ -179,7 +178,7 @@
     }
 
     
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         String oldOid = getOid( entry );
 
@@ -191,7 +190,7 @@
                 ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
 
-        String oid = NamespaceTools.getRdnValue( newRdn );
+        String oid = ( String ) newRdn.getValue();
         checkOidIsUniqueForComparator( oid );
         Schema schema = getSchema( name );
         
@@ -206,7 +205,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRdn, boolean deleteOldRn,
         Attributes entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
@@ -220,7 +219,7 @@
                 ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
 
-        String oid = NamespaceTools.getRdnValue( newRn );
+        String oid = ( String ) newRdn.getValue();
         checkOidIsUniqueForComparator( oid );
         
         Schema oldSchema = getSchema( oriChildName );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java Thu Dec  6 20:29:07 2007
@@ -20,13 +20,14 @@
 package org.apache.directory.server.core.schema;
 
 
-import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
-
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.DITContentRule;
 
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+
 
 /**
  * A schema entity change handler for DitContentRules.
@@ -79,7 +80,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(org.apache.directory.shared.ldap.name.LdapDN, org.apache.directory.shared.ldap.name.LdapDN, java.lang.String, boolean, javax.naming.directory.Attributes)
      */
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn,
         Attributes entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
@@ -101,7 +102,7 @@
     /* (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)
      */
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java Thu Dec  6 20:29:07 2007
@@ -20,13 +20,14 @@
 package org.apache.directory.server.core.schema;
 
 
-import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
-
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.DITStructureRule;
 
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+
 
 /**
  * A schema entity change handler for DitStructureRules.
@@ -86,7 +87,7 @@
      * org.apache.directory.shared.ldap.name.LdapDN, 
      * java.lang.String, boolean, javax.naming.directory.Attributes)
      */
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn,
         Attributes entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
@@ -112,7 +113,7 @@
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#rename(
      * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes, java.lang.String)
      */
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java Thu Dec  6 20:29:07 2007
@@ -38,7 +38,6 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
-import org.apache.directory.shared.ldap.util.NamespaceTools;
 
 
 /**
@@ -121,7 +120,7 @@
     }
 
     
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         Schema schema = getSchema( name );
         MatchingRule oldMr = factory.getMatchingRule( entry, targetRegistries, schema.getSchemaName() );
@@ -136,7 +135,7 @@
         }
 
         Attributes targetEntry = ( Attributes ) entry.clone();
-        String newOid = NamespaceTools.getRdnValue( newRdn );
+        String newOid = ( String ) newRdn.getValue();
         checkOidIsUnique( newOid );
         
         targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
@@ -156,7 +155,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRdn, boolean deleteOldRn, 
         Attributes entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
@@ -174,7 +173,7 @@
 
         Schema newSchema = getSchema( newParentName );
         Attributes targetEntry = ( Attributes ) entry.clone();
-        String newOid = NamespaceTools.getRdnValue( newRn );
+        String newOid = ( String ) newRdn.getValue();
         checkOidIsUnique( newOid );
         
         targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java Thu Dec  6 20:29:07 2007
@@ -20,13 +20,14 @@
 package org.apache.directory.server.core.schema;
 
 
-import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
-
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.MatchingRuleUse;
 
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+
 
 /**
  * A schema entity change handler for DitMatchingRuleUses.
@@ -44,11 +45,6 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.schema.AbstractSchemaChangeHandler#modify(
-     * org.apache.directory.shared.ldap.name.LdapDN, 
-     * javax.naming.directory.Attributes, javax.naming.directory.Attributes)
-     */
     @Override
     protected void modify( LdapDN name, Attributes entry, Attributes targetEntry, 
         boolean cascade ) throws NamingException
@@ -57,70 +53,45 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.schema.SchemaChangeHandler#add(
-     * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
-     */
     public void add( LdapDN name, Attributes entry ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.schema.SchemaChangeHandler#delete(
-     * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
-     */
     public void delete( LdapDN name, Attributes entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(
-     * org.apache.directory.shared.ldap.name.LdapDN, 
-     * org.apache.directory.shared.ldap.name.LdapDN, 
-     * java.lang.String, boolean, javax.naming.directory.Attributes)
-     */
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn,
         Attributes entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(
-     * org.apache.directory.shared.ldap.name.LdapDN, 
-     * org.apache.directory.shared.ldap.name.LdapDN, 
-     * javax.naming.directory.Attributes)
-     */
-    public void replace( LdapDN oriChildName, LdapDN newParentName, 
-        Attributes entry, boolean cascade ) throws NamingException
+    public void replace( LdapDN oriChildName, LdapDN newParentName,
+                         Attributes entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
-    /* (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)
-     */
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
-    public void add( MatchingRuleUse mru )
+    public void add( MatchingRuleUse mru ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
-    public void delete( MatchingRuleUse mru, boolean cascade )
+    public void delete( MatchingRuleUse mru, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java Thu Dec  6 20:29:07 2007
@@ -25,6 +25,7 @@
 
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.NameForm;
 
 
@@ -83,9 +84,9 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(
      * org.apache.directory.shared.ldap.name.LdapDN, org.apache.directory.shared.ldap.name.LdapDN, 
-     * java.lang.String, boolean, javax.naming.directory.Attributes)
+     * Rdn, boolean, javax.naming.directory.Attributes)
      */
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn,
         boolean deleteOldRn, Attributes entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
@@ -108,9 +109,9 @@
 
     /* (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)
+     * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes, Rdn, boolean)
      */
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java Thu Dec  6 20:29:07 2007
@@ -44,7 +44,6 @@
 import org.apache.directory.shared.ldap.schema.syntax.NormalizerDescription;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.Base64;
-import org.apache.directory.shared.ldap.util.NamespaceTools;
 
 
 /**
@@ -180,7 +179,7 @@
     }
     
 
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         String oldOid = getOid( entry );
 
@@ -192,7 +191,7 @@
                 ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
 
-        String oid = NamespaceTools.getRdnValue( newRdn );
+        String oid = ( String ) newRdn.getValue();
         checkOidIsUniqueForNormalizer( oid );
         
         Schema schema = getSchema( name );
@@ -209,7 +208,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRdn, boolean deleteOldRn,
         Attributes entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
@@ -223,7 +222,7 @@
                 ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
 
-        String oid = NamespaceTools.getRdnValue( newRn );
+        String oid = ( String ) newRdn.getValue();
         checkOidIsUniqueForNormalizer( oid );
         
         Schema oldSchema = getSchema( oriChildName );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java Thu Dec  6 20:29:07 2007
@@ -38,7 +38,6 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
-import org.apache.directory.shared.ldap.util.NamespaceTools;
 
 
 /**
@@ -123,7 +122,7 @@
     }
 
 
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         Schema schema = getSchema( name );
         ObjectClass oldOc = factory.getObjectClass( entry, targetRegistries, schema.getSchemaName() );
@@ -138,7 +137,7 @@
         }
 
         Attributes targetEntry = ( Attributes ) entry.clone();
-        String newOid = NamespaceTools.getRdnValue( newRdn );
+        String newOid = ( String ) newRdn.getValue();
         targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
         checkOidIsUnique( newOid );
         ObjectClass oc = factory.getObjectClass( targetEntry, targetRegistries, schema.getSchemaName() );
@@ -157,7 +156,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRdn, boolean deleteOldRn,
         Attributes entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
@@ -175,7 +174,7 @@
 
         Schema newSchema = getSchema( newParentName );
         Attributes targetEntry = ( Attributes ) entry.clone();
-        String newOid = NamespaceTools.getRdnValue( newRn );
+        String newOid = ( String ) newRdn.getValue();
         checkOidIsUnique( newOid );
         targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
         ObjectClass oc = factory.getObjectClass( targetEntry, targetRegistries, newSchema.getSchemaName() );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java Thu Dec  6 20:29:07 2007
@@ -30,6 +30,7 @@
 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.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
@@ -156,8 +157,14 @@
             checkForDependencies( isEnabled, targetEntry );
         }
     }
-    
-    
+
+
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn, Attributes entry, boolean cascaded ) throws NamingException
+    {
+
+    }
+
+
     /**
      * Handles the addition of a metaSchema object to the schema partition.
      * 
@@ -251,6 +258,7 @@
     }
 
 
+
     /**
      * Responds to the rdn (commonName) of the metaSchema object being 
      * changed.  Changes all the schema entities associated with the 
@@ -260,9 +268,9 @@
      * @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, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
-        String rdnAttribute = NamespaceTools.getRdnAttribute( newRdn );
+        String rdnAttribute = newRdn.getUpType();
         String rdnAttributeOid = globalRegistries.getOidRegistry().getOid( rdnAttribute );
         if ( ! rdnAttributeOid.equals( cnAT.getOid() ) )
         {
@@ -319,7 +327,7 @@
         // do steps 2 and 3 if the schema has been enabled and is loaded
         
         // step [2] 
-        String newSchemaName = NamespaceTools.getRdnValue( newRdn );
+        String newSchemaName = ( String ) newRdn.getUpValue();
         globalRegistries.getComparatorRegistry().renameSchema( schemaName, newSchemaName );
         globalRegistries.getNormalizerRegistry().renameSchema( schemaName, newSchemaName );
         globalRegistries.getSyntaxCheckerRegistry().renameSchema( schemaName, newSchemaName );
@@ -421,7 +429,7 @@
     }
 
 
-    private final String getSchemaName( LdapDN schema )
+    private String getSchemaName( LdapDN schema )
     {
         return ( String ) schema.getRdn().getValue();
     }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java Thu Dec  6 20:29:07 2007
@@ -45,7 +45,6 @@
 import org.apache.directory.shared.ldap.schema.syntax.SyntaxCheckerDescription;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.Base64;
-import org.apache.directory.shared.ldap.util.NamespaceTools;
 
 
 /**
@@ -188,7 +187,7 @@
     }
 
 
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         String oldOid = getOid( entry );
 
@@ -202,7 +201,7 @@
 
         Schema schema = getSchema( name );
         Attributes targetEntry = ( Attributes ) entry.clone();
-        String newOid = NamespaceTools.getRdnValue( newRdn );
+        String newOid = ( String ) newRdn.getValue();
         if ( super.targetRegistries.getSyntaxCheckerRegistry().hasSyntaxChecker( newOid ) )
         {
             throw new LdapNamingException( "Oid " + newOid + " for new schema syntaxChecker is not unique.", 
@@ -222,7 +221,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRdn, boolean deleteOldRn, 
         Attributes entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
@@ -240,7 +239,7 @@
         Schema newSchema = getSchema( newParentName );
         Attributes targetEntry = ( Attributes ) entry.clone();
         
-        String newOid = NamespaceTools.getRdnValue( newRn );
+        String newOid = ( String ) newRdn.getValue();
         if ( super.targetRegistries.getSyntaxCheckerRegistry().hasSyntaxChecker( newOid ) )
         {
             throw new LdapNamingException( "Oid " + newOid + " for new schema syntaxChecker is not unique.", 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java Thu Dec  6 20:29:07 2007
@@ -38,7 +38,6 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.Syntax;
-import org.apache.directory.shared.ldap.util.NamespaceTools;
 
 
 /**
@@ -126,7 +125,7 @@
     }
 
     
-    public void rename( LdapDN name, Attributes entry, String newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         String oldOid = getOid( entry );
 
@@ -142,7 +141,7 @@
 
         Schema schema = getSchema( name );
         Attributes targetEntry = ( Attributes ) entry.clone();
-        String newOid = NamespaceTools.getRdnValue( newRdn );
+        String newOid = ( String ) newRdn.getValue();
         checkOidIsUnique( newOid );
         
         targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
@@ -164,7 +163,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, 
+    public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn,
         Attributes entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
@@ -183,7 +182,7 @@
         Schema oldSchema = getSchema( oriChildName );
         Schema newSchema = getSchema( newParentName );
         Attributes targetEntry = ( Attributes ) entry.clone();
-        String newOid = NamespaceTools.getRdnValue( newRn );
+        String newOid = ( String ) newRn.getValue();
         checkOidIsUnique( newOid );
         
         targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Thu Dec  6 20:29:07 2007
@@ -308,15 +308,13 @@
     public final void loadWithDependencies( Collection<Schema> schemas, Registries targetRegistries ) throws NamingException
     {
         HashMap<String,Schema> notLoaded = new HashMap<String,Schema>();
-        Iterator<Schema> list = schemas.iterator();
-        
-        while ( list.hasNext() )
+
+        for ( Schema schema : schemas )
         {
-            Schema schema = list.next();
             notLoaded.put( schema.getSchemaName(), schema );
         }
 
-        list = notLoaded.values().iterator();
+        Iterator<Schema> list = notLoaded.values().iterator();
         while ( list.hasNext() )
         {
             Schema schema = list.next();

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java?rev=601982&r1=601981&r2=601982&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java Thu Dec  6 20:29:07 2007
@@ -22,6 +22,7 @@
 
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
@@ -41,7 +42,7 @@
     
     void delete( LdapDN name, Attributes entry, boolean cascaded ) throws NamingException;
     
-    void rename( LdapDN name, Attributes entry, String newRdn, boolean cascaded ) throws NamingException;
+    void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascaded ) throws NamingException;
     
     void modify( LdapDN name, int modOp, Attributes mods, Attributes entry, Attributes targetEntry, boolean cascaded ) 
         throws NamingException;
@@ -49,7 +50,7 @@
     void modify( LdapDN name, List<ModificationItemImpl> mods, Attributes entry, Attributes targetEntry, boolean cascaded )
         throws NamingException;
     
-    void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, Attributes entry, 
+    void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn, Attributes entry,
         boolean cascaded ) throws NamingException;
     
     void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry, boolean cascaded ) throws NamingException;



Mime
View raw message