Source:
public void install() { if (getWindow() != null) { return; } InstallModel model = new InstallModel(); setWindow(model); model.setVds(getEntity()); model.setTitle(constants.installHostTitle()); model.setHashName("install_host"); model.getOVirtISO().setIsAvailable(false); model.getOverrideIpTables().setIsAvailable(false); model.getHostVersion().setEntity(getEntity().getHostOs()); model.getHostVersion().setIsAvailable(false); getWindow().startProgress(null); if (getEntity().getVdsType() == VDSType.oVirtNode) { AsyncDataProvider.getoVirtISOsList(new AsyncQuery(model, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { InstallModel model = (InstallModel) target; ArrayList<RpmVersion> isos = (ArrayList<RpmVersion>) returnValue; Collections.sort(isos, Collections.reverseOrder()); model.getOVirtISO().setItems(isos); model.getOVirtISO().setSelectedItem(Linq.firstOrDefault(isos)); model.getOVirtISO().setIsAvailable(true); model.getOVirtISO().setIsChangable(!isos.isEmpty()); model.getHostVersion().setIsAvailable(true); if (isos.isEmpty()) { model.setMessage(constants .thereAreNoISOversionsVompatibleWithHostCurrentVerMsg()); } addInstallCommands(model, isos.isEmpty()); getWindow().stopProgress(); } }), getEntity().getId()); } else { model.getUserPassword().setIsAvailable(true); model.getUserPassword().setIsChangable(true); Version v3 = new Version(3, 0); boolean isLessThan3 = getEntity().getVdsGroupCompatibilityVersion().compareTo(v3) < 0; if (!isLessThan3) { model.getOverrideIpTables().setIsAvailable(true); model.getOverrideIpTables().setEntity(true); } addInstallCommands(model, false); getWindow().stopProgress(); } }

Target:
public void install() { if (getWindow() != null) { return; } InstallModel model = new InstallModel(); model.setVds(getEntity()); setWindow(model); model.setTitle(constants.installHostTitle()); model.setHashName("install_host"); model.getOVirtISO().setIsAvailable(false); model.getOverrideIpTables().setIsAvailable(false); model.getHostVersion().setEntity(getEntity().getHostOs()); model.getHostVersion().setIsAvailable(false); getWindow().startProgress(null); if (getEntity().getVdsType() == VDSType.oVirtNode) { AsyncDataProvider.getoVirtISOsList(new AsyncQuery(model, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { InstallModel model = (InstallModel) target; ArrayList<RpmVersion> isos = (ArrayList<RpmVersion>) returnValue; Collections.sort(isos, Collections.reverseOrder()); model.getOVirtISO().setItems(isos); model.getOVirtISO().setSelectedItem(Linq.firstOrDefault(isos)); model.getOVirtISO().setIsAvailable(true); model.getOVirtISO().setIsChangable(!isos.isEmpty()); model.getHostVersion().setIsAvailable(true); if (isos.isEmpty()) { model.setMessage(constants .thereAreNoISOversionsVompatibleWithHostCurrentVerMsg()); } addInstallCommands(model, isos.isEmpty()); getWindow().stopProgress(); } }), getEntity().getId()); } else { model.getUserPassword().setIsAvailable(true); model.getUserPassword().setIsChangable(true); Version v3 = new Version(3, 0); boolean isLessThan3 = getEntity().getVdsGroupCompatibilityVersion().compareTo(v3) < 0; if (!isLessThan3) { model.getOverrideIpTables().setIsAvailable(true); model.getOverrideIpTables().setEntity(true); } addInstallCommands(model, false); getWindow().stopProgress(); } }