directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r729184 - in /directory/apacheds/trunk: core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ jdbm-store/src/main/java/org/apache/directory/s...
Date Wed, 24 Dec 2008 00:50:29 GMT
Author: elecharny
Date: Tue Dec 23 16:50:29 2008
New Revision: 729184

URL: http://svn.apache.org/viewvc?rev=729184&view=rev
Log:
o Replaced some constants by the already existing ones to avoid duplication.

Modified:
    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/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=729184&r1=729183&r2=729184&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
Tue Dec 23 16:50:29 2008
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
@@ -65,13 +66,13 @@
     static
     {
         Set<String> set = new HashSet<String>();
-        set.add( Store.ALIAS );
-        set.add( Store.PRESENCE );
-        set.add( Store.ONELEVEL );
-        set.add( Store.NDN );
-        set.add( Store.ONEALIAS );
-        set.add( Store.SUBALIAS );
-        set.add( Store.UPDN );
+        set.add( ApacheSchemaConstants.APACHE_ALIAS_OID );
+        set.add( ApacheSchemaConstants.APACHE_EXISTANCE_OID );
+        set.add( ApacheSchemaConstants.APACHE_HIERARCHY_OID );
+        set.add( ApacheSchemaConstants.APACHE_N_DN_OID );
+        set.add( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID );
+        set.add( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID );
+        set.add( ApacheSchemaConstants.APACHE_UP_DN_OID );
         SYS_INDEX_OIDS = Collections.unmodifiableSet( set );
     }
 
@@ -165,6 +166,7 @@
      * Registry changes require swapping out the search engine used by a partition 
      * since the registries are used by elements in the search engine.
      * 
+     * @org.apache.xbean.Property hidden="true"
      * @param registries the schema entity registries
      * @throws Exception 
      */
@@ -391,6 +393,7 @@
      * Sets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would
      * be the aliasedObjectName and for X.500 would be aliasedEntryName.
      * 
+     * @org.apache.xbean.Property hidden="true"
      * @param index the index on the ALIAS_ATTRIBUTE
      * @throws Exception if there is a problem setting up the index
      */
@@ -400,6 +403,7 @@
     /**
      * Sets the attribute existance Index.
      *
+     * @org.apache.xbean.Property hidden="true"
      * @param index the attribute existance Index
      * @throws Exception if there is a problem setting up the index
      */
@@ -409,6 +413,7 @@
     /**
      * Sets the one level Index.
      *
+     * @org.apache.xbean.Property hidden="true"
      * @param index the one level Index
      * @throws Exception if there is a problem setting up the index
      */
@@ -419,6 +424,7 @@
     /**
      * Sets the user provided distinguished name Index.
      *
+     * @org.apache.xbean.Property hidden="true"
      * @param index the updn Index
      * @throws Exception if there is a problem setting up the index
      */
@@ -428,6 +434,7 @@
     /**
      * Sets the normalized distinguished name Index.
      *
+     * @org.apache.xbean.Property hidden="true"
      * @param index the ndn Index
      * @throws Exception if there is a problem setting up the index
      */
@@ -439,6 +446,7 @@
      * children one level below them; this system index is used to dereference
      * aliases on one/single level scoped searches.
      * 
+     * @org.apache.xbean.Property hidden="true"
      * @param index a one level alias index
      * @throws Exception if there is a problem setting up the index
      */
@@ -450,6 +458,7 @@
      * alias descendents; this system index is used to dereference aliases on 
      * subtree scoped searches.
      * 
+     * @org.apache.xbean.Property hidden="true"
      * @param index a subtree alias index
      * @throws Exception if there is a problem setting up the index
      */

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=729184&r1=729183&r2=729184&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
Tue Dec 23 16:50:29 2008
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core.partition.impl.btree.jdbm;
 
 
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
@@ -207,31 +208,31 @@
             
             if ( SYS_INDEX_OIDS.contains( registries.getOidRegistry().getOid( index.getAttributeId()
) ) )
             {
-                if ( oid.equals( Store.ALIAS ) )
+                if ( oid.equals( ApacheSchemaConstants.APACHE_ALIAS_OID ) )
                 {
                     store.setAliasIndex( ( Index<String,ServerEntry> ) index );
                 }
-                else if ( oid.equals( Store.PRESENCE ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_EXISTANCE_OID ) )
                 {
                     store.setPresenceIndex( ( Index<String,ServerEntry> ) index );
                 }
-                else if ( oid.equals( Store.ONELEVEL ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_HIERARCHY_OID ) )
                 {
                     store.setOneLevelIndex( ( Index<Long,ServerEntry> ) index );
                 }
-                else if ( oid.equals( Store.NDN ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_N_DN_OID ) )
                 {
                     store.setNdnIndex( ( Index<String,ServerEntry> ) index );
                 }
-                else if ( oid.equals( Store.ONEALIAS ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID ) )
                 {
                     store.setOneAliasIndex( ( Index<Long,ServerEntry> ) index );
                 }
-                else if ( oid.equals( Store.SUBALIAS ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID ) )
                 {
                     store.setSubAliasIndex( ( Index<Long,ServerEntry> ) index );
                 }
-                else if ( oid.equals( Store.UPDN ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_UP_DN_OID ) )
                 {
                     store.setUpdnIndex( ( Index<String,ServerEntry> ) index );
                 }

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=729184&r1=729183&r2=729184&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
Tue Dec 23 16:50:29 2008
@@ -36,6 +36,7 @@
 import jdbm.recman.BaseRecordManager;
 import jdbm.recman.CacheRecordManager;
 
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerAttribute;
@@ -298,57 +299,57 @@
         if ( ndnIdx == null )
         {
             ndnIdx = new JdbmIndex<String,E>();
-            ndnIdx.setAttributeId( NDN );
-            systemIndices.put( NDN, ndnIdx );
-            ndnIdx.init( attributeTypeRegistry.lookup( NDN ), workingDirectory );
+            ndnIdx.setAttributeId( ApacheSchemaConstants.APACHE_N_DN_OID );
+            systemIndices.put( ApacheSchemaConstants.APACHE_N_DN_OID, ndnIdx );
+            ndnIdx.init( attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_N_DN_OID
), workingDirectory );
         }
 
         if ( updnIdx == null )
         {
             updnIdx = new JdbmIndex<String,E>();
-            updnIdx.setAttributeId( UPDN );
-            systemIndices.put( UPDN, updnIdx );
-            updnIdx.init( attributeTypeRegistry.lookup( UPDN ), workingDirectory );
+            updnIdx.setAttributeId( ApacheSchemaConstants.APACHE_UP_DN_OID );
+            systemIndices.put( ApacheSchemaConstants.APACHE_UP_DN_OID, updnIdx );
+            updnIdx.init( attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_UP_DN_OID
), workingDirectory );
         }
 
         if ( existenceIdx == null )
         {
             existenceIdx = new JdbmIndex<String,E>();
-            existenceIdx.setAttributeId( PRESENCE );
-            systemIndices.put( PRESENCE, existenceIdx );
-            existenceIdx.init( attributeTypeRegistry.lookup( PRESENCE ), workingDirectory
);
+            existenceIdx.setAttributeId( ApacheSchemaConstants.APACHE_EXISTANCE_OID );
+            systemIndices.put( ApacheSchemaConstants.APACHE_EXISTANCE_OID, existenceIdx );
+            existenceIdx.init( attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_EXISTANCE_OID
), workingDirectory );
         }
 
         if ( oneLevelIdx == null )
         {
             oneLevelIdx = new JdbmIndex<Long,E>();
-            oneLevelIdx.setAttributeId( ONELEVEL );
-            systemIndices.put( ONELEVEL, oneLevelIdx );
-            oneLevelIdx.init( attributeTypeRegistry.lookup( ONELEVEL ), workingDirectory
);
+            oneLevelIdx.setAttributeId( ApacheSchemaConstants.APACHE_HIERARCHY_OID );
+            systemIndices.put( ApacheSchemaConstants.APACHE_HIERARCHY_OID, oneLevelIdx );
+            oneLevelIdx.init( attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_HIERARCHY_OID
), workingDirectory );
         }
 
         if ( oneAliasIdx == null )
         {
             oneAliasIdx = new JdbmIndex<Long,E>();
-            oneAliasIdx.setAttributeId( ONEALIAS );
-            systemIndices.put( ONEALIAS, oneAliasIdx );
-            oneAliasIdx.init( attributeTypeRegistry.lookup( ONEALIAS ), workingDirectory
);
+            oneAliasIdx.setAttributeId( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID );
+            systemIndices.put( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID, oneAliasIdx );
+            oneAliasIdx.init( attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID
), workingDirectory );
         }
 
         if ( subAliasIdx == null )
         {
             subAliasIdx = new JdbmIndex<Long,E>();
-            subAliasIdx.setAttributeId( SUBALIAS );
-            systemIndices.put( SUBALIAS, subAliasIdx );
-            subAliasIdx.init( attributeTypeRegistry.lookup( SUBALIAS ), workingDirectory
);
+            subAliasIdx.setAttributeId( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID );
+            systemIndices.put( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID, subAliasIdx );
+            subAliasIdx.init( attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID
), workingDirectory );
         }
 
         if ( aliasIdx == null )
         {
             aliasIdx = new JdbmIndex<String,E>();
-            aliasIdx.setAttributeId( ALIAS );
-            systemIndices.put( ALIAS, aliasIdx );
-            aliasIdx.init( attributeTypeRegistry.lookup( ALIAS ), workingDirectory );
+            aliasIdx.setAttributeId( ApacheSchemaConstants.APACHE_ALIAS_OID );
+            systemIndices.put( ApacheSchemaConstants.APACHE_ALIAS_OID, aliasIdx );
+            aliasIdx.init( attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_ALIAS_OID
), workingDirectory );
         }
         
         if ( subLevelIdx == null )

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=729184&r1=729183&r2=729184&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
Tue Dec 23 16:50:29 2008
@@ -42,23 +42,9 @@
  */
 public interface Store<E>
 {
-    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.1) for apacheNdn op attrib */
-    String NDN = "1.3.6.1.4.1.18060.0.4.1.2.1";
-    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.2) for apacheUpdn op attrib */
-    String UPDN = "1.3.6.1.4.1.18060.0.4.1.2.2";
-    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.5) for apacheOneAlias index */
-    String ONEALIAS = "1.3.6.1.4.1.18060.0.4.1.2.5";
-    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.6) for apacheSubAlias index */
-    String SUBALIAS = "1.3.6.1.4.1.18060.0.4.1.2.6";
-    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.7) for apacheAlias index */
-    String ALIAS = "1.3.6.1.4.1.18060.0.4.1.2.7";
     /** 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";
-    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.3) for apachePresence op attrib */
-    String PRESENCE = "1.3.6.1.4.1.18060.0.4.1.2.3";
-    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.4) for apacheOneLevel op attrib */
-    String ONELEVEL = "1.3.6.1.4.1.18060.0.4.1.2.4";
-
+    
     /*
      * W H Y   H A V E   A   S T O R E   I N T E R F A C E  ?
      * ------------------------------------------------------



Mime
View raw message