From 165cc33c42a1e3186b2d68decaa236bcfe83decf Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Wed, 30 May 2007 07:50:26 +0000
Subject: [PATCH] Add 'hidden' feature to SubCommand.
---
opends/src/server/org/opends/server/util/args/SubCommand.java | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/args/SubCommand.java b/opends/src/server/org/opends/server/util/args/SubCommand.java
index 55a63f1..b54eee2 100644
--- a/opends/src/server/org/opends/server/util/args/SubCommand.java
+++ b/opends/src/server/org/opends/server/util/args/SubCommand.java
@@ -45,6 +45,10 @@
*/
public class SubCommand
{
+ // Indicates whether this subCommand should be hidden in the usage
+ // information.
+ private boolean isHidden;
+
// The mapping between the short argument IDs and the arguments for this
// subcommand.
private HashMap<Character,Argument> shortIDMap;
@@ -157,6 +161,7 @@
this.minTrailingArguments = minTrailingArguments;
this.maxTrailingArguments = maxTrailingArguments;
this.trailingArgsDisplayName = trailingArgsDisplayName;
+ this.isHidden = false;
String nameToCheck = name;
if (parser.longArgumentsCaseSensitive())
@@ -450,5 +455,33 @@
{
return parser.getTrailingArguments();
}
+
+ /**
+ * Indicates whether this subcommand should be hidden from the usage
+ * information.
+ *
+ * @return <CODE>true</CODE> if this subcommand should be hidden
+ * from the usage information, or <CODE>false</CODE> if
+ * not.
+ */
+ public boolean isHidden()
+ {
+ return isHidden;
+ }
+
+
+
+ /**
+ * Specifies whether this subcommand should be hidden from the usage
+ * information.
+ *
+ * @param isHidden
+ * Indicates whether this subcommand should be hidden from
+ * the usage information.
+ */
+ public void setHidden(boolean isHidden)
+ {
+ this.isHidden = isHidden;
+ }
}
--
Gitblit v1.10.0