[jbosstools-issues] [JBoss JIRA] (JBIDE-15744) openshift-java-client: add support for List<IEnvironmentVariable> and refactor methods that reference "List" in their names, however are operating on "Map<String, IEnvironmentVariable>", to reference "Map"

Martes Wigglesworth (JIRA) jira-events at lists.jboss.org
Tue Nov 5 10:25:02 EST 2013


    [ https://issues.jboss.org/browse/JBIDE-15744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12850977#comment-12850977 ] 

Martes Wigglesworth commented on JBIDE-15744:
---------------------------------------------

Greetings Max.

I am not sure in what context your comment is meant to be referenced.

I haven't changed any of the workflow, other than introducing some changes to the tests, and interfaces to reference a List<IEnvironmentVariable>.

The only place that you will get the Map<String,IEnvironmentVariable> is to use a run-time implementation of the IApplication interface, so even if we won't have an application all the time, such as in the period associated with the "New Application" creation wizard, it is assumed that a call to load environment variables is made.

In the case for a new application use case, there are no variables to edit, and all environment variable instances will be added in, from the UI.

This List<IEnvironmentVariable> change is really only useful to an application that already has been created, and the wizard calls get/load......  to return the List or Map.

We don't use a Map for anything other than assuming that the map will guarantee uniqueness, which is checked by the validators for the inputs to the UI.  So since we never actually need to check for uniqueness when pulling directly from the back-end, since it is assumed to be the corrected list of variables already, I have introduced a List, which doesn't require the users of a call to getEnvironmentVariables() to have to do extra work simply to get out the list.

                
> openshift-java-client: add support for List<IEnvironmentVariable> and refactor methods that reference "List" in their names, however are operating on "Map<String,IEnvironmentVariable>", to reference "Map"
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-15744
>                 URL: https://issues.jboss.org/browse/JBIDE-15744
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: openshift
>    Affects Versions: 4.1.x, 4.2.0.Alpha1
>            Reporter: Martes Wigglesworth
>            Assignee: Andre Dietisheim
>             Fix For: 4.1.1.CR1
>
>
> This enhancement to the interface will remove the requirement that users of the interface implementation instances to do extra processing to pull the list of variables from the provided immutable Map<String,IEnvirontmentVariable> instance.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list