use of org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmFromExportDomainModel in project ovirt-engine by oVirt.
the class VmBackupModel method restore.
@Override
protected void restore() {
if (getWindow() != null) {
return;
}
if (!validateSingleArchitecture()) {
return;
}
ImportVmFromExportDomainModel model = importModelProvider.get();
model.setEntity(getEntity().getId());
setWindow(model);
model.startProgress();
model.setTitle(ConstantsManager.getInstance().getConstants().importVirtualMachinesTitle());
// $NON-NLS-1$
model.getCommands().add(UICommand.createDefaultOkUiCommand("OnRestore", this));
// $NON-NLS-1$);
model.getCommands().add(UICommand.createCancelUiCommand(CANCEL_COMMAND, this));
model.init(getSelectedItems(), getEntity().getId());
model.setTargetArchitecture(getArchitectureFromItem(getSelectedItems().get(0)));
// Add 'Close' command
model.setCloseCommand(// $NON-NLS-1$
new UICommand(CANCEL_COMMAND, this).setTitle(ConstantsManager.getInstance().getConstants().close()).setIsDefault(true).setIsCancel(true));
}
Aggregations