From 74b6e3013b463a413ccf687216465b6f9aac17c4 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 26 Nov 2007 09:30:59 +0000
Subject: [PATCH] Fix for issue 2010.
---
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java | 28 +++++++---------------------
1 files changed, 7 insertions(+), 21 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 5ed4b82..c19e755 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
@@ -584,22 +584,6 @@
}
-
- /**
- * Creates an argument exception which should be used when a managed
- * object type argument is not recognized.
- *
- * @param typeName
- * The unrecognized component type.
- * @return Returns an argument exception.
- */
- public static ArgumentException unknownType(String typeName) {
- Message msg = ERR_DSCFG_ERROR_TYPE_UNRECOGNIZED.get(typeName);
- return new ArgumentException(msg);
- }
-
-
-
/**
* Creates an argument exception which should be used when a managed
* object type argument is not associated with a category.
@@ -610,8 +594,8 @@
* The unrecognized component type.
* @return Returns an argument exception.
*/
- public static ArgumentException unknownTypeInCategory(String categoryName,
- String typeName) {
+ public static ArgumentException unknownTypeForCategory(String typeName,
+ String categoryName) {
Message msg =
ERR_DSCFG_ERROR_CATEGORY_TYPE_UNRECOGNIZED.get(typeName, categoryName);
return new ArgumentException(msg);
@@ -628,12 +612,14 @@
* The relation definition.
* @param d
* The definition of the managed object that was retrieved.
+ *
+ * @param subcommandName the sub-command name.
* @return Returns a CLI exception.
*/
public static CLIException wrongManagedObjectType(RelationDefinition<?, ?> r,
- ManagedObjectDefinition<?, ?> d) {
- Message msg = ERR_DSCFG_ERROR_TYPE_UNRECOGNIZED
- .get(d.getUserFriendlyName());
+ ManagedObjectDefinition<?, ?> d, String subcommandName) {
+ Message msg = ERR_DSCFG_ERROR_TYPE_UNRECOGNIZED_FOR_SUBCOMMAND.get(
+ d.getUserFriendlyName(), subcommandName);
return new CLIException(msg);
}
--
Gitblit v1.10.0