directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r763508 - in /directory/apacheds/branches/ldif-partition: core-api/src/main/java/org/apache/directory/server/core/partition/ core/src/main/java/org/apache/directory/server/core/impl/ core/src/main/java/org/apache/directory/server/core/parti...
Date Thu, 09 Apr 2009 04:05:14 GMT
Author: akarasulu
Date: Thu Apr  9 04:05:13 2009
New Revision: 763508

URL: http://svn.apache.org/viewvc?rev=763508&view=rev
Log:
make suffix access methods clearer

Modified:
    directory/apacheds/branches/ldif-partition/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
    directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java
    directory/apacheds/branches/ldif-partition/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/ui/PartitionFrame.java

Modified: directory/apacheds/branches/ldif-partition/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java?rev=763508&r1=763507&r2=763508&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
(original)
+++ directory/apacheds/branches/ldif-partition/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
Thu Apr  9 04:05:13 2009
@@ -87,20 +87,18 @@
 
 
     /**
-     * Gets the suffix distinguished name of this Partition.
+     * Gets the normalized distinguished name of this Partition's suffix.
      *
-     * @return LdapDN the distinguished name of this Partition's root entry
+     * @return LdapDN the normalized DN of this Partition's root entry
      * @throws Exception if access or suffix parsing fails
      */
-    LdapDN getSuffixDn() throws Exception;
+    LdapDN getNormSuffixDn() throws Exception;
 
 
     /**
-     * Gets the distinguished name of the suffix for all entries stored within 
-     * this Partition.
+     * Gets the user provided distinguished name of this Partition's suffix.
      *
-     * @return LdapDN representing the distinguished name of this Partition's 
-     * root entry.
+     * @return LdapDN the user provided DN of this Partition's root entry
      * @throws Exception if access or suffix parsing fails
      */
     LdapDN getUpSuffixDn() throws Exception;

Modified: directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java?rev=763508&r1=763507&r2=763508&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/impl/DefaultDirectoryService.java
Thu Apr  9 04:05:13 2009
@@ -551,7 +551,7 @@
         }
 
         RemoveContextPartitionOperationContext removePartitionCtx =
-                new RemoveContextPartitionOperationContext( adminSession, partition.getSuffixDn()
);
+                new RemoveContextPartitionOperationContext( adminSession, partition.getNormSuffixDn()
);
         partitionNexus.removeContextPartition( removePartitionCtx );
     }
 
@@ -1444,7 +1444,7 @@
             if( changeLog.isExposeChangeLog() && changeLog.isTagSearchSupported()
)
             {
                 String clSuffix = ( ( TaggableSearchableChangeLogStore ) changeLog.getChangeLogStore()
)
-                    .getPartition().getSuffixDn().getUpName();
+                    .getPartition().getNormSuffixDn().getUpName();
                 partitionNexus.getRootDSE( null ).getOriginalEntry().add( SchemaConstants.CHANGELOG_CONTEXT_AT,
clSuffix );
             }
         }

Modified: directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=763508&r1=763507&r2=763508&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Thu Apr  9 04:05:13 2009
@@ -290,7 +290,7 @@
                     }
                     catch ( Exception e )
                     {
-                        LOG.warn( "Failed to destroy a partition: " + partition.getSuffixDn(),
e );
+                        LOG.warn( "Failed to destroy a partition: " + partition.getNormSuffixDn(),
e );
                     }
                     finally
                     {
@@ -357,7 +357,7 @@
         AddOperationContext addOperationContext = new AddOperationContext( adminSession,
systemEntry );
         system.add( addOperationContext );
         
-        String key = system.getSuffixDn().toString();
+        String key = system.getNormSuffixDn().toString();
         
         if ( partitions.containsKey( key ) )
         {
@@ -367,7 +367,7 @@
         synchronized ( partitionLookupTree )
         {
             partitions.put( key, system );
-            partitionLookupTree.add( system.getSuffixDn(), system );
+            partitionLookupTree.add( system.getNormSuffixDn(), system );
             EntryAttribute namingContexts = rootDSE.get( SchemaConstants.NAMING_CONTEXTS_AT
);
             
             if ( namingContexts == null )
@@ -549,7 +549,7 @@
         
         synchronized ( partitionLookupTree )
         {
-            LdapDN partitionSuffix = partition.getSuffixDn();
+            LdapDN partitionSuffix = partition.getNormSuffixDn();
             
             if ( partitionSuffix == null )
             {
@@ -557,7 +557,7 @@
             }
             
             partitions.put( partitionSuffix.toString(), partition );
-            partitionLookupTree.add( partition.getSuffixDn(), partition );
+            partitionLookupTree.add( partition.getNormSuffixDn(), partition );
 
             EntryAttribute namingContexts = rootDSE.get( SchemaConstants.NAMING_CONTEXTS_AT
);
 
@@ -664,7 +664,7 @@
     }
 
 
-    public LdapDN getSuffixDn()
+    public LdapDN getNormSuffixDn()
     {
         return LdapDN.EMPTY_LDAPDN;
     }
@@ -681,7 +681,7 @@
     public LdapDN getSuffix ( GetSuffixOperationContext getSuffixContext ) throws Exception
     {
         Partition backend = getPartition( getSuffixContext.getDn() );
-        return backend.getSuffixDn();
+        return backend.getNormSuffixDn();
     }
 
 
@@ -718,10 +718,10 @@
         
         if ( namingContexts != null )
         {
-            namingContexts.remove( partition.getSuffixDn().getUpName() );
+            namingContexts.remove( partition.getNormSuffixDn().getUpName() );
         }
         
-        partitions.remove( partition.getSuffixDn().toString() );
+        partitions.remove( partition.getNormSuffixDn().toString() );
     }
 
 

Modified: directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?rev=763508&r1=763507&r2=763508&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
Thu Apr  9 04:05:13 2009
@@ -238,7 +238,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -284,7 +284,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -330,7 +330,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -376,7 +376,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -422,7 +422,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -518,7 +518,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             if ( !cursor.next() )
@@ -640,7 +640,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )
@@ -693,7 +693,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )
@@ -722,7 +722,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.getSuffixDn(),
+        return partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
             AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
     }
 
@@ -770,7 +770,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )
@@ -819,7 +819,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )
@@ -862,7 +862,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
 
             while ( cursor.next() )
@@ -942,7 +942,7 @@
 
         try
         {
-            cursor = partition.search( new SearchOperationContext( null, partition.getSuffixDn(),
+            cursor = partition.search( new SearchOperationContext( null, partition.getNormSuffixDn(),
                 AliasDerefMode.DEREF_ALWAYS, filter, searchControls ) );
             
             while ( cursor.next() )

Modified: directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java?rev=763508&r1=763507&r2=763508&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java
(original)
+++ directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java
Thu Apr  9 04:05:13 2009
@@ -403,7 +403,7 @@
     }
 
 
-    public final LdapDN getSuffixDn() throws Exception
+    public final LdapDN getNormSuffixDn() throws Exception
     {
         return store.getNormSuffixDn();
     }

Modified: directory/apacheds/branches/ldif-partition/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/ui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/ui/PartitionFrame.java?rev=763508&r1=763507&r2=763508&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/ui/PartitionFrame.java
(original)
+++ directory/apacheds/branches/ldif-partition/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/ui/PartitionFrame.java
Thu Apr  9 04:05:13 2009
@@ -168,7 +168,7 @@
         content.add( mainPnl, java.awt.BorderLayout.NORTH );
         getContentPane().add( content, BorderLayout.CENTER );
         // set title
-        setTitle( "Partition: " + this.partition.getSuffixDn().toString() );
+        setTitle( "Partition: " + this.partition.getNormSuffixDn().toString() );
         // add status bar
         getContentPane().add( statusBar, BorderLayout.SOUTH );
         // add menu bar
@@ -376,7 +376,7 @@
         try
         {
             TreePath path = tree.getSelectionModel().getSelectionPath();
-            String parentDn = partition.getSuffixDn().toString();
+            String parentDn = partition.getNormSuffixDn().toString();
 
             if ( null != path )
             {
@@ -421,7 +421,7 @@
 
         if ( null == path )
         {
-            return partition.getSuffixDn().toString();
+            return partition.getNormSuffixDn().toString();
         }
 
         Object last = path.getLastPathComponent();
@@ -440,7 +440,7 @@
         }
         else
         {
-            base = partition.getSuffixDn().toString();
+            base = partition.getNormSuffixDn().toString();
         }
 
         return base;
@@ -572,7 +572,7 @@
         }
         else
         {
-            dialog.setBase( partition.getSuffixDn().toString() );
+            dialog.setBase( partition.getNormSuffixDn().toString() );
         }
 
         dialog.addActionListener( new ActionListener()
@@ -886,8 +886,8 @@
         // boolean doFiltered = false;
         nodes = new HashMap<Long, EntryNode>();
 
-        ServerEntry suffix = partition.lookup( partition.getEntryId( partition.getSuffixDn().toNormName()
) );
-        Long id = partition.getEntryId( partition.getSuffixDn().toString() );
+        ServerEntry suffix = partition.lookup( partition.getEntryId( partition.getNormSuffixDn().toNormName()
) );
+        Long id = partition.getEntryId( partition.getNormSuffixDn().toString() );
         root = new EntryNode( id, null, partition, suffix, nodes );
 
         /*



Mime
View raw message