From 80c58327faaa4873369f6bb949e62792c2f708e0 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.
---
opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java
index e5f8ee3..b7a38c3 100644
--- a/opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java
@@ -25,6 +25,7 @@
* Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
+import org.opends.messages.Message;
@@ -42,10 +43,7 @@
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.ExtensionsMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
-
-
+import static org.opends.messages.ExtensionMessages.*;
/**
* This class defines a Directory Server password storage scheme that will store
* the values in base64-encoded form. This is a reversible algorithm that
@@ -175,11 +173,10 @@
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
- int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD;
- String message = getMessage(msgID, storedPassword.stringValue(),
- String.valueOf(e));
+ Message message = ERR_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD.get(
+ storedPassword.stringValue(), String.valueOf(e));
throw new DirectoryException(ResultCode.INVALID_CREDENTIALS, message,
- msgID, e);
+ e);
}
}
@@ -204,10 +201,9 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
- String message = getMessage(msgID, getStorageSchemeName());
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message,
- msgID);
+ Message message =
+ ERR_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD.get(getStorageSchemeName());
+ throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
}
@@ -233,10 +229,9 @@
String authValue)
throws DirectoryException
{
- int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
- String message = getMessage(msgID, getStorageSchemeName());
- throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message,
- msgID);
+ Message message =
+ ERR_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD.get(getStorageSchemeName());
+ throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
}
--
Gitblit v1.10.0