| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.server.admin.DefinitionDecodingException; |
| | |
| | | // Create the naming arguments. |
| | | this.namingArgs = createNamingArgs(subCommand, path, false); |
| | | |
| | | // Register common arguments. |
| | | registerAdvancedModeArgument(this.subCommand, |
| | | MSGID_DSCFG_DESCRIPTION_ADVANCED_SET, r.getUserFriendlyName()); |
| | | |
| | | // Create the --set argument. |
| | | this.propertySetArgument = new StringArgument(OPTION_DSCFG_LONG_SET, |
| | | OPTION_DSCFG_SHORT_SET, OPTION_DSCFG_LONG_SET, false, true, true, |
| | |
| | | } |
| | | } |
| | | |
| | | // Interactively set properties if applicable. |
| | | if (getConsoleApplication().isInteractive()) { |
| | | SortedSet<PropertyDefinition<?>> properties = |
| | | new TreeSet<PropertyDefinition<?>>(); |
| | | |
| | | for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) { |
| | | if (pd.hasOption(PropertyOption.HIDDEN)) { |
| | | continue; |
| | | } |
| | | |
| | | if (pd.hasOption(PropertyOption.READ_ONLY)) { |
| | | continue; |
| | | } |
| | | |
| | | if (pd.hasOption(PropertyOption.MONITORING)) { |
| | | continue; |
| | | } |
| | | |
| | | if (!isAdvancedMode() && pd.hasOption(PropertyOption.ADVANCED)) { |
| | | continue; |
| | | } |
| | | |
| | | properties.add(pd); |
| | | } |
| | | |
| | | PropertyValueReader reader = |
| | | new PropertyValueReader(getConsoleApplication()); |
| | | reader.readAll(child, properties); |
| | | } |
| | | |
| | | try { |
| | | // Confirm commit. |
| | | String prompt = String.format(Messages.getString("modify.confirm"), d |