From 025e4068faf844653d6cf1401c16955f70df37ed Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Tue, 31 Jul 2007 12:48:50 +0000
Subject: [PATCH] Fix issue 1991: dsconfig: split "component" field in list-properties
---
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 52 insertions(+), 1 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 b9d6399..2bfd17a 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
@@ -421,6 +421,22 @@
/**
* Creates an argument exception which should be used when a
+ * component category argument is not recognized.
+ *
+ * @param categoryName
+ * The unrecognized component category.
+ * @return Returns an argument exception.
+ */
+ public static ArgumentException unknownCategory(String categoryName) {
+ int msgID = MSGID_DSCFG_ERROR_CATEGORY_UNRECOGNIZED;
+ String msg = getMessage(msgID, categoryName);
+ return new ArgumentException(msgID, msg);
+ }
+
+
+
+ /**
+ * Creates an argument exception which should be used when a
* property name is not recognized.
*
* @param d
@@ -440,6 +456,22 @@
/**
* Creates an argument exception which should be used when a
+ * property name is not recognized.
+ *
+ * @param name
+ * The unrecognized property name.
+ * @return Returns an argument exception.
+ */
+ public static ArgumentException unknownProperty(String name) {
+ int msgID = MSGID_DSCFG_ERROR_PROPERTY_UNRECOGNIZED_NO_DEFN;
+ String message = getMessage(msgID, name);
+ return new ArgumentException(msgID, message);
+ }
+
+
+
+ /**
+ * Creates an argument exception which should be used when a
* sub-type argument in a create-xxx sub-command is not recognized.
*
* @param r
@@ -465,7 +497,7 @@
* object type argument is not recognized.
*
* @param typeName
- * The unrecognized property sub-type.
+ * The unrecognized component type.
* @return Returns an argument exception.
*/
public static ArgumentException unknownType(String typeName) {
@@ -478,6 +510,25 @@
/**
* Creates an argument exception which should be used when a managed
+ * object type argument is not associated with a category.
+ *
+ * @param categoryName
+ * The component category.
+ * @param typeName
+ * The unrecognized component type.
+ * @return Returns an argument exception.
+ */
+ public static ArgumentException unknownTypeInCategory(String categoryName,
+ String typeName) {
+ int msgID = MSGID_DSCFG_ERROR_CATEGORY_TYPE_UNRECOGNIZED;
+ String msg = getMessage(msgID, typeName, categoryName);
+ return new ArgumentException(msgID, msg);
+ }
+
+
+
+ /**
+ * Creates an argument exception which should be used when a managed
* object is retrieved but does not have the correct type
* appropriate for the associated sub-command.
*
--
Gitblit v1.10.0