From 0a2e22293f5c36807d89441f9bd8c56ae0b59097 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 16 Nov 2007 16:40:35 +0000
Subject: [PATCH] Update admin framework and dsconfig to support tagging of component definitions as advanced and customizable:
---
opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java | 32 +++++++++++++++++++++++++-------
1 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java b/opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java
index 5c46e91..c265be2 100644
--- a/opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java
+++ b/opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java
@@ -52,6 +52,7 @@
import org.opends.server.admin.DefaultBehaviorProviderVisitor;
import org.opends.server.admin.DefinedDefaultBehaviorProvider;
import org.opends.server.admin.EnumPropertyDefinition;
+import org.opends.server.admin.ManagedObjectOption;
import org.opends.server.admin.PropertyDefinition;
import org.opends.server.admin.PropertyDefinitionUsageBuilder;
import org.opends.server.admin.PropertyDefinitionVisitor;
@@ -358,11 +359,6 @@
}
}
- /**
- * The type component name to be used for top-level definitions.
- */
- private static final String GENERIC_TYPE = "generic";
-
// Strings used in property help.
private final static String HEADING_SEPARATOR = " : ";
@@ -765,7 +761,7 @@
String typeName = null;
if (parent == d) {
// This was a top-level definition.
- typeName = GENERIC_TYPE;
+ typeName = DSConfig.GENERIC_TYPE;
} else {
// For the type name we shorten it, if possible, by stripping
// off the trailing part of the name which matches the
@@ -836,7 +832,7 @@
}
} else {
// Cache the generic definition for improved errors later on.
- tmp = subTypes.get(GENERIC_TYPE);
+ tmp = subTypes.get(DSConfig.GENERIC_TYPE);
}
if (typeName != null) {
@@ -959,6 +955,17 @@
// Display help for each property.
AbstractManagedObjectDefinition<?, ?> mod = subTypes.get(type);
+ // Skip hidden types.
+ if (mod.hasOption(ManagedObjectOption.HIDDEN)) {
+ continue;
+ }
+
+ // Skip advanced types if required.
+ if (!app.isAdvancedMode()
+ && mod.hasOption(ManagedObjectOption.ADVANCED)) {
+ continue;
+ }
+
// Skip if this does not have the required tag.
if (tag != null && !mod.hasTag(tag)) {
continue;
@@ -1062,6 +1069,17 @@
// Display help for each property.
AbstractManagedObjectDefinition<?, ?> mod = subTypes.get(type);
+ // Skip hidden types.
+ if (mod.hasOption(ManagedObjectOption.HIDDEN)) {
+ continue;
+ }
+
+ // Skip advanced types if required.
+ if (!app.isAdvancedMode()
+ && mod.hasOption(ManagedObjectOption.ADVANCED)) {
+ continue;
+ }
+
// Skip if this does not have the required tag.
if (tag != null && !mod.hasTag(tag)) {
continue;
--
Gitblit v1.10.0