mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
20.34.2014 b979e5a32f5317c7385c10653963f3daa37cabba
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();
    }
  }
  /**