opendj3-server-dev/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRule.java
@@ -33,8 +33,7 @@ import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.ByteStringBuilder; import org.forgerock.opendj.ldap.DecodeException; import org.opends.server.api.AbstractMatchingRule; import org.opends.server.api.OrderingMatchingRule; import org.opends.server.schema.AbstractOrderingMatchingRule; import static org.opends.messages.ReplicationMessages.*; import static org.opends.server.util.StaticUtils.*; @@ -43,8 +42,7 @@ * Used to establish an order between historical information and index them. */ public class HistoricalCsnOrderingMatchingRule extends AbstractMatchingRule implements OrderingMatchingRule extends AbstractOrderingMatchingRule { /** * The serial version identifier required to satisfy the compiler because this @@ -98,16 +96,6 @@ } /** * Get the description of this Class. * @return the Class description in String form, currently not used. */ @Override public String getDescription() { return null; } /** * Get the Syntax OID for this class. * @return the syntax OID in String form */ opendj3-server-dev/src/server/org/opends/server/schema/AbstractOrderingMatchingRule.java
New file @@ -0,0 +1,53 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt * or http://forgerock.org/license/CDDLv1.0.html. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at legal-notices/CDDLv1_0.txt. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: * Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END * * Copyright 2014 ForgeRock AS */ package org.opends.server.schema; import org.opends.server.api.AbstractMatchingRule; import org.opends.server.api.OrderingMatchingRule; /** * This class defines the set of methods and structures that must be implemented * by a Directory Server module that implements a matching rule used for * ordering matching. */ public abstract class AbstractOrderingMatchingRule extends AbstractMatchingRule implements OrderingMatchingRule { /** * 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; } } opendj3-server-dev/src/server/org/opends/server/schema/CaseExactOrderingMatchingRule.java
@@ -34,8 +34,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.util.ServerConstants; import org.opends.server.util.StaticUtils; @@ -49,8 +47,7 @@ * and referenced in RFC 4519. */ public class CaseExactOrderingMatchingRule extends AbstractMatchingRule implements OrderingMatchingRule extends AbstractOrderingMatchingRule { /** * The serial version identifier required to satisfy the compiler because this @@ -96,21 +93,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. * opendj3-server-dev/src/server/org/opends/server/schema/CaseIgnoreOrderingMatchingRule.java
@@ -34,8 +34,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.util.ServerConstants; import org.opends.server.util.StaticUtils; @@ -49,8 +47,7 @@ * and referenced in RFC 2252. */ public class CaseIgnoreOrderingMatchingRule extends AbstractMatchingRule implements OrderingMatchingRule extends AbstractOrderingMatchingRule { /** * The serial version identifier required to satisfy the compiler because this @@ -96,21 +93,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. * opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeOrderingMatchingRule.java
@@ -35,8 +35,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.types.DirectoryException; @@ -49,8 +47,7 @@ * X.520 and referenced in RFC 2252. */ public class GeneralizedTimeOrderingMatchingRule extends AbstractMatchingRule implements OrderingMatchingRule extends AbstractOrderingMatchingRule { private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); @@ -100,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. * opendj3-server-dev/src/server/org/opends/server/schema/IntegerOrderingMatchingRule.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 static org.opends.messages.SchemaMessages.*; @@ -49,9 +47,7 @@ * This class defines the integerOrderingMatch matching rule defined in X.520 * and referenced in RFC 4519. */ public class IntegerOrderingMatchingRule extends AbstractMatchingRule implements OrderingMatchingRule public class IntegerOrderingMatchingRule extends AbstractOrderingMatchingRule { private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); @@ -100,21 +96,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. * opendj3-server-dev/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
@@ -1507,8 +1507,7 @@ * Implementation of an Enum Ordering matching rule. */ private final class EnumOrderingMatchingRule extends AbstractMatchingRule implements OrderingMatchingRule extends AbstractOrderingMatchingRule { //The enumeration syntax instance. private EnumSyntax syntax; @@ -1588,17 +1587,6 @@ * {@inheritDoc} */ @Override public String getDescription() { return null; } /** * {@inheritDoc} */ @Override public String getSyntaxOID() { return SYNTAX_DIRECTORY_STRING_OID; opendj3-server-dev/src/server/org/opends/server/schema/NumericStringOrderingMatchingRule.java
@@ -34,8 +34,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; @@ -49,8 +47,7 @@ * in X.520 and referenced in RFC 2252. */ public class NumericStringOrderingMatchingRule extends AbstractMatchingRule implements OrderingMatchingRule extends AbstractOrderingMatchingRule { private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); @@ -99,21 +96,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. * opendj3-server-dev/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java
@@ -34,8 +34,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.util.StaticUtils; import static org.opends.server.schema.SchemaConstants.*; @@ -48,8 +46,7 @@ * octet string syntaxes. */ public class OctetStringOrderingMatchingRule extends AbstractMatchingRule implements OrderingMatchingRule extends AbstractOrderingMatchingRule { /** * The serial version identifier required to satisfy the compiler because this @@ -95,21 +92,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. * 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(); } } /**