Federico Simoncelli has posted comments on this change.

Change subject: [wip] frontend: add the import glance image support
......................................................................


Patch Set 2: (3 inline comments)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/ImportExportImageModel.java
Line 50:     public List<EntityModel> getEntities() {
Line 51:         return entities;
Line 52:     }
Line 53: 
Line 54:     public void setEntities(List<EntityModel> entities) {
Better name?
Line 55:         if (entities == this.entities) {
Line 56:             return;
Line 57:         }
Line 58:         this.entities = entities;


Line 83: 
Line 84:     public void setQuota(ListModel quota) {
Line 85:         this.quota = quota;
Line 86:     }
Line 87: 
Extra space
Line 88: 
Line 89:     public UICommand getOkCommand() {
Line 90:         return okCommand;
Line 91:     }


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/storage/ImportExportImagePopupView.java
Line 103:         imageList = new 
EntityModelCellTable<ListModel>(SelectionMode.NONE, true);
Line 104:         imageList.addEntityModelColumn(new 
EntityModelTextColumn<Object>() {
Line 105:             @Override
Line 106:             public String getText(Object image) {
Line 107:                 if (image instanceof RepoImage) {
I know it's not common practice but this lays the foundation for heterogeneous 
(no common base class, e.g. RepoImage and DiskImage) objects to be displayed in 
the table.

The alternative would be wrapping RepoImage/DiskImage with another base class 
(and two derived classes), but it looks like an overhead to me (as we already 
have the EntityModel as wrapper). What we really need here is just to display 
some information to the user. The underlying modules deal with the real objects 
and not with the EntityModel.

Same for the other columns down here.
Line 108:                     return ((RepoImage) image).getRepoImageTitle();
Line 109:                 }
Line 110:                 return "(Unknown)"; //$NON-NLS-1$
Line 111:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I084dadfd208255738140f093ffc8ec136f83d7f6
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to