From 738e5382ddbe38e684a4d80d857647efbc3df665 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 09 Aug 2007 22:58:02 +0000
Subject: [PATCH] Create a superclass of DsFrameworkCliParser so that command lines that do not have subcommands can use all the logic to parse the arguments associated with certificate management and to generate ApplicationTrustManager objects.
---
opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java b/opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java
index 6b5d36b..0bc42fa 100644
--- a/opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java
+++ b/opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java
@@ -518,6 +518,36 @@
globalArgumentList.add(argument);
}
+ /**
+ * Removes the provided argument from the set of global arguments handled by
+ * this parser.
+ *
+ * @param argument The argument to be removed.
+ */
+ protected void removeGlobalArgument(Argument argument)
+ {
+ String argumentName = argument.getName();
+ globalArgumentMap.remove(argumentName);
+
+ Character shortID = argument.getShortIdentifier();
+ if (shortID != null)
+ {
+ globalShortIDMap.remove(shortID);
+ }
+
+ String longID = argument.getLongIdentifier();
+ if (longID != null)
+ {
+ if (! longArgumentsCaseSensitive)
+ {
+ longID = toLowerCase(longID);
+ }
+
+ globalLongIDMap.remove(longID);
+ }
+
+ globalArgumentList.remove(argument);
+ }
/**
--
Gitblit v1.10.0