directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r191466 - in /directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server: jndi/ partition/ partition/store/impl/btree/ partition/store/impl/btree/jdbm/
Date Mon, 20 Jun 2005 13:47:15 GMT
Author: trustin
Date: Mon Jun 20 06:47:14 2005
New Revision: 191466

URL: http://svn.apache.org/viewcvs?rev=191466&view=rev
Log:
Renamed AbstractContextPartition to BTreeContextPartition.
Moved constants defined in PartitionStore to ContextPartition.

Added:
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java
      - copied, changed from r191465, directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/AbstractContextPartition.java
Removed:
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/AbstractContextPartition.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/AbstractContextPartition.java
Modified:
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ApplicationPartition.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartition.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/PartitionStore.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmPartitionStore.java

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java?rev=191466&r1=191465&r2=191466&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java
(original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java
Mon Jun 20 06:47:14 2005
@@ -26,7 +26,7 @@
 import org.apache.ldap.common.schema.AttributeType;
 import org.apache.ldap.common.util.DateUtils;
 import org.apache.ldap.common.util.NamespaceTools;
-import org.apache.ldap.server.partition.AbstractContextPartition;
+import org.apache.ldap.server.partition.store.impl.btree.BTreeContextPartition;
 import org.apache.ldap.server.partition.store.impl.btree.PartitionStore;
 import org.apache.ldap.server.partition.store.impl.btree.SearchEngine;
 
@@ -39,7 +39,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public final class SystemPartition extends AbstractContextPartition
+public final class SystemPartition extends BTreeContextPartition
 {
     /** the default user principal or DN */
     public final static String ADMIN_PRINCIPAL = "uid=admin,ou=system";

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ApplicationPartition.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ApplicationPartition.java?rev=191466&r1=191465&r2=191466&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ApplicationPartition.java
(original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ApplicationPartition.java
Mon Jun 20 06:47:14 2005
@@ -21,6 +21,7 @@
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.AttributeType;
+import org.apache.ldap.server.partition.store.impl.btree.BTreeContextPartition;
 import org.apache.ldap.server.partition.store.impl.btree.PartitionStore;
 import org.apache.ldap.server.partition.store.impl.btree.SearchEngine;
 
@@ -31,7 +32,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ApplicationPartition extends AbstractContextPartition
+public class ApplicationPartition extends BTreeContextPartition
 {
     /**
      * user provided suffix distinguished name for this backend set during

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartition.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartition.java?rev=191466&r1=191465&r2=191466&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartition.java
(original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartition.java
Mon Jun 20 06:47:14 2005
@@ -39,6 +39,15 @@
  */
 public interface ContextPartition
 {
+    /** The objectClass name for aliases: 'alias' */
+    String ALIAS_OBJECT = "alias";
+
+    /** 
+     * The aliased Dn attribute name: aliasedObjectName for LDAP and
+     * aliasedEntryName or X.500.
+     */ 
+    String ALIAS_ATTRIBUTE = "aliasedObjectName";
+
     /**
      * Initializes this partition.
      */

Copied: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java
(from r191465, directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/AbstractContextPartition.java)
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java?p2=directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java&p1=directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/AbstractContextPartition.java&r1=191465&r2=191466&rev=191466&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/AbstractContextPartition.java
(original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java
Mon Jun 20 06:47:14 2005
@@ -47,7 +47,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public abstract class AbstractContextPartition implements ContextPartition
+public abstract class BTreeContextPartition implements ContextPartition
 {
     /** ===================================================================
 
@@ -111,7 +111,7 @@
     /**
      * the search engine used to search the database
      */
-    private SearchEngine engine = null;
+    private SearchEngine searchEngine = null;
 
 
     // ------------------------------------------------------------------------
@@ -125,12 +125,12 @@
      * @param db the dedicated database for this backing store
      * @param searchEngine the search engine for this backing store
      */
-    public AbstractContextPartition( PartitionStore db, SearchEngine searchEngine,
+    protected BTreeContextPartition( PartitionStore db, SearchEngine searchEngine,
                                      AttributeType[] indexAttributes )
         throws NamingException
     {
         this.db = db;
-        this.engine = searchEngine;
+        this.searchEngine = searchEngine;
 
         HashSet sysOidSet = new HashSet();
         sysOidSet.add( EXISTANCE_OID );
@@ -212,9 +212,9 @@
      *
      * @return the search engine
      */
-    public SearchEngine getEngine()
+    public SearchEngine getSearchEngine()
     {
-        return engine;
+        return searchEngine;
     }
 
 
@@ -280,7 +280,7 @@
         String [] attrIds = searchCtls.getReturningAttributes();
         NamingEnumeration underlying = null;
         
-        underlying = engine.search( base, env, filter, searchCtls );
+        underlying = searchEngine.search( base, env, filter, searchCtls );
         
         return new SearchResultEnumeration( attrIds, underlying, db );
     }
@@ -361,7 +361,7 @@
 
     public void inspect() throws Exception
     {
-        PartitionViewer viewer = new PartitionViewer( db, engine );
+        PartitionViewer viewer = new PartitionViewer( db, searchEngine );
         viewer.execute();
     }
 }

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/PartitionStore.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/PartitionStore.java?rev=191466&r1=191465&r2=191466&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/PartitionStore.java
(original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/PartitionStore.java
Mon Jun 20 06:47:14 2005
@@ -37,17 +37,6 @@
  */
 public interface PartitionStore
 {
-    // @todo do these alias constants need to go elsewhere?
-    /** The objectClass name for aliases: 'alias' */
-    String ALIAS_OBJECT = "alias";
-
-    /** 
-     * The aliased Dn attribute name: aliasedObjectName for LDAP and
-     * aliasedEntryName or X.500.
-     */ 
-    String ALIAS_ATTRIBUTE = "aliasedObjectName";
-
-
     // ------------------------------------------------------------------------
     // Open / Close / Sync 
     // ------------------------------------------------------------------------

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmPartitionStore.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmPartitionStore.java?rev=191466&r1=191465&r2=191466&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmPartitionStore.java
(original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmPartitionStore.java
Mon Jun 20 06:47:14 2005
@@ -47,6 +47,7 @@
 import org.apache.ldap.common.schema.AttributeType;
 import org.apache.ldap.common.schema.Normalizer;
 import org.apache.ldap.common.util.NamespaceTools;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.partition.store.impl.btree.Index;
 import org.apache.ldap.server.partition.store.impl.btree.IndexAssertion;
 import org.apache.ldap.server.partition.store.impl.btree.IndexAssertionEnumeration;
@@ -891,9 +892,9 @@
         // Start adding the system indices
         // Why bother doing a lookup if this is not an alias.
 
-        if ( entry.get( "objectClass" ).contains( ALIAS_OBJECT ) )
+        if ( entry.get( "objectClass" ).contains( ContextPartition.ALIAS_OBJECT ) )
         {
-            addAliasIndices( id, dn, ( String ) entry.get( ALIAS_ATTRIBUTE ).get() );
+            addAliasIndices( id, dn, ( String ) entry.get( ContextPartition.ALIAS_ATTRIBUTE
).get() );
         }
         
         ndnIdx.add( dn.toString(), id );
@@ -943,7 +944,7 @@
         BigInteger parentId = getParentId( id );
         NamingEnumeration attrs = entry.getIDs();
         
-        if ( entry.get( "objectClass" ).contains( ALIAS_OBJECT ) )
+        if ( entry.get( "objectClass" ).contains( ContextPartition.ALIAS_OBJECT ) )
         {
             dropAliasIndices( id );
         }
@@ -1123,7 +1124,7 @@
         
         entry.put( mods );
 
-        if ( mods.getID().equals( ALIAS_ATTRIBUTE ) )
+        if ( mods.getID().equals( ContextPartition.ALIAS_ATTRIBUTE ) )
         {
             String ndnStr = ( String ) ndnIdx.reverseLookup( id );
             addAliasIndices( id, new LdapName( ndnStr ), 
@@ -1185,7 +1186,7 @@
         }
 
         // Aliases->single valued comp/partial attr removal is not relevant here
-        if ( mods.getID().equals( ALIAS_ATTRIBUTE ) )
+        if ( mods.getID().equals( ContextPartition.ALIAS_ATTRIBUTE ) )
         {
             dropAliasIndices( id );
         }
@@ -1225,7 +1226,7 @@
             }
         }
 
-        if ( mods.getID().equals( ALIAS_ATTRIBUTE ) )
+        if ( mods.getID().equals( ContextPartition.ALIAS_ATTRIBUTE ) )
         {
             dropAliasIndices( id );
         }
@@ -1233,7 +1234,7 @@
         // Automatically replaces old attributes with new modified ones
         entry.put( mods );
         
-        if ( mods.getID().equals( ALIAS_ATTRIBUTE ) )
+        if ( mods.getID().equals( ContextPartition.ALIAS_ATTRIBUTE ) )
         {
             String ndnStr = ( String ) ndnIdx.reverseLookup( id );
             addAliasIndices( id, new LdapName( ndnStr ), 



Mime
View raw message