[forge-dev] Adding methods to the CommandController

George Gastaldi ggastald at redhat.com
Thu Feb 19 05:13:52 EST 2015


Hi Antonio,

How different is that from the immutable Map? I find the Map more flexible in terms of:

- you can do inputs.keySet() and iterate through the input names (there are some places where we do this)
- some UIProviders need to know if a Command has any input at all to decide if it should execute or should render the Wizard screen.

So I am not sure if this is a good idea, but I may be wrong ;)

Best Regards,

George Gastaldi



> Em 19/02/2015, às 07:24, Antonio Goncalves <antonio.mailing at gmail.com> escreveu:
> 
> Hi all,
> 
> I'm investigating how to refactor UICommands in the best way (see the analysis in https://issues.jboss.org/browse/FORGE-2109). But before refactoring, I would like to add a stronger test coverage so I make sure I don't break things. 
> 
> 
> I was looking at CommandController that list of the command inputs : 
> 
> Map<String, InputComponent<?, ?>> getInputs();
> 
> 
> I would like to add the following commands 
> 
> InputComponent<?, ?> getInput(String input); // returns one input
> boolean hasInput(String input); // checks if the input is present
> 
> 
> What do you think ?
> 
> -- 
> Antonio Goncalves 
> Software architect and Java Champion
> 
> Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20150219/f8c5f0e4/attachment.html 


More information about the forge-dev mailing list