You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2009/05/15 01:23:52 UTC

svn commit: r774959 - in /directory/apacheds/trunk: core-constants/src/main/java/org/apache/directory/server/constants/ core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ core/src/main/java/org/apache/directory/server/core/partit...

Author: elecharny
Date: Thu May 14 23:23:52 2009
New Revision: 774959

URL: http://svn.apache.org/viewvc?rev=774959&view=rev
Log:
Moved some constant (SUBLEVEL) into the ApacheSchemaConstant class. Modify the code accordingly.

Modified:
    directory/apacheds/trunk/core-constants/src/main/java/org/apache/directory/server/constants/ApacheSchemaConstants.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java

Modified: directory/apacheds/trunk/core-constants/src/main/java/org/apache/directory/server/constants/ApacheSchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-constants/src/main/java/org/apache/directory/server/constants/ApacheSchemaConstants.java?rev=774959&r1=774958&r2=774959&view=diff
==============================================================================
--- directory/apacheds/trunk/core-constants/src/main/java/org/apache/directory/server/constants/ApacheSchemaConstants.java (original)
+++ directory/apacheds/trunk/core-constants/src/main/java/org/apache/directory/server/constants/ApacheSchemaConstants.java Thu May 14 23:23:52 2009
@@ -154,4 +154,8 @@
     // SubschemaSubentryName
     String SUBSCHEMA_SUBENTRY_NAME_AT               = "subschemaSubentryName";
     String SUBSCHEMA_SUBENTRY_NAME_AT_OID           = "1.3.6.1.4.1.18060.0.4.1.2.37";
+    
+    // apacheSubLevel
+    String APACHE_SUB_LEVEL_AT                      = "apacheSubLevel";
+    String APACHE_SUB_LEVEL_AT_OID                  = "1.3.6.1.4.1.18060.0.4.1.2.43";
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=774959&r1=774958&r2=774959&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Thu May 14 23:23:52 2009
@@ -41,6 +41,7 @@
 import org.apache.directory.server.xdbm.*;
 import org.apache.directory.server.xdbm.search.Optimizer;
 import org.apache.directory.server.xdbm.search.SearchEngine;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapContextNotEmptyException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -73,6 +74,9 @@
         set.add( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID );
         set.add( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID );
         set.add( ApacheSchemaConstants.APACHE_UP_DN_OID );
+        //set.add( ApacheSchemaConstants.ENTRY_CSN_OID );
+        //set.add( ApacheSchemaConstants.ENTRY_UUID_OID );
+        //set.add( SchemaConstants.OBJECT_CLASS_AT_OID );
         SYS_INDEX_OIDS = Collections.unmodifiableSet( set );
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=774959&r1=774958&r2=774959&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Thu May 14 23:23:52 2009
@@ -42,6 +42,7 @@
 import org.apache.directory.server.xdbm.search.impl.EvaluatorBuilder;
 import org.apache.directory.server.xdbm.search.impl.NoOpOptimizer;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationNotSupportedException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -205,7 +206,7 @@
 
             String oid = registries.getOidRegistry().getOid( index.getAttributeId() );
             
-            if ( SYS_INDEX_OIDS.contains( registries.getOidRegistry().getOid( index.getAttributeId() ) ) )
+            if ( SYS_INDEX_OIDS.contains( oid ) )
             {
                 if ( oid.equals( ApacheSchemaConstants.APACHE_ALIAS_OID ) )
                 {

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=774959&r1=774958&r2=774959&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Thu May 14 23:23:52 2009
@@ -74,17 +74,22 @@
 {
     /** static logger */
     private static final Logger LOG = LoggerFactory.getLogger( JdbmStore.class );
+    
     /** The default cache size is set to 10 000 objects */
     static final int DEFAULT_CACHE_SIZE = 10000;
 
     /** the JDBM record manager used by this database */
     private RecordManager recMan;
+    
     /** the normalized suffix DN of this backend database */
     private LdapDN normSuffix;
+    
     /** the user provided suffix DN of this backend database */
     private LdapDN upSuffix;
+    
     /** the working directory to use for files */
     private File workingDirectory;
+    
     /** the master table storing entries by primary key */
     private JdbmMasterTable<ServerEntry> master;
     
@@ -96,24 +101,31 @@
     
     /** true if initialized */
     private boolean initialized;
+    
     /** true if we sync disks on every write operation */
     private boolean isSyncOnWrite = true;
 
     /** the normalized distinguished name index */
     private JdbmIndex<String,E> ndnIdx;
+    
     /** the user provided distinguished name index */
     private JdbmIndex<String,E> updnIdx;
+    
     /** the attribute existence index */
     private JdbmIndex<String,E> existenceIdx;
+    
     /** a system index on aliasedObjectName attribute */
     private JdbmIndex<String,E> aliasIdx;
 
     /** a system index on the entries of descendants of root DN*/
     private JdbmIndex<Long,E> subLevelIdx;
+    
     /** the parent child relationship index */
     private JdbmIndex<Long,E> oneLevelIdx;
+    
     /** the one level scope alias index */
     private JdbmIndex<Long,E> oneAliasIdx;
+    
     /** the subtree scope alias index */
     private JdbmIndex<Long,E> subAliasIdx;
     
@@ -356,9 +368,9 @@
         if ( subLevelIdx == null )
         {
             subLevelIdx = new JdbmIndex<Long, E>();
-            subLevelIdx.setAttributeId( SUBLEVEL );
-            systemIndices.put( SUBLEVEL, subLevelIdx );
-            subLevelIdx.init( attributeTypeRegistry.lookup( SUBLEVEL ), workingDirectory );
+            subLevelIdx.setAttributeId( ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID );
+            systemIndices.put( ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID, subLevelIdx );
+            subLevelIdx.init( attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID ), workingDirectory );
         }
     }
 

Modified: directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java?rev=774959&r1=774958&r2=774959&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java (original)
+++ directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java Thu May 14 23:23:52 2009
@@ -42,9 +42,6 @@
  */
 public interface Store<E>
 {
-    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.43) for apacheSubLevel index*/
-    String SUBLEVEL = "1.3.6.1.4.1.18060.0.4.1.2.43";
-    
     /*
      * W H Y   H A V E   A   S T O R E   I N T E R F A C E  ?
      * ------------------------------------------------------