directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r811373 - in /directory/apacheds/branches/apacheds-schema: avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ core-integ/src/test/java/org/apache/directory/server/core/suites/ core/src/main/java/org/apache/directory...
Date Fri, 04 Sep 2009 12:51:18 GMT
Author: akarasulu
Date: Fri Sep  4 12:51:17 2009
New Revision: 811373

URL: http://svn.apache.org/viewvc?rev=811373&view=rev
Log:
Refactored suffix methods on Partition interface:

 o getSuffix() returns String representation of the UPDN and is required by Spring
 o getSuffixDn() returns the LdapDN which is normalized after the registries are set
 o setSuffix( String ) sets the UPDN of the suffix and is required by Spring


Modified:
    directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/NullPartition.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
    directory/apacheds/branches/apacheds-schema/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
Fri Sep  4 12:51:17 2009
@@ -475,10 +475,16 @@
     }
 
 
-    public LdapDN getSuffix()
+    public LdapDN getSuffixDn()
     {
         return suffix;
     }
+    
+    
+    public String getSuffix()
+    {
+        return suffix.getUpName();
+    }
 
 
     public void bind( BindOperationContext opContext ) throws Exception

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
Fri Sep  4 12:51:17 2009
@@ -18,6 +18,7 @@
  */
 package org.apache.directory.server.core.suites;
 
+
 import org.apache.directory.server.core.authn.SimpleAuthenticationIT;
 import org.apache.directory.server.core.changelog.DefaultChangeLogIT;
 import org.apache.directory.server.core.collective.CollectiveAttributeServiceIT;

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Fri Sep  4 12:51:17 2009
@@ -609,7 +609,7 @@
         }
 
         RemoveContextPartitionOperationContext removePartitionCtx =
-                new RemoveContextPartitionOperationContext( adminSession, partition.getSuffix()
);
+                new RemoveContextPartitionOperationContext( adminSession, partition.getSuffixDn()
);
         partitionNexus.removeContextPartition( removePartitionCtx );
     }
 
@@ -1444,7 +1444,7 @@
             
             if( changeLog.isExposed() && changeLog.isTagSearchSupported() )
             {
-                String clSuffix = ( ( TaggableSearchableChangeLogStore ) changeLog.getChangeLogStore()
).getPartition().getSuffix().getUpName();
+                String clSuffix = ( ( TaggableSearchableChangeLogStore ) changeLog.getChangeLogStore()
).getPartition().getSuffixDn().getUpName();
                 partitionNexus.getRootDSE( null ).getOriginalEntry().add( SchemaConstants.CHANGELOG_CONTEXT_AT,
clSuffix );
             }
         }

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/NullPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/NullPartition.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/NullPartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/NullPartition.java
Fri Sep  4 12:51:17 2009
@@ -111,7 +111,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.Partition#getSuffix()
      */
-    public LdapDN getSuffix()
+    public LdapDN getSuffixDn()
     {
         return suffix;
     }
@@ -333,4 +333,10 @@
     public void unbind( UnbindOperationContext opContext ) throws Exception
     {
     }
+
+
+    public String getSuffix() throws InvalidNameException
+    {
+        return suffix.getUpName();
+    }
 }

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/Partition.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
Fri Sep  4 12:51:17 2009
@@ -79,13 +79,19 @@
      *
      * @return the suffix for this Partition.
      */
-    LdapDN getSuffix();
+    LdapDN getSuffixDn();
 
 
     /**
-     * Sets the non-normalized suffix for this Partition as a string.
+     * Gets the user provided suffix for this Partition as a String.
+     */
+    String getSuffix()  throws InvalidNameException;
+
+
+    /**
+     * Sets the user provided suffix for this Partition as a String.
      *
-     * @param suffix the suffix string for this Partition.
+     * @param suffix the suffix String for this Partition.
      * @throws InvalidNameException If the suffix is not a valid DN
      */
     void setSuffix( String suffix )  throws InvalidNameException;

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
Fri Sep  4 12:51:17 2009
@@ -271,7 +271,7 @@
                     }
                     catch ( Exception e )
                     {
-                        LOG.warn( "Failed to destroy a partition: " + partition.getSuffix(),
e );
+                        LOG.warn( "Failed to destroy a partition: " + partition.getSuffixDn(),
e );
                     }
                     finally
                     {
@@ -338,7 +338,7 @@
             system.add( addOperationContext );
         }
         
-        String key = system.getSuffix().getUpName();
+        String key = system.getSuffixDn().getUpName();
         
         if ( partitions.containsKey( key ) )
         {
@@ -348,19 +348,19 @@
         synchronized ( partitionLookupTree )
         {
             partitions.put( key, system );
-            partitionLookupTree.add( system.getSuffix(), system );
+            partitionLookupTree.add( system.getSuffixDn(), system );
             EntryAttribute namingContexts = rootDSE.get( SchemaConstants.NAMING_CONTEXTS_AT
);
             
             if ( namingContexts == null )
             {
                 namingContexts = new DefaultServerAttribute( 
                     registries.getAttributeTypeRegistry().lookup( SchemaConstants.NAMING_CONTEXTS_AT
), 
-                    system.getSuffix().getUpName() );
+                    system.getSuffixDn().getUpName() );
                 rootDSE.put( namingContexts );
             }
             else
             {
-                namingContexts.add( system.getSuffix().getUpName() );
+                namingContexts.add( system.getSuffixDn().getUpName() );
             }
         }
 
@@ -427,12 +427,18 @@
      * Always returns the empty String "".
      * @return the empty String ""
      */
-    public LdapDN getSuffix()
+    public LdapDN getSuffixDn()
     {
         return LdapDN.EMPTY_LDAPDN;
     }
 
     
+    public String getSuffix()
+    {
+        return StringTools.EMPTY;
+    }
+    
+    
     /**
      * Unsupported operation on the Nexus.
      * @throws UnsupportedOperationException everytime
@@ -887,7 +893,7 @@
         Partition partition = opContext.getPartition();
 
         // Turn on default indices
-        String key = partition.getSuffix().getNormName();
+        String key = partition.getSuffixDn().getNormName();
         
         if ( partitions.containsKey( key ) )
         {
@@ -901,7 +907,7 @@
         
         synchronized ( partitionLookupTree )
         {
-            LdapDN partitionSuffix = partition.getSuffix();
+            LdapDN partitionSuffix = partition.getSuffixDn();
             
             if ( partitionSuffix == null )
             {
@@ -909,7 +915,7 @@
             }
             
             partitions.put( partitionSuffix.toString(), partition );
-            partitionLookupTree.add( partition.getSuffix(), partition );
+            partitionLookupTree.add( partition.getSuffixDn(), partition );
 
             EntryAttribute namingContexts = rootDSE.get( SchemaConstants.NAMING_CONTEXTS_AT
);
 
@@ -948,7 +954,7 @@
             throw new NameNotFoundException( msg );
         }
         
-        String partitionSuffix = partition.getSuffix().getUpName();
+        String partitionSuffix = partition.getSuffixDn().getUpName();
 
         // Retrieve the namingContexts from the RootDSE : the partition
         // suffix must be present in those namingContexts
@@ -1052,7 +1058,7 @@
     public LdapDN getSuffix( GetSuffixOperationContext getSuffixContext ) throws Exception
     {
         Partition backend = getPartition( getSuffixContext.getDn() );
-        return backend.getSuffix();
+        return backend.getSuffixDn();
     }
 
 
@@ -1134,9 +1140,9 @@
         
         if ( namingContexts != null )
         {
-            namingContexts.remove( partition.getSuffix().getUpName() );
+            namingContexts.remove( partition.getSuffixDn().getUpName() );
         }
         
-        partitions.remove( partition.getSuffix().getUpName() );
+        partitions.remove( partition.getSuffixDn().getUpName() );
     }
 }

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
Fri Sep  4 12:51:17 2009
@@ -168,7 +168,7 @@
         content.add( mainPnl, java.awt.BorderLayout.NORTH );
         getContentPane().add( content, BorderLayout.CENTER );
         // set title
-        setTitle( "Partition: " + this.partition.getSuffix().getUpName() );
+        setTitle( "Partition: " + this.partition.getSuffixDn().getUpName() );
         // add status bar
         getContentPane().add( statusBar, BorderLayout.SOUTH );
         // add menu bar
@@ -376,7 +376,7 @@
         try
         {
             TreePath path = tree.getSelectionModel().getSelectionPath();
-            String parentDn = partition.getSuffix().getUpName();
+            String parentDn = partition.getSuffixDn().getUpName();
 
             if ( null != path )
             {
@@ -421,7 +421,7 @@
 
         if ( null == path )
         {
-            return partition.getSuffix().getUpName();
+            return partition.getSuffixDn().getUpName();
         }
 
         Object last = path.getLastPathComponent();
@@ -440,7 +440,7 @@
         }
         else
         {
-            base = partition.getSuffix().getUpName();
+            base = partition.getSuffixDn().getUpName();
         }
 
         return base;
@@ -572,7 +572,7 @@
         }
         else
         {
-            dialog.setBase( partition.getSuffix().getUpName() );
+            dialog.setBase( partition.getSuffixDn().getUpName() );
         }
 
         dialog.addActionListener( new ActionListener()
@@ -886,8 +886,8 @@
         // boolean doFiltered = false;
         nodes = new HashMap<Long, EntryNode>();
 
-        ServerEntry suffix = partition.lookup( partition.getEntryId( partition.getSuffix().toNormName()
) );
-        Long id = partition.getEntryId( partition.getSuffix().getUpName() );
+        ServerEntry suffix = partition.lookup( partition.getEntryId( partition.getSuffixDn().toNormName()
) );
+        Long id = partition.getEntryId( partition.getSuffixDn().getUpName() );
         root = new EntryNode( id, null, partition, suffix, nodes );
 
         /*

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
Fri Sep  4 12:51:17 2009
@@ -157,6 +157,7 @@
         {
             throw new IllegalStateException( "Not allowed to set the wrappedPartition after
initialization." );
         }
+        
         this.wrapped = wrapped;
     }
     
@@ -328,12 +329,21 @@
     }
 
 
-    /**
-     * {@inheritDoc}
+    /* (non-Javadoc)
+     * @see org.apache.directory.server.core.partition.Partition#getSuffixDN()
      */
-    public final LdapDN getSuffix()
+    public final LdapDN getSuffixDn()
     {
-        return wrapped.getSuffix();
+        return wrapped.getSuffixDn();
+    }
+    
+    
+    /* (non-Javadoc)
+     * @see org.apache.directory.server.core.partition.Partition#getSuffix()
+     */
+    public String getSuffix()
+    {
+        return ID;
     }
 
 

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
Fri Sep  4 12:51:17 2009
@@ -235,7 +235,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -281,7 +281,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -327,7 +327,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -373,7 +373,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -419,7 +419,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -515,7 +515,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -637,7 +637,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )
@@ -690,7 +690,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )
@@ -719,7 +719,7 @@
         // (& (m-oid=*) (m-name=*) )
         filter.addNode( new PresenceNode( M_OID_OID ) );
         filter.addNode( new PresenceNode( M_NAME_OID ) );
-        return partition.search( new SearchOperationContext( null, partition.getSuffix(),
+        return partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
             AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
     }
 
@@ -767,7 +767,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )
@@ -816,7 +816,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )
@@ -859,7 +859,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             while ( cursor.next() )
@@ -939,7 +939,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffix(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )

Modified: directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Fri Sep  4 12:51:17 2009
@@ -84,7 +84,7 @@
     // ------------------------------------------------------------------------
 
 
-    public LdapDN getSuffix()
+    public LdapDN getSuffixDn()
     {
         return suffix;
     }
@@ -490,15 +490,10 @@
         return store.getChildCount( id );
     }
 
-
-    public final LdapDN getSuffixDn()
-    {
-        return store.getSuffix();
-    }
-
-    public final LdapDN getUpSuffixDn()
+    
+    public final String getSuffix()
     {
-        return store.getUpSuffix();
+        return store.getSuffixDn();
     }
 
 

Modified: directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
Fri Sep  4 12:51:17 2009
@@ -67,7 +67,7 @@
         assertTrue( ((DnBranchNode<Partition>)child).contains( "dc=example" ) );
 
         child = ((DnBranchNode<Partition>)child).getChild( "dc=example" );
-        assertEquals( "dc=example, dc=com", ((DnLeafNode<Partition>)child).getElement().getSuffix().getUpName()
);
+        assertEquals( "dc=example, dc=com", ((DnLeafNode<Partition>)child).getElement().getSuffixDn().getUpName()
);
     }
 
 
@@ -98,7 +98,7 @@
         
         DnNode<Partition> child = ((DnBranchNode<Partition>)partitionLookupTree).getChild(
"ou=system" );
         assertTrue( child instanceof DnLeafNode );
-        assertEquals( "ou=system", ((DnLeafNode<Partition>)child).getElement().getSuffix().getUpName()
);
+        assertEquals( "ou=system", ((DnLeafNode<Partition>)child).getElement().getSuffixDn().getUpName()
);
 
         child = ((DnBranchNode<Partition>)partitionLookupTree).getChild( "dc=com" );
         assertTrue( child instanceof DnBranchNode );
@@ -106,7 +106,7 @@
         
         child = ((DnBranchNode<Partition>)child).getChild( "dc=example" );
         assertTrue( child instanceof DnLeafNode );
-        assertEquals( "dc=example, dc=com", ((DnLeafNode<Partition>)child).getElement().getSuffix().getUpName()
);
+        assertEquals( "dc=example, dc=com", ((DnLeafNode<Partition>)child).getElement().getSuffixDn().getUpName()
);
     }
 
 
@@ -175,10 +175,10 @@
         
         DnNode<Partition> child1 = ((DnBranchNode<Partition>)child).getChild(
"dc=example1" );
         assertTrue( child1 instanceof DnLeafNode );
-        assertEquals( "dc=example1, dc=com", ((DnLeafNode<Partition>)child1).getElement().getSuffix().getUpName()
);
+        assertEquals( "dc=example1, dc=com", ((DnLeafNode<Partition>)child1).getElement().getSuffixDn().getUpName()
);
 
         DnNode<Partition> child2 = ((DnBranchNode<Partition>)child).getChild(
"dc=example1" );
         assertTrue( child2 instanceof DnLeafNode );
-        assertEquals( "dc=example1, dc=com", ((DnLeafNode<Partition>)child2).getElement().getSuffix().getUpName()
);
+        assertEquals( "dc=example1, dc=com", ((DnLeafNode<Partition>)child2).getElement().getSuffixDn().getUpName()
);
     }
 }

Modified: directory/apacheds/branches/apacheds-schema/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=811373&r1=811372&r2=811373&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
Fri Sep  4 12:51:17 2009
@@ -211,7 +211,7 @@
      */
     public void loadConfig() throws Exception
     {
-        File dir = new File( configParentDirectory, wrappedPartition.getSuffix().getUpName()
);
+        File dir = new File( configParentDirectory, wrappedPartition.getSuffixDn().getUpName()
);
 
         //        if( ! dir.exists() )
         //        {
@@ -582,11 +582,17 @@
         wrappedPartition.bind( bindContext );
     }
 
-
-    public LdapDN getSuffix()
+    
+    public String getSuffix()
     {
         return wrappedPartition.getSuffix();
     }
+    
+
+    public LdapDN getSuffixDn()
+    {
+        return wrappedPartition.getSuffixDn();
+    }
 
 
     public void unbind( UnbindOperationContext unbindContext ) throws Exception



Mime
View raw message