| | |
| | | // Display help for each managed object. |
| | | boolean isFirstManagedObject = true; |
| | | for (AbstractManagedObjectDefinition<?, ?> mod : defns) { |
| | | // Display help for each property. |
| | | Set<PropertyDefinition<?>> pds = |
| | | new TreeSet<PropertyDefinition<?>>(mod.getAllPropertyDefinitions()); |
| | | boolean isFirstProperty = true; |
| | | for (PropertyDefinition<?> pd : pds) { |
| | | if (pd.hasOption(PropertyOption.HIDDEN)) { |
| | | continue; |
| | | } |
| | | |
| | | if (!propertyNames.isEmpty() && !propertyNames.contains(pd.getName())) { |
| | | continue; |
| | | } |
| | | |
| | | if (isFirstProperty) { |
| | | // User has requested properties relating to this managed |
| | | // object definition, so display the summary of the managed |
| | | // object. |
| | | if (!isFirstManagedObject) { |
| | | out.println(); |
| | | out.println(c1); |
| | | out.println(); |
| | | } else { |
| | | isFirstManagedObject = false; |
| | | } |
| | | |
| | | // Display the title. |
| | |
| | | out.println(); |
| | | out.println(wrapText(mod.getDescription(), MAX_LINE_WIDTH)); |
| | | } |
| | | |
| | | // Display help for each property. |
| | | Set<PropertyDefinition<?>> pds = |
| | | new TreeSet<PropertyDefinition<?>>(mod.getAllPropertyDefinitions()); |
| | | for (PropertyDefinition<?> pd : pds) { |
| | | if (pd.hasOption(PropertyOption.HIDDEN)) { |
| | | continue; |
| | | } |
| | | |
| | | if (!propertyNames.isEmpty() && !propertyNames.contains(pd.getName())) { |
| | | continue; |
| | | } |
| | | |
| | | out.println(); |
| | |
| | | out.println(); |
| | | |
| | | displayVerboseSingleProperty(mod, pd.getName(), out); |
| | | isFirstProperty = false; |
| | | } |
| | | |
| | | isFirstManagedObject = false; |
| | | } |
| | | } |
| | | |