You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/06/20 18:16:14 UTC

svn commit: r191503 - in /directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition: DefaultContextPartitionNexus.java Oid.java store/impl/btree/BTreeContextPartition.java

Author: trustin
Date: Mon Jun 20 09:16:13 2005
New Revision: 191503

URL: http://svn.apache.org/viewcvs?rev=191503&view=rev
Log:
Extracted private OID constants to new class 'Oid'.

Added:
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/Oid.java   (with props)
Modified:
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java?rev=191503&r1=191502&r2=191503&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java Mon Jun 20 09:16:13 2005
@@ -187,13 +187,13 @@
         
         // Add indexed attributes for system partition
         Set indexedSystemAttrs = new HashSet();
-        indexedSystemAttrs.add( SystemPartition.ALIAS_OID );
-        indexedSystemAttrs.add( SystemPartition.EXISTANCE_OID );
-        indexedSystemAttrs.add( SystemPartition.HIERARCHY_OID );
-        indexedSystemAttrs.add( SystemPartition.NDN_OID );
-        indexedSystemAttrs.add( SystemPartition.ONEALIAS_OID );
-        indexedSystemAttrs.add( SystemPartition.SUBALIAS_OID );
-        indexedSystemAttrs.add( SystemPartition.UPDN_OID );
+        indexedSystemAttrs.add( Oid.ALIAS );
+        indexedSystemAttrs.add( Oid.EXISTANCE );
+        indexedSystemAttrs.add( Oid.HIERARCHY );
+        indexedSystemAttrs.add( Oid.NDN );
+        indexedSystemAttrs.add( Oid.ONEALIAS );
+        indexedSystemAttrs.add( Oid.SUBALIAS );
+        indexedSystemAttrs.add( Oid.UPDN );
         systemCfg.setIndexedAttributes( indexedSystemAttrs );
         
         // Add context entry for system partition

Added: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/Oid.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/Oid.java?rev=191503&view=auto
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/Oid.java (added)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/Oid.java Mon Jun 20 09:16:13 2005
@@ -0,0 +1,45 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.ldap.server.partition;
+
+/**
+ * Provides constants of private OIDs.
+ *
+ * @author The Apache Directory Project
+ * @version $Rev$, $Date$
+ */
+public class Oid
+{
+    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.1) for _ndn op attrib */
+    public static final String NDN       = "1.2.6.1.4.1.18060.1.1.1.3.1" ;
+    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.2) for _updn op attrib */
+    public static final String UPDN      = "1.2.6.1.4.1.18060.1.1.1.3.2" ;
+    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.3) for _existance op attrib */
+    public static final String EXISTANCE = "1.2.6.1.4.1.18060.1.1.1.3.3" ;
+    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.4) for _hierarchy op attrib */
+    public static final String HIERARCHY = "1.2.6.1.4.1.18060.1.1.1.3.4" ;
+    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.5) for _oneAlias index */
+    public static final String ONEALIAS  = "1.2.6.1.4.1.18060.1.1.1.3.5" ;
+    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.6) for _subAlias index */
+    public static final String SUBALIAS  = "1.2.6.1.4.1.18060.1.1.1.3.6" ;
+    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.7) for _alias index */
+    public static final String ALIAS     = "1.2.6.1.4.1.18060.1.1.1.3.7" ;
+
+    private Oid()
+    {
+    }
+}

Propchange: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/Oid.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.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?rev=191503&r1=191502&r2=191503&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java Mon Jun 20 09:16:13 2005
@@ -39,6 +39,7 @@
 import org.apache.ldap.server.configuration.ContextPartitionConfiguration;
 import org.apache.ldap.server.jndi.ContextFactoryConfiguration;
 import org.apache.ldap.server.partition.ContextPartition;
+import org.apache.ldap.server.partition.Oid;
 import org.apache.ldap.server.partition.store.impl.btree.gui.PartitionViewer;
 import org.apache.ldap.server.schema.AttributeTypeRegistry;
 import org.apache.ldap.server.schema.OidRegistry;
@@ -92,21 +93,6 @@
     ==================================================================== */
 
 
-    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.1) for _ndn op attrib */
-    public static final String NDN_OID       = "1.2.6.1.4.1.18060.1.1.1.3.1" ;
-    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.2) for _updn op attrib */
-    public static final String UPDN_OID      = "1.2.6.1.4.1.18060.1.1.1.3.2" ;
-    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.3) for _existance op attrib */
-    public static final String EXISTANCE_OID = "1.2.6.1.4.1.18060.1.1.1.3.3" ;
-    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.4) for _hierarchy op attrib */
-    public static final String HIERARCHY_OID = "1.2.6.1.4.1.18060.1.1.1.3.4" ;
-    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.5) for _oneAlias index */
-    public static final String ONEALIAS_OID  = "1.2.6.1.4.1.18060.1.1.1.3.5" ;
-    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.6) for _subAlias index */
-    public static final String SUBALIAS_OID  = "1.2.6.1.4.1.18060.1.1.1.3.6" ;
-    /** Private OID (1.2.6.1.4.1.18060.1.1.1.3.7) for _alias index */
-    public static final String ALIAS_OID     = "1.2.6.1.4.1.18060.1.1.1.3.7" ;
-
     /**
      * the search engine used to search the database
      */
@@ -134,13 +120,13 @@
         this.searchEngine = new DefaultSearchEngine( this, evaluator, enumerator );
 
         HashSet sysOidSet = new HashSet();
-        sysOidSet.add( EXISTANCE_OID );
-        sysOidSet.add( HIERARCHY_OID );
-        sysOidSet.add( UPDN_OID );
-        sysOidSet.add( NDN_OID );
-        sysOidSet.add( ONEALIAS_OID );
-        sysOidSet.add( SUBALIAS_OID );
-        sysOidSet.add( ALIAS_OID );
+        sysOidSet.add( Oid.EXISTANCE );
+        sysOidSet.add( Oid.HIERARCHY );
+        sysOidSet.add( Oid.UPDN );
+        sysOidSet.add( Oid.NDN );
+        sysOidSet.add( Oid.ONEALIAS );
+        sysOidSet.add( Oid.SUBALIAS );
+        sysOidSet.add( Oid.ALIAS );
 
         Iterator i = cfg.getIndexedAttributes().iterator();
         while( i.hasNext() )
@@ -152,31 +138,31 @@
             // check if attribute is a system attribute
             if ( sysOidSet.contains( oid ) )
             {
-                if ( oid.equals( EXISTANCE_OID ) )
+                if ( oid.equals( Oid.EXISTANCE ) )
                 {
                     setExistanceIndexOn( type );
                 }
-                else if ( oid.equals( HIERARCHY_OID ) )
+                else if ( oid.equals( Oid.HIERARCHY ) )
                 {
                     setHierarchyIndexOn( type );
                 }
-                else if ( oid.equals( UPDN_OID ) )
+                else if ( oid.equals( Oid.UPDN ) )
                 {
                     setUpdnIndexOn( type );
                 }
-                else if ( oid.equals( NDN_OID ) )
+                else if ( oid.equals( Oid.NDN ) )
                 {
                     setNdnIndexOn( type );
                 }
-                else if ( oid.equals( ONEALIAS_OID ) )
+                else if ( oid.equals( Oid.ONEALIAS ) )
                 {
                     setOneAliasIndexOn( type );
                 }
-                else if ( oid.equals( SUBALIAS_OID ) )
+                else if ( oid.equals( Oid.SUBALIAS ) )
                 {
                     setSubAliasIndexOn( type );
                 }
-                else if ( oid.equals( ALIAS_OID ) )
+                else if ( oid.equals( Oid.ALIAS ) )
                 {
                     setAliasIndexOn( type );
                 }