From 3b03a464c4fac21684584a934fdf2c5287b48859 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Tue, 17 Jul 2007 15:37:09 +0000
Subject: [PATCH] Fix issue 1923: dsconfig - provide better help when users attempt to reset a mandatory property.

---
 opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java
index 52af844..db45bcc 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java
@@ -293,6 +293,30 @@
 
 
   /**
+   * Creates an argument exception which should be used when an
+   * attempt is made to reset a mandatory property that does not have
+   * any default values.
+   *
+   * @param d
+   *          The managed object definition.
+   * @param name
+   *          The name of the mandatory property.
+   * @param setOption
+   *          The name of the option which should be used to set the
+   *          property's values.
+   * @return Returns an argument exception.
+   */
+  public static ArgumentException unableToResetMandatoryProperty(
+      AbstractManagedObjectDefinition d, String name, String setOption) {
+    int msgID = MSGID_DSCFG_ERROR_UNABLE_TO_RESET_MANDATORY_PROPERTY;
+    String message = getMessage(msgID, d.getUserFriendlyPluralName(), name,
+        setOption);
+    return new ArgumentException(msgID, message);
+  }
+
+
+
+  /**
    * Creates an argument exception which should be used when a
    * property name is not recognized.
    *

--
Gitblit v1.10.0