From b7b304994dd037ced0df2d5d04c1aa4d41c6bb72 Mon Sep 17 00:00:00 2001
From: sin <sin@localhost>
Date: Wed, 17 Dec 2008 19:25:45 +0000
Subject: [PATCH] Integerated first part of the Fix for Issue# 262:Plugin for Collation/Internationalization
---
opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaTestMatchingRule.java | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaTestMatchingRule.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaTestMatchingRule.java
index 9e3dbae..eeed142 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaTestMatchingRule.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaTestMatchingRule.java
@@ -28,13 +28,13 @@
-import org.opends.server.admin.std.server.EqualityMatchingRuleCfg;
+import java.util.Collection;
+import java.util.Collections;
import org.opends.server.api.EqualityMatchingRule;
-import org.opends.server.config.ConfigException;
-import org.opends.server.schema.CaseIgnoreEqualityMatchingRule;
+import org.opends.server.api.MatchingRule;
+import org.opends.server.schema.CaseIgnoreEqualityMatchingRuleFactory;
import org.opends.server.types.ByteString;
import org.opends.server.types.DirectoryException;
-import org.opends.server.types.InitializationException;
@@ -51,7 +51,7 @@
private boolean isObsolete;
// The matching rule that will do all the real work behind the scenes.
- private CaseIgnoreEqualityMatchingRule caseIgnoreMatchingRule;
+ private EqualityMatchingRule caseIgnoreMatchingRule;
// The name for this matching rule.
private String name;
@@ -77,8 +77,11 @@
this.name = name;
this.oid = oid;
- caseIgnoreMatchingRule = new CaseIgnoreEqualityMatchingRule();
- caseIgnoreMatchingRule.initializeMatchingRule(null);
+ CaseIgnoreEqualityMatchingRuleFactory factory =
+ new CaseIgnoreEqualityMatchingRuleFactory();
+ factory.initializeMatchingRule(null);
+ caseIgnoreMatchingRule = (EqualityMatchingRule)factory.
+ getMatchingRules().iterator().next();
isObsolete = false;
}
@@ -103,8 +106,11 @@
this.oid = oid;
this.isObsolete = isObsolete;
- caseIgnoreMatchingRule = new CaseIgnoreEqualityMatchingRule();
- caseIgnoreMatchingRule.initializeMatchingRule(null);
+ CaseIgnoreEqualityMatchingRuleFactory factory =
+ new CaseIgnoreEqualityMatchingRuleFactory();
+ factory.initializeMatchingRule(null);
+ caseIgnoreMatchingRule = (EqualityMatchingRule)factory.
+ getMatchingRules().iterator().next();
}
@@ -112,10 +118,9 @@
/**
* {@inheritDoc}
*/
- public void initializeMatchingRule(EqualityMatchingRuleCfg configuration)
- throws ConfigException, InitializationException
+ public Collection<String> getAllNames()
{
- // No initialization is required.
+ return Collections.singleton(getName());
}
--
Gitblit v1.10.0