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

boli
01.27.2007 455897cc245b67d929f409a93cfa7106e835cc1f
opends/src/server/org/opends/server/schema/GeneralizedTimeEqualityMatchingRule.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;
@@ -48,7 +48,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.*;
@@ -65,11 +67,6 @@
public class GeneralizedTimeEqualityMatchingRule
       extends EqualityMatchingRule
{
  /**
   * The fully-qualified name of this class for debugging purposes.
   */
  private static final String CLASS_NAME =
       "org.opends.server.schema.GeneralizedTimeEqualityMatchingRule";
@@ -120,7 +117,6 @@
  {
    super();
    assert debugConstructor(CLASS_NAME);
  }
@@ -142,8 +138,6 @@
  public void initializeMatchingRule(ConfigEntry configEntry)
         throws ConfigException, InitializationException
  {
    assert debugEnter(CLASS_NAME, "initializeMatchingRule",
                      String.valueOf(configEntry));
    // No initialization is required.
  }
@@ -158,7 +152,6 @@
   */
  public String getName()
  {
    assert debugEnter(CLASS_NAME, "getName");
    return EMR_GENERALIZED_TIME_NAME;
  }
@@ -172,7 +165,6 @@
   */
  public String getOID()
  {
    assert debugEnter(CLASS_NAME, "getOID");
    return EMR_GENERALIZED_TIME_OID;
  }
@@ -187,7 +179,6 @@
   */
  public String getDescription()
  {
    assert debugEnter(CLASS_NAME, "getDescription");
    // There is no standard description for this matching rule.
    return null;
@@ -203,7 +194,6 @@
   */
  public String getSyntaxOID()
  {
    assert debugEnter(CLASS_NAME, "getSyntaxOID");
    return SYNTAX_GENERALIZED_TIME_OID;
  }
@@ -224,7 +214,6 @@
  public ByteString normalizeValue(ByteString value)
         throws DirectoryException
  {
    assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
    String valueString = value.stringValue().toUpperCase();
@@ -267,7 +256,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,
@@ -299,7 +291,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,
@@ -355,7 +350,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,
@@ -380,7 +378,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,
@@ -438,7 +439,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,
@@ -549,19 +553,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
@@ -593,7 +584,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,
@@ -630,7 +624,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,
@@ -673,7 +670,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,
@@ -706,7 +706,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,
@@ -738,7 +741,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,
@@ -794,7 +800,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,
@@ -839,7 +848,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,
@@ -869,8 +881,6 @@
   */
  public boolean areEqual(ByteString value1, ByteString value2)
  {
    assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
                      String.valueOf(value2));
    // Since the values are already normalized, we just need to compare the
    // associated byte arrays.