From d9b2b9b7578edb367174b1a516f38feb6eb028ae Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 10 Nov 2006 23:45:06 +0000
Subject: [PATCH] Make a number of changes to administrative tools provided with OpenDS. These are all made under the umbrella of issue #994, but there are individual issues for each change.
---
opends/src/server/org/opends/server/tools/ExportLDIF.java | 39 +++++++++++++++++++++------------------
1 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/opends/src/server/org/opends/server/tools/ExportLDIF.java b/opends/src/server/org/opends/server/tools/ExportLDIF.java
index 10e83d6..90d515e 100644
--- a/opends/src/server/org/opends/server/tools/ExportLDIF.java
+++ b/opends/src/server/org/opends/server/tools/ExportLDIF.java
@@ -63,6 +63,7 @@
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ToolMessages.*;
+import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -120,8 +121,10 @@
// Create the command-line argument parser for use with this program.
+ String toolDescription = getMessage(MSGID_LDIFEXPORT_TOOL_DESCRIPTION);
ArgumentParser argParser =
- new ArgumentParser("org.opends.server.tools.ExportLDIF", false);
+ new ArgumentParser("org.opends.server.tools.ExportLDIF",
+ toolDescription, false);
// Initialize all the command-line argument types and register them with the
@@ -243,7 +246,7 @@
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_ARGS;
String message = getMessage(msgID, ae.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
@@ -258,7 +261,7 @@
int msgID = MSGID_LDIFEXPORT_ERROR_PARSING_ARGS;
String message = getMessage(msgID, ae.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
System.err.println(argParser.getUsage());
return 1;
}
@@ -284,7 +287,7 @@
{
int msgID = MSGID_LDIFEXPORT_SERVER_BOOTSTRAP_ERROR;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
@@ -297,14 +300,14 @@
{
int msgID = MSGID_LDIFEXPORT_CANNOT_LOAD_CONFIG;
String message = getMessage(msgID, ie.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (Exception e)
{
int msgID = MSGID_LDIFEXPORT_CANNOT_LOAD_CONFIG;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
@@ -319,21 +322,21 @@
{
int msgID = MSGID_LDIFEXPORT_CANNOT_LOAD_SCHEMA;
String message = getMessage(msgID, ce.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (InitializationException ie)
{
int msgID = MSGID_LDIFEXPORT_CANNOT_LOAD_SCHEMA;
String message = getMessage(msgID, ie.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (Exception e)
{
int msgID = MSGID_LDIFEXPORT_CANNOT_LOAD_SCHEMA;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
@@ -348,21 +351,21 @@
{
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_CORE_CONFIG;
String message = getMessage(msgID, ce.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (InitializationException ie)
{
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_CORE_CONFIG;
String message = getMessage(msgID, ie.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (Exception e)
{
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_CORE_CONFIG;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
@@ -376,21 +379,21 @@
{
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_CRYPTO_MANAGER;
String message = getMessage(msgID, ce.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (InitializationException ie)
{
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_CRYPTO_MANAGER;
String message = getMessage(msgID, ie.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (Exception e)
{
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_CRYPTO_MANAGER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
@@ -413,21 +416,21 @@
{
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_PLUGINS;
String message = getMessage(msgID, ce.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (InitializationException ie)
{
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_PLUGINS;
String message = getMessage(msgID, ie.getMessage());
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (Exception e)
{
int msgID = MSGID_LDIFEXPORT_CANNOT_INITIALIZE_PLUGINS;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
- System.err.println(message);
+ System.err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
--
Gitblit v1.10.0