Package org.nasutekds.server.api

Examples of org.nasutekds.server.api.OrderingMatchingRule.normalizeValue()


    {
      // Set the lower bound for a range search.
      // Use the ordering matching rule to normalize the value.
      OrderingMatchingRule orderingRule =
           filter.getAttributeType().getOrderingMatchingRule();
      byte[] lower = orderingRule.normalizeValue(
           filter.getAssertionValue().getValue()).toByteArray();

      // Set the upper bound to 0 to search all keys greater then the lower
      // bound.
      byte[] upper = new byte[0];
View Full Code Here


      // Set the upper bound for a range search.
      // Use the ordering matching rule to normalize the value.
      OrderingMatchingRule orderingRule =
           filter.getAttributeType().getOrderingMatchingRule();
      byte[] upper = orderingRule.normalizeValue(
           filter.getAssertionValue().getValue()).toByteArray();

      if(debugBuffer != null)
      {
        debugBuffer.append("[INDEX:");
View Full Code Here

      OrderingMatchingRule orderingRule =
           getAttributeType().getOrderingMatchingRule();

      // Set the lower bound for a range search.
      byte[] lower =
          orderingRule.normalizeValue(lowerValue.getValue()).toByteArray();

      // Set the upper bound for a range search.
      byte[] upper =
          orderingRule.normalizeValue(upperValue.getValue()).toByteArray();
View Full Code Here

      byte[] lower =
          orderingRule.normalizeValue(lowerValue.getValue()).toByteArray();

      // Set the upper bound for a range search.
      byte[] upper =
          orderingRule.normalizeValue(upperValue.getValue()).toByteArray();

      // Read the range: lower <= keys <= upper.
      return orderingIndex.readRange(lower, upper, true, true);
    }
    catch (DirectoryException e)
View Full Code Here

            // Use the ordering matching rule to normalize the value.
            OrderingMatchingRule orderingRule =
                 attr.getAttributeType().getOrderingMatchingRule();

            normalizedBytes =
                 orderingRule.normalizeValue(value.getValue()).toByteArray();

            DatabaseEntry key = new DatabaseEntry(normalizedBytes);
            try
            {
              ConditionResult cr;
View Full Code Here

    // we should call initializeMatchingRule but they all seem empty at the
    // moment.
    // ruleInstance.initializeMatchingRule(configEntry);

    ByteString normalizedValue1 =
      ruleInstance.normalizeValue(ByteString.valueOf(value1));
    ByteString normalizedValue2 =
      ruleInstance.normalizeValue(ByteString.valueOf(value2));
    int res = ruleInstance.compareValues(normalizedValue1, normalizedValue2);
    if (result == 0)
    {
View Full Code Here

    // ruleInstance.initializeMatchingRule(configEntry);

    ByteString normalizedValue1 =
      ruleInstance.normalizeValue(ByteString.valueOf(value1));
    ByteString normalizedValue2 =
      ruleInstance.normalizeValue(ByteString.valueOf(value2));
    int res = ruleInstance.compareValues(normalizedValue1, normalizedValue2);
    if (result == 0)
    {
      if (res != 0)
      {
View Full Code Here

    OrderingMatchingRule ruleInstance = getRule();

    // normalize the 2 provided values
    try
    {
      ruleInstance.normalizeValue(ByteString.valueOf(value));
    } catch (DirectoryException e) {
      // that's the expected path : the matching rule has detected that
      // the value is incorrect.
      return;
    }
View Full Code Here

    AcceptRejectWarn accept = DirectoryServer.getSyntaxEnforcementPolicy();
    DirectoryServer.setSyntaxEnforcementPolicy(AcceptRejectWarn.WARN);
    // normalize the 2 provided values
    try
    {
      ruleInstance.normalizeValue(ByteString.valueOf(value));
    } catch (Exception e)
    {
      fail(ruleInstance + " in warn mode should not reject value " + value + e);
      return;
    }
View Full Code Here

      ByteString normalizedValue;
      try
      {
        normalizedValue =
                matchingRule.normalizeValue(value.getValue());
      }
      catch (Exception e)
      {
        if (debugEnabled())
        {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.