From 974cbbeaa39873742bdfdaca8d6f3ddb868cf36c Mon Sep 17 00:00:00 2001
From: Maxim Thomas <maxim.thomas@gmail.com>
Date: Thu, 17 Oct 2024 12:31:21 +0000
Subject: [PATCH] [#431] Update importldiff --offline and --clearBacked flags descriptions (#437)
---
opendj-server-legacy/src/main/java/org/opends/server/tools/tasks/TaskTool.java | 9 +++++++--
opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java | 5 +++++
opendj-server-legacy/src/messages/org/opends/messages/tool.properties | 5 ++++-
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java
index 9144252..28edc66 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java
@@ -243,6 +243,11 @@
return process(argParser, initializeServer, out, err);
}
+ @Override
+ protected LocalizableMessage getOfflineDescriptionMessage() {
+ return INFO_LDIFIMPORT_DESCRIPTION_RUN_OFFLINE.get();
+ }
+
private void createArguments(LDAPConnectionArgumentParser argParser) throws ArgumentException
{
configFile =
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/tasks/TaskTool.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/tasks/TaskTool.java
index 44e8515..cefc150 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/tasks/TaskTool.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/tasks/TaskTool.java
@@ -157,8 +157,9 @@
}
runOfflineArg = BooleanArgument.builder("offline")
- .description(INFO_DESCRIPTION_RUN_OFFLINE.get())
- .buildAndAddToParser(argParser);
+ .description(getOfflineDescriptionMessage())
+ .buildAndAddToParser(argParser);
+
} catch (ArgumentException e) {
// should never happen
}
@@ -166,6 +167,10 @@
return argParser;
}
+ protected LocalizableMessage getOfflineDescriptionMessage() {
+ return INFO_DESCRIPTION_RUN_OFFLINE.get();
+ }
+
/**
* Validates arguments related to task scheduling. This should be
* called after the <code>ArgumentParser.parseArguments</code> has
diff --git a/opendj-server-legacy/src/messages/org/opends/messages/tool.properties b/opendj-server-legacy/src/messages/org/opends/messages/tool.properties
index 89347db..b488fc1 100644
--- a/opendj-server-legacy/src/messages/org/opends/messages/tool.properties
+++ b/opendj-server-legacy/src/messages/org/opends/messages/tool.properties
@@ -1682,7 +1682,8 @@
ERR_CONFIGDS_PORT_ALREADY_SPECIFIED_1211=ERROR: You have specified \
the value %s for different ports
INFO_LDIFIMPORT_DESCRIPTION_CLEAR_BACKEND_1251=Remove all entries for all \
- base DNs in the backend before importing
+ base DNs in the backend before importing. Set to `true` when running in the offline mode \
+ (i.e. the `--offline` flag is set)
ERR_LDIFIMPORT_MISSING_BACKEND_ARGUMENT_1252=Neither the %s or the %s \
argument was provided. One of these arguments must be given to specify the \
backend for the LDIF data to be imported to
@@ -1984,6 +1985,8 @@
commands will use the java arguments and java home specified in the \
properties file located in %s
INFO_DESCRIPTION_RUN_OFFLINE_1496=Indicates that the command must be run in offline mode
+INFO_LDIFIMPORT_DESCRIPTION_RUN_OFFLINE_14960=Indicates that the command must be run in offline mode. \
+ Forces old data replacement with imported data.
ERR_BACKUPDB_REPEATED_BACKEND_ID_1497=The backend ID '%s' has been \
specified several times
ERR_INSTALLDS_EMPTY_DN_RESPONSE_1498=ERROR: The empty LDAP DN is not \
--
Gitblit v1.10.0