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/api/plugin/StartupPluginResult.java | 48 +++++++++++++++---------------------------------
1 files changed, 15 insertions(+), 33 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/api/plugin/StartupPluginResult.java b/opendj-sdk/opends/src/server/org/opends/server/api/plugin/StartupPluginResult.java
index 842be70..0a715bf 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/api/plugin/StartupPluginResult.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/api/plugin/StartupPluginResult.java
@@ -25,7 +25,8 @@
* Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-
+import org.opends.messages.Message;
+import org.opends.messages.MessageDescriptor;
/**
@@ -51,13 +52,9 @@
// process.
private final boolean continueStartup;
- // The unique identifier for any error message generated by the
- // startup plugin.
- private final int errorID;
-
- // A human-readable message that explains any error that might have
+ // A message that explains any error that might have
// occurred.
- private final String errorMessage;
+ private final Message errorMessage;
@@ -69,7 +66,7 @@
*/
private StartupPluginResult()
{
- this(true, true, 0, null);
+ this(true, true, null);
}
@@ -84,20 +81,15 @@
* @param continueStartup Indicates whether the Directory
* Server should continue with its
* startup process.
- * @param errorID The unique ID assigned to any
- * error message that might have been
- * generated by the startup plugin.
- * @param errorMessage A human-readable error message
- * that explains any error that might
- * have occurred.
+ * @param errorMessage An error message that explains any
+ * error that might have occurred.
*/
public StartupPluginResult(boolean completedSuccessfully,
- boolean continueStartup, int errorID,
- String errorMessage)
+ boolean continueStartup,
+ Message errorMessage)
{
this.completedSuccessfully = completedSuccessfully;
this.continueStartup = continueStartup;
- this.errorID = errorID;
this.errorMessage = errorMessage;
}
@@ -132,20 +124,6 @@
/**
- * Retrieves the unique ID for the error message generated by the
- * startup plugin.
- *
- * @return The unique ID for the error message generated by the
- * startup plugin, or 0 if there is no error message.
- */
- public int getErrorID()
- {
- return errorID;
- }
-
-
-
- /**
* Retrieves the human-readable error message generated by the
* startup plugin.
*
@@ -153,7 +131,7 @@
* startup plugin, or {@code null} if there is no error
* message.
*/
- public String getErrorMessage()
+ public Message getErrorMessage()
{
return errorMessage;
}
@@ -188,7 +166,11 @@
buffer.append(", continueStartup=");
buffer.append(continueStartup);
buffer.append(", errorID=");
- buffer.append(errorID);
+ if (errorMessage != null) {
+ buffer.append(errorMessage.getDescriptor().getId());
+ } else {
+ buffer.append(MessageDescriptor.NULL_ID);
+ }
buffer.append(", errorMessage=\"");
buffer.append(errorMessage);
buffer.append("\")");
--
Gitblit v1.10.0