Arik Hadas has posted comments on this change. Change subject: webadmin: use generics in import models ......................................................................
Patch Set 5: (4 comments) https://gerrit.ovirt.org/#/c/40448/5/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/TemplateBackupModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/TemplateBackupModel.java: Line 68: /** used to save the names that were assigned for VMs which are going Line 69: * to be created using import in case of choosing multiple VM imports */ Line 70: protected Set<String> assignedVmNames = new HashSet<String>(); Line 71: protected Map<Guid, Object> cloneObjectMap; Line 72: protected List<Object> objectsToClone; > List<ImportTemplateData> ? (or possibly List<ImportEntityData<T>> if moved Done Line 73: Line 74: private static UIConstants constants = ConstantsManager.getInstance().getConstants(); Line 75: private static UIMessages messages = ConstantsManager.getInstance().getMessages(); Line 76: Line 202: Frontend.getInstance().runMultipleAction(VdcActionType.RemoveVmTemplateFromImportExport, prms); Line 203: cancel(); Line 204: } Line 205: Line 206: protected ArchitectureType getArchitectureFromItem(Object item) { > I believe this can now be 'VmTemplate item' (or if moved to base as abstrac Done Line 207: VmTemplate template = (VmTemplate) item; Line 208: Line 209: return template.getClusterArch(); Line 210: } Line 208: Line 209: return template.getClusterArch(); Line 210: } Line 211: Line 212: protected String getObjectName(Object object) { > getObjectName and setObjectName can now use specific type (ImportTemplateDa Done (in a previous patch) Line 213: return ((ImportTemplateData) object).getTemplate().getName(); Line 214: } Line 215: Line 216: protected void setObjectName(Object object, String name) { Line 325: Line 326: StringBuilder importedTemplates = new StringBuilder(); Line 327: int counter = 0; Line 328: boolean toShowConfirmWindow = false; Line 329: for (Object a : templateBackupModel.getSelectedItems()) > getSelectedItems() should now return a strongly typed collection of VmTempl Done Line 330: { Line 331: VmTemplate template = (VmTemplate) a; Line 332: if (retVals.get(counter) != null && retVals.get(counter).getCanDoAction()) { Line 333: importedTemplates.append(template.getName()).append(", "); //$NON-NLS-1$ -- To view, visit https://gerrit.ovirt.org/40448 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3267d582c3f7067e15550c5b1e3f48e346248a9d Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches