public void updateVmConfiguration(final AsyncCallback<Void> onUpdateAsyncCallback) { Snapshot snapshot = getEntity(); if (snapshot == null) { return; } AsyncDataProvider.getInstance().getVmConfigurationBySnapshot(new AsyncQuery<>(vm -> { Snapshot snapshot1 = getEntity(); if (vm != null && snapshot1 != null) { setVm(vm); setDisks(vm.getDiskList()); setNics(vm.getInterfaces()); setApps(Arrays.asList(snapshot1.getAppList() != null ? snapshot1.getAppList().split(",") : new String[]{})); //$NON-NLS-1$ Collections.sort(getDisks(), new DiskByDiskAliasComparator()); Collections.sort(getNics(), new LexoNumericNameableComparator<>()); } onUpdateAsyncCallback.onSuccess(null); }), snapshot.getId()); }
if (snapshot.getAppList() != null) { _writer.writeElement("ApplicationList", snapshot.getAppList());
@Override protected MapSqlParameterSource createFullParametersMapper(Snapshot entity) { return createIdParameterMapper(entity.getId()) .addValue("vm_id", entity.getVmId()) .addValue("snapshot_type", EnumUtils.nameOrNull(entity.getType())) .addValue("status", EnumUtils.nameOrNull(entity.getStatus())) .addValue("description", entity.getDescription()) .addValue("creation_date", entity.getCreationDate()) .addValue("app_list", entity.getAppList()) .addValue("vm_configuration", entity.getVmConfiguration()) .addValue("memory_dump_disk_id", entity.getMemoryDiskId()) .addValue("memory_metadata_disk_id", entity.getMetadataDiskId()) .addValue("vm_configuration_broken", entity.isVmConfigurationBroken()); }