Fix for issue 4189 (dsconfig : --commandFilePath mis-behaviour when correcting errors in interactiv mode)
The PropertyValueEditor object was not kept if there was an error, this created some inaccurate equivalent commands to be displayed when the user made a mistake creating or modifying configuration objects.
| | |
| | | ManagedObjectDefinition<?, ?> d = mo.getManagedObjectDefinition(); |
| | | Message ufn = d.getUserFriendlyName(); |
| | | |
| | | PropertyValueEditor editor = new PropertyValueEditor(app, context); |
| | | while (true) { |
| | | PropertyValueEditor editor = new PropertyValueEditor(app, context); |
| | | // Interactively set properties if applicable. |
| | | if (app.isInteractive()) { |
| | | SortedSet<PropertyDefinition<?>> properties = |
| | |
| | | |
| | | // Get the naming argument values. |
| | | List<String> names = getNamingArgValues(app, namingArgs); |
| | | |
| | | // Reset the command builder |
| | | getCommandBuilder().clearArguments(); |
| | | |
| | |
| | | |
| | | // The modifications performed: we assume that at most there is one |
| | | // modification per property definition. |
| | | private final List<PropertyEditorModification> mods = |
| | | new ArrayList<PropertyEditorModification>(); |
| | | private final List<PropertyEditorModification<?>> mods = |
| | | new ArrayList<PropertyEditorModification<?>>(); |
| | | |
| | | // Whether the last type of choice made by the user in a menu is a |
| | | // reset |
| | |
| | | * @return the modifications that have been applied during the last call of |
| | | * the method PropertyValueEditor.edit. |
| | | */ |
| | | public Collection<PropertyEditorModification> getModifications() |
| | | public Collection<PropertyEditorModification<?>> getModifications() |
| | | { |
| | | return mods; |
| | | } |
| | |
| | | ManagedObjectDefinition<?, ?> d = mo.getManagedObjectDefinition(); |
| | | Message ufn = d.getUserFriendlyName(); |
| | | |
| | | PropertyValueEditor editor = new PropertyValueEditor(app, context); |
| | | while (true) { |
| | | PropertyValueEditor editor = new PropertyValueEditor(app, context); |
| | | // Interactively set properties if applicable. |
| | | if (app.isInteractive()) { |
| | | SortedSet<PropertyDefinition<?>> properties = |