Lior Vernia has posted comments on this change.

Change subject: webadmin: Pass map instead of strings to KeyValueModel
......................................................................


Patch Set 7:

(3 comments)

http://gerrit.ovirt.org/#/c/27386/7//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2014-05-05 11:04:28 +0300
Line 4: Commit:     Lior Vernia <lver...@redhat.com>
Line 5: CommitDate: 2014-05-27 09:03:17 +0300
Line 6: 
Line 7: webadmin: Pass map instead of strings to KeyValueModel
> s/webadmin/webadmin,engine
Since moving changes down the chain, not relevant here.
Line 8: 
Line 9: Instead of converting to and from strings, try to keep the data as a
Line 10: map.
Line 11: 


http://gerrit.ovirt.org/#/c/27386/7/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java:

Line 265:         initVmCustomProperties();
Line 266:     }
Line 267: 
Line 268:     private static void initVmCustomProperties() {
Line 269:         VmPropertiesUtils utils = new VmPropertiesUtils() {
> You should add VmPropertiesUtils.java to Common.gwt.xml
It is added anyway in a succeeding patch, so moving these changes further down 
the chain.
Line 270:             @Override
Line 271:             public String getPredefinedVMProperties(Version version) {
Line 272:                 return (String) 
getConfigValuePreConverted(ConfigurationValues.PredefinedVMProperties,
Line 273:                         version.getValue());


Line 267: 
Line 268:     private static void initVmCustomProperties() {
Line 269:         VmPropertiesUtils utils = new VmPropertiesUtils() {
Line 270:             @Override
Line 271:             public String getPredefinedVMProperties(Version version) {
> Consider passing PredefinedVMProperties and UserDefinedVMProperties to VmPr
Note that what I need to pass then is a Map<Version, String> populated with the 
properties per version, which is logic that's performed today inside init() 
with a sole dependence on how the data is fetched.

So in my opinion, duplicating that logic is less elegant. Please reconsider 
your position :)
Line 272:                 return (String) 
getConfigValuePreConverted(ConfigurationValues.PredefinedVMProperties,
Line 273:                         version.getValue());
Line 274:             }
Line 275:             @Override


-- 
To view, visit http://gerrit.ovirt.org/27386
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic57b3157960e829d43073c1614647b25a3b6a139
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to