From 3c47c41e9ebd977095879ade126e348ee0b2d5d9 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 14 Feb 2014 09:05:10 +0000
Subject: [PATCH] OPENDJ-1308 Migrate schema support
---
opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java | 86 ++++++++++---------------------------------
1 files changed, 20 insertions(+), 66 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java b/opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java
index 6d6b02f..214c24c 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java
@@ -28,46 +28,27 @@
package org.opends.server.schema;
-import org.opends.server.util.StaticUtils;
-import org.forgerock.i18n.slf4j.LocalizedLogger;
import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.GregorianCalendar;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TimeZone;
+import java.util.*;
+
import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.api.ExtensibleIndexer;
-import org.opends.server.api.IndexQueryFactory;
-import org.opends.server.api.MatchingRule;
-import org.opends.server.api.MatchingRuleFactory;
-import org.opends.server.admin.std.server.MatchingRuleCfg;
-import org.opends.server.api.AbstractMatchingRule;
-import org.opends.server.api.ExtensibleMatchingRule;
-import org.opends.server.api.OrderingMatchingRule;
-import org.opends.server.config.ConfigException;
-import org.opends.server.core.DirectoryServer;
-import org.opends.server.types.AttributeValue;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ByteStringBuilder;
-import org.opends.server.types.ConditionResult;
-import org.opends.server.types.DirectoryException;
-import org.opends.server.types.IndexConfig;
-import org.opends.server.types.InitializationException;
-import org.opends.server.types.ResultCode;
-import static org.opends.server.util.StaticUtils.*;
-import static org.opends.server.util.TimeThread.*;
+import org.opends.server.admin.std.server.MatchingRuleCfg;
+import org.opends.server.api.*;
+import org.opends.server.config.ConfigException;
+import org.opends.server.core.DirectoryServer;
+import org.opends.server.types.*;
+import org.opends.server.util.StaticUtils;
import static org.opends.messages.SchemaMessages.*;
+import static org.opends.server.schema.GeneralizedTimeSyntax.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.ServerConstants.*;
-import static org.opends.server.schema.GeneralizedTimeSyntax.*;
+import static org.opends.server.util.StaticUtils.*;
+import static org.opends.server.util.TimeThread.*;
@@ -397,6 +378,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public int compareValues(ByteSequence value1, ByteSequence value2)
{
return value1.compareTo(value2);
@@ -407,6 +389,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public int compare(byte[] arg0, byte[] arg1)
{
return StaticUtils.compare(arg0, arg1);
@@ -417,6 +400,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public Collection<ExtensibleIndexer> getIndexers(IndexConfig config)
{
if(indexer == null)
@@ -458,17 +442,6 @@
}
- /**
- * {@inheritDoc}
- */
- @Override
- public String getName()
- {
- return EXT_OMR_RELATIVE_TIME_GT_NAME;
- }
-
-
-
/**
* {@inheritDoc}
*/
@@ -515,6 +488,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public <T> T createIndexQuery(ByteSequence assertionValue,
IndexQueryFactory<T> factory) throws DirectoryException
{
@@ -556,18 +530,6 @@
}
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getName()
- {
- return EXT_OMR_RELATIVE_TIME_LT_NAME;
- }
-
-
-
/**
* {@inheritDoc}
*/
@@ -613,6 +575,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public <T> T createIndexQuery(ByteSequence assertionValue,
IndexQueryFactory<T> factory) throws DirectoryException
{
@@ -739,17 +702,6 @@
* {@inheritDoc}
*/
@Override
- public String getName()
- {
- return EXT_PARTIAL_DATE_TIME_NAME;
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
public String getOID()
{
return EXT_PARTIAL_DATE_TIME_OID;
@@ -763,7 +715,7 @@
@Override
public Collection<String> getNames()
{
- return Collections.singleton(getName());
+ return Collections.singleton(EXT_PARTIAL_DATE_TIME_NAME);
}
@@ -1134,6 +1086,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public Collection<ExtensibleIndexer> getIndexers(IndexConfig config)
{
if(indexer == null)
@@ -1148,6 +1101,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public <T> T createIndexQuery(ByteSequence assertionValue,
IndexQueryFactory<T> factory) throws DirectoryException
{
--
Gitblit v1.10.0