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 2007/08/25 01:53:14 UTC
svn commit: r569579 -
/directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemComparatorProducer.java
Author: elecharny
Date: Fri Aug 24 16:53:13 2007
New Revision: 569579
URL: http://svn.apache.org/viewvc?rev=569579&view=rev
Log:
Replaced the DeepTrimCachingNormalizerComparator for uniqueMemberMatch by a ?ameAndOptionalUidComparator.
Created a caching comparator for this one, but we can't use it straight as we don't inject the AttributeType registry into the normalizer if it's cached.
Modified:
directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/SystemComparatorProducer.java
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=569579&r1=569578&r2=569579&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 Fri Aug 24 16:53:13 2007
@@ -25,6 +25,8 @@
import javax.naming.NamingException;
import org.apache.directory.server.schema.DnComparator;
+import org.apache.directory.server.schema.NameAndOptionalUIDComparator;
+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.schema.CachingNormalizer;
@@ -66,6 +68,19 @@
}
}
+ /**
+ * This caching NormalizingComparator would be a good thing to have,
+ * sadly we can't use it as the registries are not available here ...
+ *
+ * TODO Inject the AttributeType registry into the caching normalizer.
+ */
+ public static class NameAndOptionalUIDCachingNormalizingComparator extends NormalizingComparator
+ {
+ public NameAndOptionalUIDCachingNormalizingComparator()
+ {
+ super( new CachingNormalizer( new NameAndOptionalUIDNormalizer() ), new NameAndOptionalUIDComparator() );
+ }
+ }
public void produce( Registries registries, ProducerCallback cb ) throws NamingException
{
@@ -196,7 +211,7 @@
( 2.5.13.23 NAME 'uniqueMemberMatch'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.34 )
*/
- comparator = new DeepTrimCachingNormalizingComparator();
+ comparator = new NameAndOptionalUIDComparator();
cb.schemaObjectProduced( this, "2.5.13.23", comparator );
/*