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 9144252f6a..28edc66c62 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 @@ else if (! templateFile.isPresent()) 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 44e8515abb..cefc15041d 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 @@ protected LDAPConnectionArgumentParser createArgParser(String className, } 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 @@ protected LDAPConnectionArgumentParser createArgParser(String className, return argParser; } + protected LocalizableMessage getOfflineDescriptionMessage() { + return INFO_DESCRIPTION_RUN_OFFLINE.get(); + } + /** * Validates arguments related to task scheduling. This should be * called after the ArgumentParser.parseArguments 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 89347dbd0a..b488fc1336 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 @@ INFO_DESCRIPTION_PWPSTATE_CLEAR_PASSWORD_HISTORY_1203=Clear password history \ 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 @@ INFO_JAVAPROPERTIES_SUCCESSFUL_1495=The operation was successful. The server \ 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 \