From 9a8d97c273430b8eb0ab9afc4209f555321da4e8 Mon Sep 17 00:00:00 2001
From: jarnou <jarnou@localhost>
Date: Mon, 09 Jul 2007 16:13:16 +0000
Subject: [PATCH] Bug: 1428 Synopsis: import-ldif could allow to write skipped entries to a specified file

---
 opends/src/server/org/opends/server/messages/UtilityMessages.java |   32 ++++++++++++++++++++++++++++++--
 1 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/messages/UtilityMessages.java b/opends/src/server/org/opends/server/messages/UtilityMessages.java
index 20f612e..81c0768 100644
--- a/opends/src/server/org/opends/server/messages/UtilityMessages.java
+++ b/opends/src/server/org/opends/server/messages/UtilityMessages.java
@@ -1667,8 +1667,6 @@
   public static final int MSGID_RENAMEFILE_CANNOT_DELETE_TARGET =
        CATEGORY_MASK_UTIL | SEVERITY_MASK_SEVERE_ERROR | 158;
 
-
-
   /**
    * The message ID for the message that will be used if a client certificate is
    * rejected because it is expired.  This takes two arguments, which are the
@@ -1727,6 +1725,28 @@
 
 
   /**
+   * The message ID for the message that will be used if an attempt is made to
+   * write a skip file but the specified file already exists.  This takes a
+   * single argument, which is the name of the file.
+   */
+  public static final int MSGID_SKIP_FILE_EXISTS =
+       CATEGORY_MASK_UTIL | SEVERITY_MASK_SEVERE_ERROR | 164;
+
+
+  /**
+   * The message ID for the message that will be used if an attempt is made to
+   * read an LDIF entry, but that entry does not match the criteria.
+   * This takes three arguments, which are the DN of the entry,
+   * the starting line number for the entry, and a message that explains why
+   * it does not match the criteria.
+   */
+  public static final int MSGID_LDIF_SKIP =
+       CATEGORY_MASK_UTIL | SEVERITY_MASK_MILD_ERROR | 165;
+
+
+
+
+  /**
    * Associates a set of generic messages with the message IDs defined in this
    * class.
    */
@@ -1812,6 +1832,10 @@
                     "Entry %s read from LDIF starting at line %d is not " +
                     "valid because it violates the server's schema " +
                     "configuration:  %s");
+    registerMessage(MSGID_LDIF_SKIP,
+                    "Skipping entry %s because the DN is not one that " +
+                    "should be included based on the include and " +
+                    "exclude branches");
     registerMessage(MSGID_LDIF_FILE_EXISTS,
                     "The specified LDIF file %s already exists and the " +
                     "export configuration indicates that no attempt should " +
@@ -1829,6 +1853,10 @@
                     "The specified reject file %s already exists and the " +
                     "import configuration indicates that no attempt should " +
                     "be made to append to or replace the file");
+    registerMessage(MSGID_SKIP_FILE_EXISTS,
+                    "The specified skip file %s already exists and the " +
+                    "import configuration indicates that no attempt should " +
+                    "be made to append to or replace the file");
     registerMessage(MSGID_LDIF_COULD_NOT_EVALUATE_FILTERS_FOR_IMPORT,
                     "An error occurred while attempting to determine whether " +
                     "LDIF entry \"%s\" starting at line %d should be " +

--
Gitblit v1.10.0