directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r781677 - in /directory: apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/ apacheds/trunk/core/src/main/j...
Date Thu, 04 Jun 2009 08:16:04 GMT
Author: elecharny
Date: Thu Jun  4 08:16:03 2009
New Revision: 781677

URL: http://svn.apache.org/viewvc?rev=781677&view=rev
Log:
o Fixed the CsnFactory
o Switched to MINA 2.0.0-M6
o Started to use constants instead of strings for the Syntax and MatchingRules
o Added some missing MatchingRules

Modified:
    directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheComparatorProducer.java
    directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheMatchingRuleProducer.java
    directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheNormalizerProducer.java
    directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemComparatorProducer.java
    directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemMatchingRuleProducer.java
    directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemNormalizerProducer.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
    directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
    directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype
    directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/csn/CsnFactory.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/csn/CsnFactoryTest.java

Modified: directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java (original)
+++ directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java Thu Jun  4 08:16:03 2009
@@ -176,8 +176,8 @@
      */
     private Map<String, Schema> schemas = new HashMap<String, Schema>();
 
-    /** CSN factory instance */
-    private static final CsnFactory CSN_FACTORY = new CsnFactory();
+    /** CSN factory instance. For schema elements, the replicaId is 0 */
+    private static final CsnFactory CSN_FACTORY = new CsnFactory( 0 );
 
     /**
      * Loads a bunch of bootstrap classes into memory then adds them to a new
@@ -944,7 +944,7 @@
      */
     private void injectEntryInStore( Store<ServerEntry> store, ServerEntry entry ) throws Exception
     {
-        entry.add( ApacheSchemaConstants.ENTRY_CSN_AT, CSN_FACTORY.newInstance( 1 ).toString() );
+        entry.add( ApacheSchemaConstants.ENTRY_CSN_AT, CSN_FACTORY.newInstance().toString() );
         entry.add( ApacheSchemaConstants.ENTRY_UUID_AT, SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
 
         store.add( entry );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java Thu Jun  4 08:16:03 2009
@@ -70,7 +70,7 @@
         ctxEntry.put( "objectClass", "top" );
         ctxEntry.get( "objectClass" ).add( "organizationalUnit" );
         ctxEntry.put( "ou", "removable" );
-        ctxEntry.put( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        ctxEntry.put( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         ctxEntry.put( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         partition.add( new AddOperationContext( service.getAdminSession(), ctxEntry ) );
         

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Thu Jun  4 08:16:03 2009
@@ -250,7 +250,7 @@
         
         SerializableComparator.setRegistry( registries.getComparatorRegistry() );
         
-        csnFactory = new CsnFactory();
+        csnFactory = new CsnFactory( replicaId );
     }
 
 
@@ -1728,7 +1728,7 @@
      */
     public Csn getCSN()
     {
-        return csnFactory.newInstance( replicaId );
+        return csnFactory.newInstance();
     }
 
 

Modified: directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java Thu Jun  4 08:16:03 2009
@@ -362,7 +362,7 @@
         entry.add( "ou", "Apache" );
         entry.add( "commonName",  "Jack Daniels");
         entry.add( "aliasedObjectName", "cn=Jack Daniels,ou=Engineering,o=Good Times Co." );
-        entry.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         entry.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         store.add( entry );
         
@@ -410,7 +410,7 @@
       entry.add( "objectClass", "top", "person", "organizationalPerson" );
       entry.add( "ou", "Sales" );
       entry.add( "cn",  "Martin King");
-      entry.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+      entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
       entry.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
       store.add( entry );
       
@@ -434,7 +434,7 @@
       entry = new DefaultServerEntry( registries, marketingDn );
       entry.add( "objectClass", "top", "organizationalUnit" );
       entry.add( "ou", "Marketing" );
-      entry.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+      entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
       entry.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
       store.add( entry );
 
@@ -445,7 +445,7 @@
       entry.add( "objectClass", "top", "person", "organizationalPerson" );
       entry.add( "ou", "Marketing" );
       entry.add( "cn",  "Jimmy Wales");
-      entry.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+      entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
       entry.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
       store.add( entry );
       
@@ -728,7 +728,7 @@
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
         entry.add( "cn",  "Private Ryan");
-        entry.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         entry.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
 
         store.add( entry );
@@ -748,7 +748,7 @@
         childEntry.add( "objectClass", "top", "person", "organizationalPerson" );
         childEntry.add( "ou", "Engineering" );
         childEntry.add( "cn",  "Private Ryan");
-        childEntry.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        childEntry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         childEntry.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
 
         store.add( childEntry );
@@ -881,7 +881,7 @@
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "cn", "Tim B");
-        entry.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         entry.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         
         store.add( entry );

Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheComparatorProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheComparatorProducer.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheComparatorProducer.java (original)
+++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheComparatorProducer.java Thu Jun  4 08:16:03 2009
@@ -28,6 +28,7 @@
 
 import org.apache.directory.server.schema.bootstrap.ProducerTypeEnum;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.comparators.CsnComparator;
 import org.apache.directory.shared.ldap.schema.comparators.ComparableComparator;
 import org.apache.directory.shared.ldap.schema.comparators.CsnSidComparator;
@@ -83,14 +84,14 @@
         
         // For CSNMatch
         comparator = new CsnComparator();
-        cb.schemaObjectProduced( this, "1.3.6.1.4.1.4203.666.11.2.2", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.CSN_MATCH_MR_OID, comparator );
         
         // For CSNOrderingMatch
         comparator = new CsnComparator();
-        cb.schemaObjectProduced( this, "1.3.6.1.4.1.4203.666.11.2.3", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.CSN_ORDERING_MATCH_MR_OID, comparator );
         
         // For CSNSIDMatch
         comparator = new CsnSidComparator();
-        cb.schemaObjectProduced( this, "1.3.6.1.4.1.4203.666.11.2.5", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.CSN_SID_MATCH_MR_OID, comparator );
     }
 }

Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheMatchingRuleProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheMatchingRuleProducer.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheMatchingRuleProducer.java (original)
+++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheMatchingRuleProducer.java Thu Jun  4 08:16:03 2009
@@ -24,6 +24,7 @@
 
 import org.apache.directory.server.schema.bootstrap.ProducerTypeEnum;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 
 
 /**
@@ -85,24 +86,24 @@
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
         
         // For CSNMatch 
-        mrule = new BootstrapMatchingRule( "1.3.6.1.4.1.4203.666.11.2.2", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.CSN_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "csnMatch" } );
-        mrule.setSyntaxOid( "1.3.6.1.4.1.4203.666.11.2.1" );
+            { SchemaConstants.CSN_MATCH_MR } );
+        mrule.setSyntaxOid( SchemaConstants.CSN_SYNTAX );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
         // For CSNOrderingMatch 
-        mrule = new BootstrapMatchingRule( "1.3.6.1.4.1.4203.666.11.2.3", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.CSN_ORDERING_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "csnOrderingMatch" } );
-        mrule.setSyntaxOid( "1.3.6.1.4.1.4203.666.11.2.1" );
+            { SchemaConstants.CSN_ORDERING_MATCH_MR } );
+        mrule.setSyntaxOid( SchemaConstants.CSN_SYNTAX );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
         // For CSNSidMatch 
-        mrule = new BootstrapMatchingRule( "1.3.6.1.4.1.4203.666.11.2.5", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.CSN_SID_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "csnSidMatch" } );
-        mrule.setSyntaxOid( "1.3.6.1.4.1.4203.666.11.2.4" );
+            { SchemaConstants.CSN_SID_MATCH_MR } );
+        mrule.setSyntaxOid( SchemaConstants.CSN_SID_SYNTAX );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
     }
 }

Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheNormalizerProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheNormalizerProducer.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheNormalizerProducer.java (original)
+++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheNormalizerProducer.java Thu Jun  4 08:16:03 2009
@@ -24,6 +24,7 @@
 
 import org.apache.directory.server.schema.bootstrap.ProducerTypeEnum;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.NoOpNormalizer;
 
@@ -76,14 +77,14 @@
 
         // For CSNMatch -> 1.3.6.1.4.1.4203.666.11.2.2
         normalizer = new NoOpNormalizer();
-        cb.schemaObjectProduced( this, "1.3.6.1.4.1.4203.666.11.2.2", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.CSN_MATCH_MR_OID, normalizer );
 
         // For CSNOrderingMatch -> 1.3.6.1.4.1.4203.666.11.2.3
         normalizer = new NoOpNormalizer();
-        cb.schemaObjectProduced( this, "1.3.6.1.4.1.4203.666.11.2.3", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.CSN_ORDERING_MATCH_MR_OID, normalizer );
 
         // For CSNSidMatch -> 1.3.6.1.4.1.4203.666.11.2.5
         normalizer = new NoOpNormalizer();
-        cb.schemaObjectProduced( this, "1.3.6.1.4.1.4203.666.11.2.5", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.CSN_SID_MATCH_MR_OID, normalizer );
     }
 }

Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemComparatorProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemComparatorProducer.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemComparatorProducer.java (original)
+++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemComparatorProducer.java Thu Jun  4 08:16:03 2009
@@ -29,6 +29,7 @@
 import org.apache.directory.server.schema.NameAndOptionalUIDNormalizer;
 import org.apache.directory.server.schema.bootstrap.ProducerTypeEnum;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.comparators.ByteArrayComparator;
 import org.apache.directory.shared.ldap.schema.comparators.ComparableComparator;
 import org.apache.directory.shared.ldap.schema.comparators.IntegerOrderingComparator;
@@ -96,49 +97,56 @@
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )
          */
         comparator = new ObjectIdentifierComparator();
-        cb.schemaObjectProduced( this, "2.5.13.0", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.OBJECT_IDENTIFIER_MATCH_MR_OID, comparator );
 
         /*
          ( 2.5.13.1 NAME 'distinguishedNameMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
          */
         comparator = new DnComparator( registries.getAttributeTypeRegistry() );
-        cb.schemaObjectProduced( this, "2.5.13.1", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID, comparator );
 
         /*
          ( 2.5.13.2 NAME 'caseIgnoreMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
          */
         comparator = new DeepTrimToLowerCachingNormalizingComparator();
-        cb.schemaObjectProduced( this, "2.5.13.2", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_IGNORE_MATCH_MR_OID, comparator );
 
         /*
          ( 2.5.13.3 NAME 'caseIgnoreOrderingMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
          */
         comparator = new DeepTrimToLowerCachingNormalizingComparator();
-        cb.schemaObjectProduced( this, "2.5.13.3", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_IGNORE_ORDERING_MATCH_MR_OID, comparator );
 
         /*
          ( 2.5.13.4 NAME 'caseIgnoreSubstringsMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )
          */
         comparator = new DeepTrimToLowerCachingNormalizingComparator();
-        cb.schemaObjectProduced( this, "2.5.13.4", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_IGNORE_SUBSTRING_MATCH_MR_OID, comparator );
 
         /*
          ( 2.5.13.6 NAME 'caseExactOrderingMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
          */
         comparator = new ComparableComparator();
-        cb.schemaObjectProduced( this, "2.5.13.6", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_EXACT_ORDERING_MATCH_MR_OID, comparator );
 
         /*
          ( 2.5.13.8 NAME 'numericStringMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 )
          */
         comparator = new ComparableComparator();
-        cb.schemaObjectProduced( this, "2.5.13.8", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.NUMERIC_STRING_MATCH_MR_OID, comparator );
+
+        /*
+         ( 2.5.13.9 NAME 'numericStringOrderingMatch'
+         SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 )
+         */
+        comparator = new ComparableComparator();
+        cb.schemaObjectProduced( this, SchemaConstants.NUMERIC_STRING_ORDERING_MATCH_MR_OID, comparator );
 
         /*
          ( 2.5.13.10 NAME 'numericStringSubstringsMatch'
@@ -304,10 +312,10 @@
          */
 
         comparator = new DeepTrimCachingNormalizingComparator();
-        cb.schemaObjectProduced( this, "2.5.13.5", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_EXACT_MATCH_MR_OID, comparator );
 
         comparator = new DeepTrimCachingNormalizingComparator();
-        cb.schemaObjectProduced( this, "2.5.13.7", comparator );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_EXACT_SUBSTRING_MATCH_MR_OID, comparator );
 
         comparator = new DeepTrimToLowerCachingNormalizingComparator();
         cb.schemaObjectProduced( this, "2.5.13.12", comparator );

Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemMatchingRuleProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemMatchingRuleProducer.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemMatchingRuleProducer.java (original)
+++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemMatchingRuleProducer.java Thu Jun  4 08:16:03 2009
@@ -24,10 +24,11 @@
 
 import org.apache.directory.server.schema.bootstrap.ProducerTypeEnum;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 
 
 /**
- * A simple maching rule configuration where objects and java code are used
+ * A simple matching rule configuration where objects and java code are used
  * to create matching rules.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -64,33 +65,33 @@
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )
          */
 
-        mrule = new BootstrapMatchingRule( "2.5.13.0", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.OBJECT_IDENTIFIER_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "objectIdentifierMatch" } );
+            { SchemaConstants.OBJECT_IDENTIFIER_MATCH_MR } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.38" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new BootstrapMatchingRule( "2.5.13.1", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "distinguishedNameMatch" } );
+            { SchemaConstants.DISTINGUISHED_NAME_MATCH_MR } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.12" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
         mrule = new BootstrapMatchingRule( "2.5.13.2", registries );
         mrule.setNames( new String[]
-            { "caseIgnoreMatch" } );
+            { SchemaConstants.CASE_IGNORE_MATCH_MR } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.15" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new BootstrapMatchingRule( "2.5.13.3", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.CASE_IGNORE_ORDERING_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "caseIgnoreOrderingMatch" } );
+            { SchemaConstants.CASE_IGNORE_ORDERING_MATCH_MR } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.15" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new BootstrapMatchingRule( "2.5.13.4", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.CASE_IGNORE_SUBSTRING_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "caseIgnoreSubstringsMatch" } );
+            { SchemaConstants.CASE_IGNORE_SUBSTRING_MATCH_MR } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.58" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
@@ -102,9 +103,9 @@
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
          */
 
-        mrule = new BootstrapMatchingRule( "2.5.13.6", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.CASE_EXACT_ORDERING_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "caseExactOrderingMatch" } );
+            { SchemaConstants.CASE_EXACT_ORDERING_MATCH_MR } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.15" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
@@ -130,9 +131,9 @@
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )
          */
 
-        mrule = new BootstrapMatchingRule( "2.5.13.8", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.NUMERIC_STRING_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "numericStringMatch" } );
+            { SchemaConstants.NUMERIC_STRING_MATCH_MR } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.36" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
@@ -162,6 +163,12 @@
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
          */
 
+        mrule = new BootstrapMatchingRule( SchemaConstants.NUMERIC_STRING_ORDERING_MATCH_MR_OID, registries );
+        mrule.setNames( new String[]
+            { SchemaConstants.NUMERIC_STRING_ORDERING_MATCH_MR } );
+        mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.36" );
+        cb.schemaObjectProduced( this, mrule.getOid(), mrule );
+
         mrule = new BootstrapMatchingRule( "2.5.13.15", registries );
         mrule.setNames( new String[]
             { "integerOrderingMatch" } );
@@ -340,15 +347,15 @@
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )
          */
 
-        mrule = new BootstrapMatchingRule( "2.5.13.5", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.CASE_EXACT_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "caseExactMatch" } );
+            { SchemaConstants.CASE_EXACT_MATCH_MR } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.15" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new BootstrapMatchingRule( "2.5.13.7", registries );
+        mrule = new BootstrapMatchingRule( SchemaConstants.CASE_EXACT_SUBSTRING_MATCH_MR_OID, registries );
         mrule.setNames( new String[]
-            { "caseExactSubstringsMatch" } );
+            { SchemaConstants.CASE_EXACT_SUBSTRING_MATCH_MR } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.58" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 

Modified: directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemNormalizerProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemNormalizerProducer.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemNormalizerProducer.java (original)
+++ directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemNormalizerProducer.java Thu Jun  4 08:16:03 2009
@@ -28,6 +28,7 @@
 import org.apache.directory.server.schema.DnNormalizer;
 import org.apache.directory.server.schema.NameAndOptionalUIDNormalizer;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.BooleanNormalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.CachingNormalizer;
@@ -159,7 +160,7 @@
          */
         normalizer = new CachingDnNormalizer();
         ( ( CachingDnNormalizer ) normalizer ).setRegistries( registries );
-        cb.schemaObjectProduced( this, "2.5.13.1", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID, normalizer );
 
         /*
          ( 1.3.6.1.4.1.1466.109.114.2 NAME 'caseIgnoreIA5Match'
@@ -180,42 +181,49 @@
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
          */
         normalizer = new CachingDeepTrimToLowerNormalizer();
-        cb.schemaObjectProduced( this, "2.5.13.2", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_IGNORE_MATCH_MR_OID, normalizer );
 
         /*
          ( 2.5.13.3 NAME 'caseIgnoreOrderingMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
          */
         normalizer = new CachingDeepTrimToLowerNormalizer();
-        cb.schemaObjectProduced( this, "2.5.13.3", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_IGNORE_ORDERING_MATCH_MR_OID, normalizer );
 
         /*
          ( 2.5.13.4 NAME 'caseIgnoreSubstringsMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )
          */
         normalizer = new CachingDeepTrimToLowerNormalizer();
-        cb.schemaObjectProduced( this, "2.5.13.4", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_IGNORE_SUBSTRING_MATCH_MR_OID, normalizer );
 
         /*
          ( 2.5.13.6 NAME 'caseExactOrderingMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
          */
         normalizer = new NoOpNormalizer();
-        cb.schemaObjectProduced( this, "2.5.13.6", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_EXACT_ORDERING_MATCH_MR_OID, normalizer );
 
         /*
          ( 2.5.13.0 NAME 'objectIdentifierMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )
          */
         normalizer = new ObjectIdentifierNormalizer();
-        cb.schemaObjectProduced( this, "2.5.13.0", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.OBJECT_IDENTIFIER_MATCH_MR_OID, normalizer );
 
         /*
          ( 2.5.13.8 NAME 'numericStringMatch'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 )
          */
         normalizer = new NoOpNormalizer();
-        cb.schemaObjectProduced( this, "2.5.13.8", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.NUMERIC_STRING_MATCH_MR_OID, normalizer );
+
+        /*
+         ( 2.5.13.9 NAME 'numericStringOrderingMatch'
+         SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 )
+         */
+        normalizer = new NoOpNormalizer();
+        cb.schemaObjectProduced( this, SchemaConstants.NUMERIC_STRING_ORDERING_MATCH_MR_OID, normalizer );
 
         /*
          ( 2.5.13.10 NAME 'numericStringSubstringsMatch'
@@ -366,10 +374,10 @@
          */
 
         normalizer = new CachingDeepTrimNormalizer();
-        cb.schemaObjectProduced( this, "2.5.13.5", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_EXACT_MATCH_MR_OID, normalizer );
 
         normalizer = new CachingDeepTrimNormalizer();
-        cb.schemaObjectProduced( this, "2.5.13.7", normalizer );
+        cb.schemaObjectProduced( this, SchemaConstants.CASE_EXACT_SUBSTRING_MATCH_MR_OID, normalizer );
 
         normalizer = new CachingDeepTrimToLowerNormalizer();
         cb.schemaObjectProduced( this, "2.5.13.12", normalizer );

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java Thu Jun  4 08:16:03 2009
@@ -591,7 +591,7 @@
         attrs.add( "c-street", "3" );
         attrs.add( "cn", "jane doe" );
         attrs.add( "sn", "doe" );
-        attrs.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        attrs.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         attrs.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         store.add(  attrs );
 

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java Thu Jun  4 08:16:03 2009
@@ -643,7 +643,7 @@
         attrs.add( "c-street", "1" );
         attrs.add( "cn", "jane doe" );
         attrs.add( "sn", "doe" );
-        attrs.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        attrs.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         attrs.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         store.add( attrs );
 

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java Thu Jun  4 08:16:03 2009
@@ -670,7 +670,7 @@
         attrs.add( "objectClass", "alias", "extensibleObject" );
         attrs.add( "cn", "jd" );
         attrs.add( "aliasedObjectName", "cn=Jack Daniels,ou=Engineering,o=Good Times Co." );
-        attrs.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        attrs.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         attrs.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         store.add( attrs );
 
@@ -685,7 +685,7 @@
         attrs.add( "objectClass", "person" );
         attrs.add( "cn", "jdoe" );
         attrs.add( "sn", "doe" );
-        attrs.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        attrs.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         attrs.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         store.add( attrs );
 

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java Thu Jun  4 08:16:03 2009
@@ -638,7 +638,7 @@
         attrs.add( "objectClass", "alias", "extensibleObject" );
         attrs.add( "cn", "jd" );
         attrs.add( "aliasedObjectName", "cn=Jack Daniels,ou=Engineering,o=Good Times Co." );
-        attrs.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        attrs.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
         attrs.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         store.add( attrs );
 
@@ -653,7 +653,7 @@
         attrs.add( "objectClass", "person" );
         attrs.add( "cn", "jdoe" );
         attrs.add( "sn", "doe" );
-        attrs.add( "entryCSN", new CsnFactory().newInstance( 1 ).toString() );
+        attrs.add( "entryCSN", new CsnFactory( 1  ).newInstance().toString() );
         attrs.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         store.add( attrs );
 

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java Thu Jun  4 08:16:03 2009
@@ -51,7 +51,7 @@
 public class StoreUtils
 {
     /** CSN factory instance */
-    private static final CsnFactory CSN_FACTORY = new CsnFactory();
+    private static final CsnFactory CSN_FACTORY = new CsnFactory( 0 );
 
     /**
      * Initializes and loads a store with the example data shown in
@@ -298,7 +298,7 @@
      */
     public static void injectEntryInStore( Store<ServerEntry> store, ServerEntry entry ) throws Exception
     {
-        entry.add( ApacheSchemaConstants.ENTRY_CSN_AT, CSN_FACTORY.newInstance( 1 ).toString() );
+        entry.add( ApacheSchemaConstants.ENTRY_CSN_AT, CSN_FACTORY.newInstance().toString() );
         entry.add( ApacheSchemaConstants.ENTRY_UUID_AT, SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
         
         store.add( entry );

Modified: directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype (original)
+++ directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype Thu Jun  4 08:16:03 2009
@@ -51,7 +51,7 @@
 f none /opt/apacheds/lib/jcl-over-slf4j-1.5.2.jar 0644 apacheds apacheds
 f none /opt/apacheds/lib/libwrapper.so 0644 apacheds apacheds
 f none /opt/apacheds/lib/log4j-1.2.14.jar 0644 apacheds apacheds
-f none /opt/apacheds/lib/mina-core-2.0.0-M5.jar 0644 apacheds apacheds
+f none /opt/apacheds/lib/mina-core-2.0.0-M6.jar 0644 apacheds apacheds
 f none /opt/apacheds/lib/shared-asn1-0.9.14-SNAPSHOT.jar 0644 apacheds apacheds
 f none /opt/apacheds/lib/shared-asn1-codec-0.9.14-SNAPSHOT.jar 0644 apacheds apacheds
 f none /opt/apacheds/lib/shared-bouncycastle-reduced-0.9.14-SNAPSHOT.jar 0644 apacheds apacheds

Modified: directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java (original)
+++ directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java Thu Jun  4 08:16:03 2009
@@ -451,7 +451,7 @@
     String UTC_TIME_SYNTAX                  = "1.3.6.1.4.1.1466.115.121.1.53";
     String DIRECTORY_STRING_SYNTAX          = "1.3.6.1.4.1.1466.115.121.1.15";
     String UUID_SYNTAX                      = "1.3.6.1.1.16.1";
-    String CSN_SYNTAX                       = "1.3.6.1.4.1.4203.666.11.2.1";
+    String CSN_SYNTAX                       = "1.3.6.1.4.1.4203.666.11.2.1";  // done
     String CSN_SID_SYNTAX                   = "1.3.6.1.4.1.4203.666.11.2.4";
 
     String JAVA_BYTE_SYNTAX                 = "1.3.6.1.4.1.18060.0.4.1.0.0";
@@ -461,22 +461,67 @@
     String JAVA_INT_SYNTAX                  = "1.3.6.1.4.1.18060.0.4.1.0.4";
 
     // ---- MatchingRules -----------------------------------------------------
-
-    String CASE_IGNORE_MR                   = "caseIgnoreMatch";
-    String CASE_IGNORE_SUBSTRING_MR         = "caseIgnoreSubstringsMatch";
-    String CASE_EXACT_MR                    = "caseExactMatch";
-    String CASE_EXACT_SUBSTRING_MR          = "caseExactSubstringsMatch";
-    String INTEGER_MR                       = "integerMatch";
-    String INTEGER_ORDERING_MR              = "integerOrderingMatch";
-    String BOOLEAN_MR                       = "booleanMatch";
-    String BIT_STRING_MR                    = "bitStringMatch";
-    String GENERALIZED_TIME_MR              = "generalizedTimeMatch";
-    String GENERALIZED_TIME_ORDERING_MR     = "generalizedTimeOrderingMatch";
-    String UUID_MATCH                       = "uuidMatch";
-    String UUID_ORDERING_MATCH              = "uuidOrderingMatch";
-    String CSN_MATCH                        = "csndMatch";
-    String CSN_ORDERING_MATCH               = "csnOrderingMatch";
-    String CSN_SID_MATCH                    = "csnSidMatch";
+    // objectIdentifierMatch (RFC 4517, chap. 4.2.26)
+    String OBJECT_IDENTIFIER_MATCH_MR           = "objectIdentifierMatch"; // done
+    String OBJECT_IDENTIFIER_MATCH_MR_OID       = "2.5.13.0"; // done
+    
+    // distinguishedNameMatch (RFC 4517, chap. 4.2.15)
+    String DISTINGUISHED_NAME_MATCH_MR          = "distinguishedNameMatch"; // done
+    String DISTINGUISHED_NAME_MATCH_MR_OID      = "2.5.13.1"; // done
+    
+    // caseIgnoreMatch (RFC 4517, chap. 3.3.19)
+    String CASE_IGNORE_MATCH_MR                 = "caseIgnoreMatch"; // done
+    String CASE_IGNORE_MATCH_MR_OID             = "2.5.13.2"; // done
+    
+    // caseIgnoreOrderingMatch (RFC 4517, chap. 4.2.12)
+    String CASE_IGNORE_ORDERING_MATCH_MR        = "caseIgnoreOrderingMatch"; // done
+    String CASE_IGNORE_ORDERING_MATCH_MR_OID    = "2.5.13.3"; // done
+    
+    // caseIgnoreSubstringsMatch (RFC 4517, chap. 4.2.13)
+    String CASE_IGNORE_SUBSTRING_MATCH_MR       = "caseIgnoreSubstringsMatch"; // done
+    String CASE_IGNORE_SUBSTRING_MATCH_MR_OID   = "2.5.13.4"; // done
+    
+    // caseExactMatch (RFC 4517, chap. 4.2.4)
+    String CASE_EXACT_MATCH_MR                  = "caseExactMatch"; // done
+    String CASE_EXACT_MATCH_MR_OID              = "2.5.13.5"; // done
+    
+    // caseExactOrderingMatch (RFC 4517, chap. 4.2.5)
+    String CASE_EXACT_ORDERING_MATCH_MR         = "caseExactOrderingMatch"; // done
+    String CASE_EXACT_ORDERING_MATCH_MR_OID     = "2.5.13.6"; // done
+    
+    // caseExactSubstringsMatch (RFC 4517, chap. 4.2.6)
+    String CASE_EXACT_SUBSTRING_MATCH_MR        = "caseExactSubstringsMatch"; // done
+    String CASE_EXACT_SUBSTRING_MATCH_MR_OID    = "2.5.13.7"; // done
+    
+    // numericStringMatch (RFC 4517, chap. 4.2.22)
+    String NUMERIC_STRING_MATCH_MR              = "numericStringMatch"; // done
+    String NUMERIC_STRING_MATCH_MR_OID          = "2.5.13.8"; // done
+    
+    // numericStringOrderingMatch (RFC 4517, chap. 4.2.23)
+    String NUMERIC_STRING_ORDERING_MATCH_MR     = "numericStringOrderingMatch"; // done
+    String NUMERIC_STRING_ORDERING_MATCH_MR_OID = "2.5.13.9"; // done
+    
+    
+    String INTEGER_MR                         = "integerMatch";
+    String INTEGER_ORDERING_MR                = "integerOrderingMatch";
+    String BOOLEAN_MR                         = "booleanMatch";
+    String BIT_STRING_MR                      = "bitStringMatch";
+    String GENERALIZED_TIME_MR                = "generalizedTimeMatch";
+    String GENERALIZED_TIME_ORDERING_MR       = "generalizedTimeOrderingMatch";
+    String UUID_MATCH                         = "uuidMatch";
+    String UUID_ORDERING_MATCH                = "uuidOrderingMatch";
+    
+    // csnMatch 
+    String CSN_MATCH_MR                       = "csnMatch";  // done
+    String CSN_MATCH_MR_OID                   = "1.3.6.1.4.1.4203.666.11.2.2";  // done
+    
+    // csnOrderingMatch
+    String CSN_ORDERING_MATCH_MR              = "csnOrderingMatch";  // done
+    String CSN_ORDERING_MATCH_MR_OID          = "1.3.6.1.4.1.4203.666.11.2.3";  // done
+    
+    // csnSidMatch
+    String CSN_SID_MATCH_MR                   = "csnSidMatch";  // done
+    String CSN_SID_MATCH_MR_OID               = "1.3.6.1.4.1.4203.666.11.2.5";  // done
     
     // ---- Features ----------------------------------------------------------
     String FEATURE_ALL_OPERATIONAL_ATTRIBUTES = "1.3.6.1.4.1.4203.1.5.1";

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/csn/CsnFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/csn/CsnFactory.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/csn/CsnFactory.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/csn/CsnFactory.java Thu Jun  4 08:16:03 2009
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.shared.ldap.csn;
 
+import java.util.concurrent.atomic.AtomicInteger;
+
 
 /**
  * Generates a new {@link Csn}.
@@ -31,12 +33,19 @@
     private static volatile long lastTimestamp;
     
     /** The integer used to disambiguate CSN generated at the same time */
-    private static volatile int changeCount;
+    private AtomicInteger changeCount;
+    
+    /** The replicaId to use for every CSN created by this factory */
+    private int replicaId;
 
+    /** A special instance ID for a purge CSN */
+    private static final int PURGE_INSTANCEID = 0x0FFF;
 
-    public CsnFactory()
+
+    public CsnFactory( int replicaId )
     {
-        changeCount = 0;
+        changeCount = new AtomicInteger( 0 );
+        this.replicaId = replicaId;
     }
 
 
@@ -44,26 +53,23 @@
      * Returns a new {@link Csn}.
      * Generated CSN can be duplicate if user generates CSNs more than 2G 
      * times a milliseconds.
-     * 
-     * @param replicaId Replica ID.  ReplicaID must be 1-3 digit alphanumeric
-     *        value (from 000 to fff).
      */
-    public Csn newInstance( int replicaId )
+    public Csn newInstance()
     {
         long newTimestamp = System.currentTimeMillis();
         
         // We will be able to generate 2 147 483 647 CSNs each 10 ms max
         if ( lastTimestamp == newTimestamp )
         {
-            changeCount ++;
+            changeCount.incrementAndGet();
         }
         else
         {
             lastTimestamp = newTimestamp;
-            changeCount = 0;
+            changeCount.set( 0 );
         }
 
-        return new Csn( lastTimestamp, changeCount, replicaId, 0 );
+        return new Csn( lastTimestamp, changeCount.get(), replicaId, 0 );
     }
 
 
@@ -76,7 +82,7 @@
      * @param replicaId Replica ID.  ReplicaID must be 1-3 digit value
      * @param changeCount The change count to use
      */
-    public Csn newInstance( long timestamp, int replicaId, int changeCount )
+    public Csn newInstance( long timestamp, int changeCount )
     {
         return new Csn( timestamp, changeCount, replicaId, 0 );
     }
@@ -88,8 +94,8 @@
      * 
      * @param expirationDate The time up to the first CSN we want to keep 
      */
-    public Csn newInstance( long expirationDate )
+    public Csn newPurgeCsn( long expirationDate )
     {
-        return new Csn( expirationDate, Integer.MAX_VALUE, -1, Integer.MAX_VALUE );
+        return new Csn( expirationDate, Integer.MAX_VALUE, PURGE_INSTANCEID, Integer.MAX_VALUE );
     }
 }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/csn/CsnFactoryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/csn/CsnFactoryTest.java?rev=781677&r1=781676&r2=781677&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/csn/CsnFactoryTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/csn/CsnFactoryTest.java Thu Jun  4 08:16:03 2009
@@ -43,14 +43,14 @@
     @Test
     public void testUnique()
     {
-        int replicaID = 001;
-        CsnFactory defaultCSNFactory = new CsnFactory();
+        int replicaId = 001;
+        CsnFactory defaultCSNFactory = new CsnFactory( replicaId );
 
         Csn[] csns = new Csn[NUM_GENERATES];
 
         for ( int i = 0; i < NUM_GENERATES; i++ )
         {
-            csns[i] = defaultCSNFactory.newInstance( replicaID );
+            csns[i] = defaultCSNFactory.newInstance();
         }
 
         for ( int i = 0; i < NUM_GENERATES; i++ )



Mime
View raw message