directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r951876 [2/2] - in /directory: apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/ apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/ apacheds/trunk/core-api/src/main/...
Date Sun, 06 Jun 2010 15:31:13 GMT
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java?rev=951876&r1=951875&r2=951876&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
Sun Jun  6 15:31:12 2010
@@ -89,8 +89,8 @@ public class AvlPartition extends Abstra
 
         // initialize the store
         store.setId( getId() );
-        suffixDn.normalize( schemaManager.getNormalizerMapping() );
-        store.setSuffixDn( suffixDn );
+        suffix.normalize( schemaManager.getNormalizerMapping() );
+        store.setSuffixDn( suffix );
 
         for ( AvlIndex<?, Entry> index : indexedAttributes )
         {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=951876&r1=951875&r2=951876&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Sun Jun  6 15:31:12 2010
@@ -75,7 +75,7 @@ public abstract class BTreePartition<ID>
 
     protected String id;
     protected int cacheSize = -1;
-    protected DN suffixDn;
+    protected DN suffix;
     private File partitionDir;
 
     /** The rootDSE context */
@@ -404,27 +404,23 @@ public abstract class BTreePartition<ID>
     /**
      * {@inheritDoc}
      */
-    public void setSuffix( String suffix ) throws LdapInvalidDnException
+    public void setSuffix( DN suffix ) throws LdapInvalidDnException
     {
-        this.suffixDn = new DN( suffix );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getSuffix()
-    {
-        return suffixDn.getName();
+        this.suffix = suffix;
+        
+        if ( schemaManager != null )
+        {
+            this.suffix.normalize( schemaManager.getNormalizerMapping() );
+        }
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public DN getSuffixDn()
+    public DN getSuffix()
     {
-        return suffixDn;
+        return suffix;
     }
 
 

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=951876&r1=951875&r2=951876&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
(original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
Sun Jun  6 15:31:12 2010
@@ -167,7 +167,7 @@ public class PartitionFrame extends JFra
         content.add( mainPnl, java.awt.BorderLayout.NORTH );
         getContentPane().add( content, BorderLayout.CENTER );
         // set title
-        setTitle( "Partition: " + this.partition.getSuffixDn().getName() );
+        setTitle( "Partition: " + this.partition.getSuffix().getName() );
         // add status bar
         getContentPane().add( statusBar, BorderLayout.SOUTH );
         // add menu bar
@@ -375,7 +375,7 @@ public class PartitionFrame extends JFra
         try
         {
             TreePath path = tree.getSelectionModel().getSelectionPath();
-            String parentDn = partition.getSuffixDn().getName();
+            String parentDn = partition.getSuffix().getName();
 
             if ( null != path )
             {
@@ -420,7 +420,7 @@ public class PartitionFrame extends JFra
 
         if ( null == path )
         {
-            return partition.getSuffixDn().getName();
+            return partition.getSuffix().getName();
         }
 
         Object last = path.getLastPathComponent();
@@ -439,7 +439,7 @@ public class PartitionFrame extends JFra
         }
         else
         {
-            base = partition.getSuffixDn().getName();
+            base = partition.getSuffix().getName();
         }
 
         return base;
@@ -567,7 +567,7 @@ public class PartitionFrame extends JFra
         }
         else
         {
-            dialog.setBase( partition.getSuffixDn().getName() );
+            dialog.setBase( partition.getSuffix().getName() );
         }
 
         dialog.addActionListener( new ActionListener()
@@ -877,8 +877,8 @@ public class PartitionFrame extends JFra
         // boolean doFiltered = false;
         nodes = new HashMap<Long, EntryNode>();
 
-        Entry suffix = partition.lookup( partition.getEntryId( partition.getSuffixDn() )
);
-        Long id = partition.getEntryId( partition.getSuffixDn() );
+        Entry suffix = partition.lookup( partition.getEntryId( partition.getSuffix() ) );
+        Long id = partition.getEntryId( partition.getSuffix() );
         root = new EntryNode( id, null, partition, suffix, nodes );
 
         /*
@@ -898,7 +898,7 @@ public class PartitionFrame extends JFra
          }
          });
 
-         dialog.setBase(database.getSuffixDn().toString());
+         dialog.setBase(database.getSuffix().toString());
          dialog.setScope(FilterDialog.SUBTREE_SCOPE);
 
          //Center the frame on screen

Modified: directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java
URL: http://svn.apache.org/viewvc/directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java?rev=951876&r1=951875&r2=951876&view=diff
==============================================================================
--- directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java
(original)
+++ directory/installers/trunk/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java
Sun Jun  6 15:31:12 2010
@@ -235,7 +235,7 @@ public class Service implements DaemonAp
 
         configPartition = new LdifPartition();
         configPartition.setId( "config" );
-        configPartition.setSuffix( "ou=config" );
+        configPartition.setSuffix( new DN( "ou=config" ) );
         configPartition.setSchemaManager( schemaManager );
         configPartition.setWorkingDirectory( partitionsDir.getPath() + "/config" );
         configPartition.setPartitionDir( new File( configPartition.getWorkingDirectory()
) );
@@ -585,7 +585,7 @@ public class Service implements DaemonAp
         
         ExprNode filter = new PresenceNode( SchemaConstants.OBJECT_CLASS_AT );
         
-        EntryFilteringCursor cursor = session.search( partition.getSuffixDn(), SearchScope.SUBTREE,
filter, AliasDerefMode.NEVER_DEREF_ALIASES, new HashSet( MANDATORY_ENTRY_ATOP_MAP.values()
) );
+        EntryFilteringCursor cursor = session.search( partition.getSuffix(), SearchScope.SUBTREE,
filter, AliasDerefMode.NEVER_DEREF_ALIASES, new HashSet( MANDATORY_ENTRY_ATOP_MAP.values()
) );
         cursor.beforeFirst();
 
         List<Modification> mods = new ArrayList<Modification>();



Mime
View raw message