From b979e5a32f5317c7385c10653963f3daa37cabba Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 20 Feb 2014 11:34:28 +0000
Subject: [PATCH] OPENDJ-1308 Migrate schema support
---
opendj3-server-dev/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java | 36 ++++++++++++++++--------------------
1 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java b/opendj3-server-dev/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java
index 182a325..8df4b66 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java
@@ -36,8 +36,6 @@
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.DecodeException;
-import org.opends.server.api.AbstractMatchingRule;
-import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.core.DirectoryServer;
import org.opends.server.util.StaticUtils;
@@ -50,9 +48,7 @@
* This class defines the uuidOrderingMatch matching rule defined in RFC 4530.
* This will be the default ordering matching rule for the UUID syntax.
*/
-public class UUIDOrderingMatchingRule
- extends AbstractMatchingRule
- implements OrderingMatchingRule
+public class UUIDOrderingMatchingRule extends AbstractOrderingMatchingRule
{
private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -101,21 +97,6 @@
/**
- * Retrieves the description for this matching rule.
- *
- * @return The description for this matching rule, or <CODE>null</CODE> if
- * there is none.
- */
- @Override
- public String getDescription()
- {
- // There is no standard description for this matching rule.
- return null;
- }
-
-
-
- /**
* Retrieves the OID of the syntax with which this matching rule is
* associated.
*
@@ -233,6 +214,21 @@
}
}
+ private ByteString reject(ByteSequence value, LocalizableMessage message)
+ throws DecodeException
+ {
+ switch (DirectoryServer.getSyntaxEnforcementPolicy())
+ {
+ case REJECT:
+ throw DecodeException.error(message);
+ case WARN:
+ logger.error(message);
+ return value.toByteString();
+ default:
+ return value.toByteString();
+ }
+ }
+
/**
--
Gitblit v1.10.0