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

boli
01.27.2007 455897cc245b67d929f409a93cfa7106e835cc1f
opends/src/server/org/opends/server/schema/GeneralizedTimeOrderingMatchingRule.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Portions Copyright 2006 Sun Microsystems, Inc.
 *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 */
package org.opends.server.schema;
@@ -47,7 +47,9 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.debug.DebugLogger.debugCought;
import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -64,11 +66,6 @@
public class GeneralizedTimeOrderingMatchingRule
       extends OrderingMatchingRule
{
  /**
   * The fully-qualified name of this class for debugging purposes.
   */
  private static final String CLASS_NAME =
       "org.opends.server.schema.GeneralizedTimeOrderingMatchingRule";
@@ -129,7 +126,6 @@
  {
    super();
    assert debugConstructor(CLASS_NAME);
  }
@@ -151,8 +147,6 @@
  public void initializeMatchingRule(ConfigEntry configEntry)
         throws ConfigException, InitializationException
  {
    assert debugEnter(CLASS_NAME, "initializeMatchingRule",
                      String.valueOf(configEntry));
    // No initialization is required.
  }
@@ -167,7 +161,6 @@
   */
  public String getName()
  {
    assert debugEnter(CLASS_NAME, "getName");
    return OMR_GENERALIZED_TIME_NAME;
  }
@@ -181,7 +174,6 @@
   */
  public String getOID()
  {
    assert debugEnter(CLASS_NAME, "getOID");
    return OMR_GENERALIZED_TIME_OID;
  }
@@ -196,7 +188,6 @@
   */
  public String getDescription()
  {
    assert debugEnter(CLASS_NAME, "getDescription");
    // There is no standard description for this matching rule.
    return null;
@@ -212,7 +203,6 @@
   */
  public String getSyntaxOID()
  {
    assert debugEnter(CLASS_NAME, "getSyntaxOID");
    return SYNTAX_GENERALIZED_TIME_OID;
  }
@@ -233,7 +223,6 @@
  public ByteString normalizeValue(ByteString value)
         throws DirectoryException
  {
    assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
    String valueString = value.stringValue().toUpperCase();
@@ -276,7 +265,10 @@
    }
    catch (Exception e)
    {
      assert debugException(CLASS_NAME, "normalizeValue", e);
      if (debugEnabled())
      {
        debugCought(DebugLogLevel.ERROR, e);
      }
      int    msgID   = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
      String message = getMessage(msgID, valueString,
@@ -308,7 +300,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "normalizeValue", e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        int    msgID   = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
        String message = getMessage(msgID, valueString,
@@ -364,7 +359,10 @@
        }
        catch (Exception e)
        {
          assert debugException(CLASS_NAME, "normalizeValue", e);
          if (debugEnabled())
          {
            debugCought(DebugLogLevel.ERROR, e);
          }
          int    msgID   = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
          String message = getMessage(msgID, valueString,
@@ -389,7 +387,10 @@
        }
        catch (Exception e)
        {
          assert debugException(CLASS_NAME, "normalizeValue", e);
          if (debugEnabled())
          {
            debugCought(DebugLogLevel.ERROR, e);
          }
          int    msgID   = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
          String message = getMessage(msgID, valueString,
@@ -447,7 +448,10 @@
        }
        catch (Exception e)
        {
          assert debugException(CLASS_NAME, "normalizeValue", e);
          if (debugEnabled())
          {
            debugCought(DebugLogLevel.ERROR, e);
          }
          int    msgID   = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
          String message = getMessage(msgID, valueString,
@@ -558,19 +562,6 @@
                                     int second, int millisecond)
          throws DirectoryException
  {
    assert debugEnter(CLASS_NAME, "processValueEnd",
                      new String[]
                      {
                        String.valueOf(valueString),
                        String.valueOf(endPos),
                        String.valueOf(year),
                        String.valueOf(month),
                        String.valueOf(day),
                        String.valueOf(hour),
                        String.valueOf(minute),
                        String.valueOf(second),
                        String.valueOf(millisecond)
                      });
    // First, check to see if we are at the end of the string.  If so, then
@@ -602,7 +593,10 @@
        }
        catch (Exception e)
        {
          assert debugException(CLASS_NAME, "processValueEnd", e);
          if (debugEnabled())
          {
            debugCought(DebugLogLevel.ERROR, e);
          }
          int    msgID   = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
          String message = getMessage(msgID, valueString,
@@ -639,7 +633,10 @@
        }
        catch (Exception e)
        {
          assert debugException(CLASS_NAME, "processValueEnd", e);
          if (debugEnabled())
          {
            debugCought(DebugLogLevel.ERROR, e);
          }
          int    msgID   = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
          String message = getMessage(msgID, valueString,
@@ -682,7 +679,10 @@
          }
          catch (Exception e)
          {
            assert debugException(CLASS_NAME, "processValueEnd", e);
            if (debugEnabled())
            {
              debugCought(DebugLogLevel.ERROR, e);
            }
            int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
            String message = getMessage(msgID, valueString,
@@ -715,7 +715,10 @@
        }
        catch (Exception e)
        {
          assert debugException(CLASS_NAME, "processValueEnd", e);
          if (debugEnabled())
          {
            debugCought(DebugLogLevel.ERROR, e);
          }
          int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_INVALID_OFFSET;
          String message = getMessage(msgID, valueString,
@@ -747,7 +750,10 @@
        }
        catch (Exception e)
        {
          assert debugException(CLASS_NAME, "processValueEnd", e);
          if (debugEnabled())
          {
            debugCought(DebugLogLevel.ERROR, e);
          }
          int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_INVALID_OFFSET;
          String message = getMessage(msgID, valueString,
@@ -803,7 +809,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "processValueEnd", e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        int    msgID   = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
        String message = getMessage(msgID, valueString,
@@ -848,7 +857,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "processValueEnd", e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        msgID   = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
        message = getMessage(msgID, valueString,
@@ -881,8 +893,6 @@
   */
  public int compareValues(ByteString value1, ByteString value2)
  {
    assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(value1),
                      String.valueOf(value2));
    return compare(value1.value(), value2.value());
  }
@@ -904,8 +914,6 @@
   */
  public int compare(byte[] b1, byte[] b2)
  {
    assert debugEnter(CLASS_NAME, "compare", String.valueOf(b1),
                      String.valueOf(b2));
    int minLength = Math.min(b1.length, b2.length);