mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

lutoff
22.15.2007 8cd8c946396fe06bbdf39019accb753395ad7962
Add properties file support for tasks (import, export, backup restore)
2 files modified
28 ■■■■■ changed files
opends/src/server/org/opends/server/tools/tasks/TaskTool.java 18 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/tools/ImportLDIFTestCase.java 10 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/tasks/TaskTool.java
@@ -27,6 +27,7 @@
package org.opends.server.tools.tasks;
import org.opends.server.util.args.BooleanArgument;
import org.opends.server.util.args.LDAPConnectionArgumentParser;
import org.opends.server.util.args.ArgumentException;
import org.opends.server.util.args.StringArgument;
@@ -39,6 +40,7 @@
import org.opends.server.tools.LDAPConnection;
import org.opends.server.tools.LDAPConnectionException;
import static org.opends.server.tools.ToolConstants.*;
import org.opends.server.types.LDAPException;
import org.opends.server.types.OpenDsException;
import org.opends.server.core.DirectoryServer;
@@ -131,6 +133,20 @@
            INFO_DESCRIPTION_TASK_TASK_ARGS.get(), 1000);
    try {
      StringArgument propertiesFileArgument = new StringArgument(
          "propertiesFilePath",
          null, OPTION_LONG_PROP_FILE_PATH,
          false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null,
          INFO_DESCRIPTION_PROP_FILE_PATH.get());
      argParser.addArgument(propertiesFileArgument);
      argParser.setFilePropertiesArgument(propertiesFileArgument);
     BooleanArgument noPropertiesFileArgument = new BooleanArgument(
          "noPropertiesFileArgument", null, OPTION_LONG_NO_PROP_FILE,
          INFO_DESCRIPTION_NO_PROP_FILE.get());
     argParser.addArgument(noPropertiesFileArgument);
     argParser.setNoPropertiesFileArgument(noPropertiesFileArgument);
      startArg = new StringArgument(
              OPTION_LONG_START_DATETIME,
              OPTION_SHORT_START_DATETIME,
@@ -267,7 +283,7 @@
        try {
          start = StaticUtils.parseDateTimeString(startArg.getValue());
        } catch (ParseException pe) {
          // ignore; valiidated in validateTaskArgs()
          // ignore; validated in validateTaskArgs()
        }
      }
    }
opends/tests/unit-tests-testng/src/server/org/opends/server/tools/ImportLDIFTestCase.java
@@ -115,6 +115,7 @@
    String[] args =
    {
      "-f",configFilePath,
      "--noPropertiesFile",
      "-l",ldifFilePath,
      "-R", rejectFilePath,
      "-n", beID,
@@ -142,6 +143,7 @@
    String[] args =
    {
      "-f",configFilePath,
      "--noPropertiesFile",
      "-l",ldifFilePath,
      "-R", rejectFilePath,
      "-n", beID,
@@ -178,6 +180,7 @@
    String[] args =
    {
      "-f", DirectoryServer.getConfigFile(),
      "--noPropertiesFile",
      "-l",ldifFilePath,
      "-n", beID,
      "-R", rejectFilePath
@@ -213,6 +216,7 @@
    String[] args =
    {
      "-f", DirectoryServer.getConfigFile(),
      "--noPropertiesFile",
      "-l", ldifFilePath,
      "-b", baseDN,
      "-R", rejectFilePath
@@ -250,6 +254,7 @@
    String[] args =
    {
      "-f", DirectoryServer.getConfigFile(),
      "--noPropertiesFile",
      "-l",ldifFilePath,
      "-n", beID,
      "-R",rejectFilePath,
@@ -282,6 +287,7 @@
    String[] args =
    {
      "-f", DirectoryServer.getConfigFile(),
      "--noPropertiesFile",
      "-l",ldifFilePath,
      "-n", beID,
      "-R",rejectFilePath,
@@ -308,6 +314,7 @@
    String[] args =
    {
      "-f", DirectoryServer.getConfigFile(),
      "--noPropertiesFile",
      "-l",ldifFilePath,
      "-n", beID,
      "-R",rejectFilePath,
@@ -339,6 +346,7 @@
    String[] args =
    {
      "-f", DirectoryServer.getConfigFile(),
      "--noPropertiesFile",
      "-l",ldifFilePath,
      "-n", beID,
      "-R",rejectFilePath,
@@ -370,6 +378,7 @@
    String[] args =
    {
      "-f", DirectoryServer.getConfigFile(),
      "--noPropertiesFile",
      "-l",ldifFilePath,
      "-n", beID,
      "-R",rejectFilePath,
@@ -409,6 +418,7 @@
    String[] args =
    {
      "-f", DirectoryServer.getConfigFile(),
      "--noPropertiesFile",
      "-l",ldifFilePath,
      "-n", beID,
      "-R",rejectFilePath,