| | |
| | | * CDDL HEADER END |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | |
| | |
| | | app.println(Message.raw(name)); |
| | | } |
| | | } else { |
| | | // Create a table of their properties. |
| | | // Create a table of their properties containing the name, type (if |
| | | // appropriate), and requested properties. |
| | | SortedMap<String, ?> subTypes = |
| | | getSubTypes(relation.getChildDefinition()); |
| | | boolean includeTypesColumn = (subTypes.size() != 1 |
| | | || !subTypes.containsKey(DSConfig.GENERIC_TYPE)); |
| | | |
| | | TableBuilder builder = new TableBuilder(); |
| | | builder.appendHeading(relation.getUserFriendlyName()); |
| | | builder |
| | | .appendHeading(INFO_DSCFG_HEADING_COMPONENT_TYPE.get()); |
| | | if (includeTypesColumn) { |
| | | builder.appendHeading(INFO_DSCFG_HEADING_COMPONENT_TYPE.get()); |
| | | } |
| | | for (String propertyName : propertyNames) { |
| | | builder.appendHeading(Message.raw(propertyName)); |
| | | } |
| | |
| | | builder.appendCell(name); |
| | | } |
| | | |
| | | if (includeTypesColumn) { |
| | | // Output the managed object type in the form used in |
| | | // create-xxx commands. |
| | | String childType = d.getName(); |
| | |
| | | } else { |
| | | builder.appendCell(childType); |
| | | } |
| | | } |
| | | |
| | | // Now any requested properties. |
| | | for (String propertyName : propertyNames) { |