From b09a646bc0b4e37e94eba36ff99cb33544ec3d73 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Mon, 31 Oct 2016 14:00:38 +0000
Subject: [PATCH] OPENDJ-2772 Create ldapdelete tool in the sdk

---
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_pl.properties    |    3 
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_CN.properties |    3 
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ca_ES.properties |    3 
 opendj-ldap-toolkit/src/main/assembly/bat/ldapdelete.bat                                      |   22 +++
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_de.properties    |    3 
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_fr.properties    |    3 
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ko.properties    |    3 
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools.properties       |   15 ++
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_es.properties    |    3 
 opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPModify.java             |   11 -
 opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java                  |    9 +
 opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPDelete.java             |  256 ++++++++++++++++++++++++++++++++++++
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_TW.properties |    3 
 opendj-ldap-toolkit/src/main/assembly/bin/ldapdelete                                          |   27 +++
 opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ja.properties    |    3 
 15 files changed, 357 insertions(+), 10 deletions(-)

diff --git a/opendj-ldap-toolkit/src/main/assembly/bat/ldapdelete.bat b/opendj-ldap-toolkit/src/main/assembly/bat/ldapdelete.bat
new file mode 100644
index 0000000..53b19e8
--- /dev/null
+++ b/opendj-ldap-toolkit/src/main/assembly/bat/ldapdelete.bat
@@ -0,0 +1,22 @@
+
+@echo off
+rem The contents of this file are subject to the terms of the Common Development and
+rem Distribution License (the License). You may not use this file except in compliance with the
+rem License.
+rem
+rem You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+rem specific language governing permission and limitations under the License.
+rem
+rem When distributing Covered Software, include this CDDL Header Notice in each file and include
+rem the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+rem Header, with the fields enclosed by brackets [] replaced by your own identifying
+rem information: "Portions Copyright [year] [name of copyright owner]".
+rem
+rem Copyright 2006-2008 Sun Microsystems, Inc.
+rem Portions Copyright 2011-2016 ForgeRock AS.
+
+setlocal
+
+set OPENDJ_INVOKE_CLASS="com.forgerock.opendj.ldap.tools.LDAPDelete"
+set SCRIPT_NAME=ldapdelete
+call "%~dp0\..\lib\_client-script.bat" %*
diff --git a/opendj-ldap-toolkit/src/main/assembly/bin/ldapdelete b/opendj-ldap-toolkit/src/main/assembly/bin/ldapdelete
new file mode 100644
index 0000000..bf75b23
--- /dev/null
+++ b/opendj-ldap-toolkit/src/main/assembly/bin/ldapdelete
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2006-2008 Sun Microsystems, Inc.
+# Portions Copyright 2011-2016 ForgeRock AS.
+
+
+# This script may be used to perform LDAP compare operations.
+OPENDJ_INVOKE_CLASS="com.forgerock.opendj.ldap.tools.LDAPDelete"
+export OPENDJ_INVOKE_CLASS
+
+SCRIPT_NAME="ldapdelete"
+export SCRIPT_NAME
+
+SCRIPT_DIR=`dirname "${0}"`
+"${SCRIPT_DIR}/../lib/_client-script.sh" "${@}"
diff --git a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPDelete.java b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPDelete.java
new file mode 100644
index 0000000..dd8169a
--- /dev/null
+++ b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPDelete.java
@@ -0,0 +1,256 @@
+/*
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
+ *
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
+ *
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
+ *
+ * Copyright 2006-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2012-2016 ForgeRock AS.
+ */
+package com.forgerock.opendj.ldap.tools;
+
+import static com.forgerock.opendj.cli.ArgumentConstants.USE_SYSTEM_STREAM_TOKEN;
+import static com.forgerock.opendj.cli.CommonArguments.continueOnErrorArgument;
+import static com.forgerock.opendj.cli.CommonArguments.controlArgument;
+import static com.forgerock.opendj.cli.CommonArguments.ldapVersionArgument;
+import static com.forgerock.opendj.cli.CommonArguments.noOpArgument;
+import static com.forgerock.opendj.ldap.tools.LDAPToolException.newToolException;
+import static com.forgerock.opendj.ldap.tools.LDAPToolException.newToolParamException;
+import static com.forgerock.opendj.ldap.tools.ToolsMessages.*;
+import static com.forgerock.opendj.cli.CommonArguments.noPropertiesFileArgument;
+import static com.forgerock.opendj.cli.CommonArguments.propertiesFileArgument;
+import static com.forgerock.opendj.cli.CommonArguments.showUsageArgument;
+import static com.forgerock.opendj.cli.CommonArguments.verboseArgument;
+import static com.forgerock.opendj.cli.ToolVersionHandler.newSdkVersionHandler;
+import static com.forgerock.opendj.cli.Utils.filterExitCode;
+import static com.forgerock.opendj.ldap.tools.Utils.addControlsToRequest;
+import static com.forgerock.opendj.ldap.tools.Utils.ensureLdapProtocolVersionIsSupported;
+import static com.forgerock.opendj.ldap.tools.Utils.getConnection;
+import static com.forgerock.opendj.ldap.tools.Utils.printErrorMessage;
+import static com.forgerock.opendj.ldap.tools.Utils.printSuccessMessage;
+import static com.forgerock.opendj.ldap.tools.Utils.readControls;
+import static org.forgerock.i18n.LocalizableMessage.raw;
+
+import com.forgerock.opendj.cli.ArgumentException;
+import com.forgerock.opendj.cli.BooleanArgument;
+import com.forgerock.opendj.cli.ConnectionFactoryProvider;
+import com.forgerock.opendj.cli.ConsoleApplication;
+import com.forgerock.opendj.cli.IntegerArgument;
+import com.forgerock.opendj.cli.StringArgument;
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.ldap.Connection;
+import org.forgerock.opendj.ldap.LdapException;
+import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.opendj.ldap.controls.Control;
+import org.forgerock.opendj.ldap.controls.SubtreeDeleteRequestControl;
+import org.forgerock.opendj.ldap.requests.DeleteRequest;
+import org.forgerock.opendj.ldap.requests.Requests;
+import org.forgerock.opendj.ldap.responses.Result;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/** A tool that can be used to issue delete requests to the Directory Server. */
+public final class LDAPDelete extends ConsoleApplication {
+
+    /**
+     * The main method for ldapdelete tool.
+     *
+     * @param args
+     *            The command-line arguments provided to this program.
+     */
+    public static void main(final String[] args) {
+        System.exit(filterExitCode(run(System.out, System.err, args)));
+    }
+
+    /**
+     * Run {@link LDAPDelete} tool with the provided arguments.
+     * Output and errors will be written on the provided streams.
+     * This method can be used to run the tool programmatically.
+     *
+     * @param out
+     *      {@link PrintStream} which will be used by the tool to write results and information messages.
+     * @param err
+     *      {@link PrintStream} which will be used by the tool to write errors.
+     * @param args
+     *      Arguments set to pass to the tool.
+     * @return
+     *      An integer which represents the result code of the tool.
+     */
+    public static int run(final PrintStream out, final PrintStream err, final String... args) {
+        final LDAPDelete ldapDelete = new LDAPDelete(out, err);
+        try {
+            return ldapDelete.run(args);
+        } catch (final LDAPToolException e) {
+            e.printErrorMessage(ldapDelete);
+            return e.getResultCode();
+        }
+    }
+
+    private LDAPDelete(final PrintStream out, final PrintStream err) {
+        super(out, err);
+    }
+
+    private BooleanArgument verbose;
+
+    @Override
+    public boolean isInteractive() {
+        return false;
+    }
+
+    @Override
+    public boolean isVerbose() {
+        return verbose.isPresent();
+    }
+
+    private int run(String[] args) throws LDAPToolException {
+        // Create the command-line argument parser for use with this program.
+        final LocalizableMessage toolDescription = INFO_LDAPDELETE_TOOL_DESCRIPTION.get();
+        final LDAPToolArgumentParser argParser = LDAPToolArgumentParser.builder(LDAPDelete.class.getName())
+                .toolDescription(toolDescription)
+                .trailingArguments(0, 1, "[DN]")
+                .build();
+        argParser.setVersionHandler(newSdkVersionHandler());
+        argParser.setShortToolDescription(REF_SHORT_DESC_LDAPDELETE.get());
+
+        ConnectionFactoryProvider connectionFactoryProvider;
+
+        final BooleanArgument continueOnError;
+        final BooleanArgument deleteSubtree;
+        final BooleanArgument dryRun;
+        final BooleanArgument showUsage;
+        final IntegerArgument ldapProtocolVersion;
+        final StringArgument controlStr;
+        final StringArgument propertiesFileArgument;
+        final BooleanArgument noPropertiesFileArgument;
+
+        try {
+            connectionFactoryProvider = new ConnectionFactoryProvider(argParser, this);
+
+            propertiesFileArgument = propertiesFileArgument();
+            argParser.addArgument(propertiesFileArgument);
+            argParser.setFilePropertiesArgument(propertiesFileArgument);
+
+            noPropertiesFileArgument = noPropertiesFileArgument();
+            argParser.addArgument(noPropertiesFileArgument);
+            argParser.setNoPropertiesFileArgument(noPropertiesFileArgument);
+
+            deleteSubtree =
+                    BooleanArgument.builder("deleteSubtree")
+                            .shortIdentifier('x')
+                            .description(INFO_DELETE_DESCRIPTION_DELETE_SUBTREE.get())
+                            .buildAndAddToParser(argParser);
+
+            continueOnError = continueOnErrorArgument();
+            argParser.addArgument(continueOnError);
+
+            controlStr = controlArgument();
+            argParser.addArgument(controlStr);
+
+            ldapProtocolVersion = ldapVersionArgument();
+            argParser.addArgument(ldapProtocolVersion);
+
+            dryRun = noOpArgument();
+            argParser.addArgument(dryRun);
+
+            verbose = verboseArgument();
+            argParser.addArgument(verbose);
+
+            showUsage = showUsageArgument();
+            argParser.addArgument(showUsage);
+            argParser.setUsageArgument(showUsage, getOutputStream());
+        } catch (final ArgumentException ae) {
+            throw newToolParamException(ae, ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()));
+        }
+
+
+        argParser.parseArguments(args, getErrStream(), connectionFactoryProvider);
+        if (argParser.usageOrVersionDisplayed()) {
+            return ResultCode.SUCCESS.intValue();
+        }
+        ensureLdapProtocolVersionIsSupported(ldapProtocolVersion);
+
+        final List<Control> controls = readControls(controlStr);
+        if (deleteSubtree.isPresent()) {
+            controls.add(SubtreeDeleteRequestControl.newControl(false));
+        }
+
+        try (final Connection connection = getConnection(argParser.getConnectionFactory(),
+                                                         argParser.getBindRequest(),
+                                                         dryRun,
+                                                         this)) {
+            final List<DeleteRequest> deleteRequests = createDeleteRequests(argParser.getTrailingArguments(), controls);
+
+            for (final DeleteRequest deleteRequest : deleteRequests) {
+                final String dnToRemove = deleteRequest.getName().toString();
+                println(INFO_PROCESSING_OPERATION.get("DELETE", dnToRemove));
+                if (!dryRun.isPresent()) {
+                    Result result;
+                    try {
+                        result = connection.delete(deleteRequest);
+                    } catch (final LdapException e) {
+                        result = e.getResult();
+                    }
+
+                    final ResultCode resultCode = result.getResultCode();
+                    if (ResultCode.SUCCESS != resultCode && ResultCode.REFERRAL != resultCode) {
+                        printErrorMessage(this, result, ERR_LDAP_DELETE_FAILED);
+                        println();
+                        if (!continueOnError.isPresent()) {
+                            return resultCode.intValue();
+                        }
+                    } else {
+                        printSuccessMessage(this, result, "DELETE", dnToRemove);
+                        println();
+                    }
+                }
+            }
+        }
+        return ResultCode.SUCCESS.intValue();
+    }
+
+    private List<DeleteRequest> createDeleteRequests(final List<String> trailingArguments,
+                                                     final List<Control> controls) throws LDAPToolException {
+        try {
+            if (!trailingArguments.isEmpty()
+                    && !(trailingArguments.size() == 1 && USE_SYSTEM_STREAM_TOKEN.equals(trailingArguments.get(0)))) {
+                return Collections.singletonList(createDeleteRequestForDn(trailingArguments.get(0), controls));
+            }
+
+            final List<DeleteRequest> deleteRequests = new ArrayList<>();
+            try (final BufferedReader reader = new BufferedReader(new InputStreamReader(getInputStream()))) {
+                String dn;
+                while ((dn = reader.readLine()) != null) {
+                    deleteRequests.add(createDeleteRequestForDn(dn, controls));
+                }
+                return deleteRequests;
+            } catch (final IOException e) {
+                throw newToolException(
+                        e, ResultCode.UNDEFINED, ERR_LDAPDELETE_READING_STDIN.get(e.getLocalizedMessage()));
+            }
+
+        } catch (final IllegalArgumentException iae) {
+            throw newToolException(iae, ResultCode.INVALID_DN_SYNTAX, raw(iae.getLocalizedMessage()));
+        }
+    }
+
+    private DeleteRequest createDeleteRequestForDn(final String dnToRemove, final List<Control> controls)
+            throws LDAPToolException {
+        final DeleteRequest request = Requests.newDeleteRequest(dnToRemove);
+        addControlsToRequest(request, controls);
+        return request;
+    }
+}
+
diff --git a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPModify.java b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPModify.java
index c88640c..b963f70 100644
--- a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPModify.java
+++ b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPModify.java
@@ -23,7 +23,7 @@
 import static com.forgerock.opendj.ldap.tools.ToolsMessages.*;
 import static com.forgerock.opendj.cli.Utils.filterExitCode;
 import static com.forgerock.opendj.ldap.tools.Utils.getConnection;
-import static com.forgerock.opendj.ldap.tools.Utils.printlnTextMsg;
+import static com.forgerock.opendj.ldap.tools.Utils.printSuccessMessage;
 import static com.forgerock.opendj.ldap.tools.Utils.readAssertionControl;
 import static com.forgerock.opendj.ldap.tools.Utils.readControls;
 import static com.forgerock.opendj.ldap.tools.Utils.ensureLdapProtocolVersionIsSupported;
@@ -203,14 +203,7 @@
             if (ResultCode.SUCCESS != rc && ResultCode.REFERRAL != rc) {
                 printErrorMessage(LDAPModify.this, r, ERR_LDAP_MODIFY_FAILED);
             } else {
-                println(INFO_OPERATION_SUCCESSFUL.get(operationType, name));
-                printlnTextMsg(LDAPModify.this, r.getDiagnosticMessage());
-                final List<String> referralURIs = r.getReferralURIs();
-                if (referralURIs != null) {
-                    for (final String uri : referralURIs) {
-                        println(LocalizableMessage.raw(uri));
-                    }
-                }
+                printSuccessMessage(LDAPModify.this, r, operationType, name);
             }
 
             try {
diff --git a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java
index 198b6f0..aa4cf0c 100644
--- a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java
+++ b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java
@@ -121,6 +121,15 @@
         return rc;
     }
 
+    static void printSuccessMessage(
+            final ConsoleApplication app, final Result r, final String operationType, final String dn) {
+        app.println(INFO_OPERATION_SUCCESSFUL.get(operationType, dn));
+        printlnTextMsg(app, r.getDiagnosticMessage());
+        for (final String uri : r.getReferralURIs()) {
+            app.println(LocalizableMessage.raw(uri));
+        }
+    }
+
     static void printPasswordPolicyResults(final ConsoleApplication app, final BindResult result) {
         try {
             final AuthorizationIdentityResponseControl control = result.getControl(
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools.properties
index 8915f93..75e0fa6 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools.properties
@@ -214,7 +214,7 @@
 INFO_TIME_LIMIT_PLACEHOLDER={timeLimit}
 INFO_TARGETDN_PLACEHOLDER={targetDN}
 INFO_PSEARCH_PLACEHOLDER=ps[:changetype[:changesonly[:entrychgcontrols]]]
-ERR_LDAPCOMPARE_ERROR_READING_FILE=An error occurred reading file \
+ERR_TOOL_READING_FILE=An error occurred reading file \
  '%s'.  Check that the file exists and that you have read access rights to \
  it.  Details: %s
 ERR_LDAPCOMPARE_FILENAME_AND_DNS=Both entry DNs and a file name \
@@ -342,6 +342,7 @@
 ERR_LDAP_SEARCH_FAILED=The LDAP search request failed: %d (%s)
 ERR_LDAP_MODIFY_FAILED=The LDAP modify request failed: %d (%s)
 ERR_LDAP_COMPARE_FAILED=The LDAP compare request failed: %d (%s)
+ERR_LDAP_DELETE_FAILED=The LDAP delete request failed: %d (%s)
 #
 # AddRate Tool
 #
@@ -390,6 +391,18 @@
   Please use either 'base64 encode' or 'base64 decode'.
 ERR_BASE64_ERROR_DECODING_RAW_DATA=Unable to decode provided data: %s
 
+#
+# LDAPDelete
+#
+ERR_LDAPDELETE_FILENAME_AND_DNS=Both entry DNs and a file were provided for the delete operation. \
+ These arguments are not compatible
+ERR_LDAPDELETE_READING_STDIN=An error occurred while reading DN(s) from standard input: '%s'
+INFO_DELETE_DESCRIPTION_FILENAME=File containing the DNs of the entries to delete
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=Delete the specified entry and all entries below it
+INFO_LDAPDELETE_TOOL_DESCRIPTION=This utility can be used to perform LDAP delete operations in the Directory Server.\n \
+ If standard input is used to specify entries to remove, end your input with EOF (Ctrl+D on UNIX, Ctrl+Z on Windows)
+REF_SHORT_DESC_LDAPDELETE=perform LDAP delete operations
+
 # Strings for generated reference documentation.
 REF_SHORT_DESC_ADDRATE=measure add and delete throughput and response time
 REF_SHORT_DESC_AUTHRATE=measure bind throughput and response time
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ca_ES.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ca_ES.properties
index 2db05b0..e7da0d6 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ca_ES.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ca_ES.properties
@@ -67,3 +67,6 @@
 INFO_BASE64_RAW_FILE_DESCRIPTION=La ruta al fitxer que cont\u00e9 les dades en cru a ser codificades en base64
 INFO_BASE64_TO_ENCODED_FILE_DESCRIPTION=La ruta al fitxer on la qual les dades en base64 hauran de ser escrites
 INFO_BASE64_TO_RAW_FILE_DESCRIPTION=La ruta al fitxer on la qual les dades en cru descodificades de la base64 hauran de ser escrites
+INFO_DELETE_DESCRIPTION_FILENAME=Fitxer que cont\u00e9 els DNs de les entrades per eliminar
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=Eliminar l'entrada especificada i totes les entrades seg\u00fcents a ella
+INFO_LDAPDELETE_TOOL_DESCRIPTION=Aquesta utilitat pot utilitzar-se per realitzar operacions d'eliminaci\u00f3 LDAP en el servidor de directori
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_de.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_de.properties
index 1fcc9c9..e98a8ce 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_de.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_de.properties
@@ -123,3 +123,6 @@
 ERR_BASE64_CANNOT_READ_ENCODED_DATA=Fehler beim Versuch, mit Base64 verschl\u00fcsselten Daten zu lesen:  %s
 ERR_BASE64_CANNOT_WRITE_RAW_DATA=Fehler beim Versuch, die entschl\u00fcsselten Daten zu schreiben:  %s
 ERR_BASE64_UNKNOWN_SUBCOMMAND=Unbekannter Unterbefehl %s
+INFO_DELETE_DESCRIPTION_FILENAME=Datei mit den DNs der zu l\u00f6schenden Eintr\u00e4ge
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=Angegebenen Eintrag und alle Untereintr\u00e4ge l\u00f6schen
+INFO_LDAPDELETE_TOOL_DESCRIPTION=Dieses Dienstprogramm dient zur Durchf\u00fchrung von LDAP-L\u00f6schvorg\u00e4ngen im Directory-Server
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_es.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_es.properties
index d53e0f0..12373da 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_es.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_es.properties
@@ -125,3 +125,6 @@
 ERR_BASE64_CANNOT_READ_ENCODED_DATA=Se ha producido un error al tratar de leer los datos codificados en base64:  %s
 ERR_BASE64_CANNOT_WRITE_RAW_DATA=Se ha producido un error al tratar de escribir los datos descodificados:  %s
 ERR_BASE64_UNKNOWN_SUBCOMMAND=Subcomando desconocido %s
+INFO_DELETE_DESCRIPTION_FILENAME=Archivo que contiene los ND de las entradas que eliminar
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=Eliminar la entrada especificada y todas las entradas que hay debajo
+INFO_LDAPDELETE_TOOL_DESCRIPTION=Esta utilidad se puede utilizar para realizar operaciones de eliminaci\u00f3n de LDAP en Directory Server
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_fr.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_fr.properties
index 63320b2..dcedb9b 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_fr.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_fr.properties
@@ -126,3 +126,6 @@
 ERR_BASE64_CANNOT_WRITE_RAW_DATA=Une erreur s'est produite lors de la tentative d'\u00e9criture des donn\u00e9es d\u00e9cod\u00e9es\u00a0: %s
 ERR_BASE64_UNKNOWN_SUBCOMMAND=Sous-commande inconnue %s
 INFO_DATA_PLACEHOLDER={donn\u00e9es}
+INFO_DELETE_DESCRIPTION_FILENAME=Fichier contenant les DN des entr\u00e9es \u00e0 supprimer
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=Supprimer l'entr\u00e9e sp\u00e9cifi\u00e9e et toutes les entr\u00e9es en dessous d'elle
+INFO_LDAPDELETE_TOOL_DESCRIPTION=Cet utilitaire permet d'effectuer des op\u00e9rations de suppression de LDAP dans Directory Server
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ja.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ja.properties
index 4a9aa1a..ae076f3 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ja.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ja.properties
@@ -123,3 +123,6 @@
 ERR_BASE64_CANNOT_READ_ENCODED_DATA=Base64 \u3067\u7b26\u53f7\u5316\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306e\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f:  %s
 ERR_BASE64_CANNOT_WRITE_RAW_DATA=\u5fa9\u53f7\u5316\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306e\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f:  %s
 ERR_BASE64_UNKNOWN_SUBCOMMAND=\u4e0d\u660e\u306a\u30b5\u30d6\u30b3\u30de\u30f3\u30c9 %s
+INFO_DELETE_DESCRIPTION_FILENAME=\u524a\u9664\u3059\u308b\u30a8\u30f3\u30c8\u30ea\u306e DN \u3092\u542b\u3080\u30d5\u30a1\u30a4\u30eb
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=\u6307\u5b9a\u3055\u308c\u305f\u30a8\u30f3\u30c8\u30ea\u304a\u3088\u3073\u305d\u306e\u4e0b\u4f4d\u306e\u30a8\u30f3\u30c8\u30ea\u3059\u3079\u3066\u3092\u524a\u9664\u3057\u307e\u3059
+INFO_LDAPDELETE_TOOL_DESCRIPTION=\u3053\u306e\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30fc\u3092\u4f7f\u3063\u3066\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30b5\u30fc\u30d0\u30fc\u5185\u3067 LDAP \u524a\u9664\u64cd\u4f5c\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ko.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ko.properties
index 979025a..1af1d70 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ko.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_ko.properties
@@ -120,3 +120,6 @@
 ERR_BASE64_CANNOT_READ_ENCODED_DATA=base64\ub85c \uc778\ucf54\ub529\ub41c \ub370\uc774\ud130\ub97c \uc77d\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
 ERR_BASE64_CANNOT_WRITE_RAW_DATA=\ud574\ub3c5\ub41c \ub370\uc774\ud130\ub97c \uc4f0\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
 ERR_BASE64_UNKNOWN_SUBCOMMAND=\uc54c \uc218 \uc5c6\ub294 \ud558\uc704 \uba85\ub839 %s\uc785\ub2c8\ub2e4.
+INFO_DELETE_DESCRIPTION_FILENAME=\uc0ad\uc81c\ud560 \ud56d\ubaa9\uc758 DN\uc744 \ud3ec\ud568\ud558\ub294 \ud30c\uc77c
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=\uc9c0\uc815\ub41c \ud56d\ubaa9\uacfc \uadf8 \uc544\ub798\uc758 \ubaa8\ub4e0 \ud56d\ubaa9\uc744 \uc0ad\uc81c\ud569\ub2c8\ub2e4.
+INFO_LDAPDELETE_TOOL_DESCRIPTION=\uc774 \uc720\ud2f8\ub9ac\ud2f0\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub514\ub809\ud1a0\ub9ac \uc11c\ubc84\uc5d0\uc11c LDAP \uc0ad\uc81c \uc791\uc5c5\uc744 \uc218\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_pl.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_pl.properties
index f34db25..f7b03a7 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_pl.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_pl.properties
@@ -68,3 +68,6 @@
 INFO_BASE64_TO_RAW_FILE_DESCRIPTION=\u015acie\u017cka do pliku do kt\u00f3rego zdekodowane dane maj\u0105 by\u0107 zapisane
 INFO_BASE64_TO_ENCODED_FILE_DESCRIPTION=\u015acie\u017cka do pliku do kt\u00f3rego dane zakodowane base64 maj\u0105 by\u0107 zapisane
 INFO_BASE64_ENCODED_FILE_DESCRIPTION=\u015acie\u017cka do pliku zawieraj\u0105cego dane zakodowane base64, kt\u00f3re maj\u0105 by\u0107 zdekodowane
+INFO_LDAPDELETE_TOOL_DESCRIPTION=To narz\u0119dzie mo\u017ce by\u0107 u\u017cyte do przeprowadzenia operacji usuni\u0119cia LDAP na Directory Server
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=Usu\u0144 podany wpis i wszystkie wpisy poni\u017cej niego
+INFO_DELETE_DESCRIPTION_FILENAME=Plik zawieraj\u0105cy DNy wpis\u00f3w do usuni\u0119cia
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_CN.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_CN.properties
index 6974c8e..6b37908 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_CN.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_CN.properties
@@ -123,3 +123,6 @@
 ERR_BASE64_CANNOT_READ_ENCODED_DATA=\u5728\u5c1d\u8bd5\u8bfb\u53d6 base64 \u7f16\u7801\u7684\u6570\u636e\u65f6\u51fa\u73b0\u9519\u8bef: %s
 ERR_BASE64_CANNOT_WRITE_RAW_DATA=\u5728\u5c1d\u8bd5\u5199\u5165\u89e3\u7801\u7684\u6570\u636e\u65f6\u51fa\u73b0\u9519\u8bef: %s
 ERR_BASE64_UNKNOWN_SUBCOMMAND=\u672a\u77e5\u5b50\u547d\u4ee4 %s
+INFO_DELETE_DESCRIPTION_FILENAME=\u5305\u542b\u8981\u5220\u9664\u7684\u6761\u76ee DN \u7684\u6587\u4ef6
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=\u5220\u9664\u6307\u5b9a\u6761\u76ee\u53ca\u5176\u4e0b\u9762\u7684\u6240\u6709\u6761\u76ee
+INFO_LDAPDELETE_TOOL_DESCRIPTION=\u6b64\u5b9e\u7528\u7a0b\u5e8f\u53ef\u7528\u4e8e\u5728\u76ee\u5f55\u670d\u52a1\u5668\u4e2d\u6267\u884c LDAP \u5220\u9664\u64cd\u4f5c
diff --git a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_TW.properties b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_TW.properties
index e75c752..7ceb85c 100644
--- a/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_TW.properties
+++ b/opendj-ldap-toolkit/src/main/resources/com/forgerock/opendj/ldap/tools/tools_zh_TW.properties
@@ -120,3 +120,6 @@
 ERR_BASE64_CANNOT_READ_ENCODED_DATA=\u5617\u8a66\u8b80\u53d6 base64 \u7de8\u78bc\u7684\u8cc7\u6599\u6642\u767c\u751f\u932f\u8aa4: %s
 ERR_BASE64_CANNOT_WRITE_RAW_DATA=\u5617\u8a66\u5beb\u5165\u5df2\u89e3\u78bc\u7684\u8cc7\u6599\u6642\u767c\u751f\u932f\u8aa4: %s
 ERR_BASE64_UNKNOWN_SUBCOMMAND=\u4e0d\u660e\u7684\u5b50\u6307\u4ee4 %s
+INFO_DELETE_DESCRIPTION_FILENAME=\u542b\u6709\u8981\u522a\u9664\u4e4b\u9805\u76ee DN \u7684\u6a94\u6848
+INFO_DELETE_DESCRIPTION_DELETE_SUBTREE=\u522a\u9664\u6307\u5b9a\u7684\u9805\u76ee\u53ca\u5176\u4e0b\u6240\u6709\u7684\u9805\u76ee
+INFO_LDAPDELETE_TOOL_DESCRIPTION=\u6b64\u516c\u7528\u7a0b\u5f0f\u53ef\u7528\u65bc\u57f7\u884c\u76ee\u9304\u4f3a\u670d\u5668\u4e2d\u7684 LDAP \u522a\u9664\u4f5c\u696d

--
Gitblit v1.10.0