From cfc513043c5830b5a967733066068c7097b42e3c Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 15 Aug 2007 21:34:53 +0000
Subject: [PATCH] This commit is a step toward getting OpenDS internationalized. There are still issues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.
---
opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java | 25 ++++++++++---------------
1 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
index a0f4077..e3ba5d0 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
@@ -41,19 +41,16 @@
import org.opends.server.types.ByteString;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DN;
-import org.opends.server.types.ErrorLogCategory;
-import org.opends.server.types.ErrorLogSeverity;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.messages.SchemaMessages.*;
+import static org.opends.messages.SchemaMessages.*;
+import org.opends.messages.MessageBuilder;
import static org.opends.server.schema.SchemaConstants.*;
-
/**
* This class defines the distinguished name attribute syntax, which is used for
* attributes that hold distinguished names (DNs). Equality and substring
@@ -117,18 +114,16 @@
DirectoryServer.getEqualityMatchingRule(EMR_DN_OID);
if (defaultEqualityMatchingRule == null)
{
- logError(ErrorLogCategory.SCHEMA, ErrorLogSeverity.SEVERE_ERROR,
- MSGID_ATTR_SYNTAX_UNKNOWN_EQUALITY_MATCHING_RULE, EMR_DN_OID,
- SYNTAX_DN_NAME);
+ logError(ERR_ATTR_SYNTAX_UNKNOWN_EQUALITY_MATCHING_RULE.get(
+ EMR_DN_OID, SYNTAX_DN_NAME));
}
defaultSubstringMatchingRule =
DirectoryServer.getSubstringMatchingRule(SMR_CASE_IGNORE_OID);
if (defaultSubstringMatchingRule == null)
{
- logError(ErrorLogCategory.SCHEMA, ErrorLogSeverity.SEVERE_ERROR,
- MSGID_ATTR_SYNTAX_UNKNOWN_SUBSTRING_MATCHING_RULE,
- SMR_CASE_IGNORE_OID, SYNTAX_DN_NAME);
+ logError(ERR_ATTR_SYNTAX_UNKNOWN_SUBSTRING_MATCHING_RULE.get(
+ SMR_CASE_IGNORE_OID, SYNTAX_DN_NAME));
}
}
@@ -245,7 +240,7 @@
* this syntax, or <CODE>false</CODE> if not.
*/
public boolean valueIsAcceptable(ByteString value,
- StringBuilder invalidReason)
+ MessageBuilder invalidReason)
{
// Use the DN code to make this determination.
try
@@ -261,7 +256,7 @@
TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
- invalidReason.append(de.getErrorMessage());
+ invalidReason.append(de.getMessageObject());
return false;
}
catch (Exception e)
@@ -271,8 +266,8 @@
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
- int msgID = MSGID_ATTR_SYNTAX_DN_INVALID;
- invalidReason.append(getMessage(msgID, value.stringValue(),
+
+ invalidReason.append(ERR_ATTR_SYNTAX_DN_INVALID.get(value.stringValue(),
String.valueOf(e)));
return false;
--
Gitblit v1.10.0