use of org.ovirt.engine.core.common.action.VmTemplateManagementParameters in project ovirt-engine by oVirt.
the class InstanceTypeListModel method onDeleteInstanceType.
private void onDeleteInstanceType() {
final ConfirmationModel model = (ConfirmationModel) getConfirmWindow();
boolean latchChecked = !model.validate();
if (model.getProgress() != null || latchChecked) {
return;
}
model.startProgress();
Guid instanceTypeId = getSelectedItem().getId();
Frontend.getInstance().runAction(ActionType.RemoveVmTemplate, new VmTemplateManagementParameters(instanceTypeId), result -> {
model.stopProgress();
cancel();
}, this);
}
use of org.ovirt.engine.core.common.action.VmTemplateManagementParameters in project ovirt-engine by oVirt.
the class TemplateListModel method onRemove.
private void onRemove() {
ConfirmationModel model = (ConfirmationModel) getWindow();
if (model.getProgress() != null) {
return;
}
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VmTemplate a = (VmTemplate) item;
list.add(new VmTemplateManagementParameters(a.getId()));
}
model.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.RemoveVmTemplate, list, result -> {
ConfirmationModel localModel = (ConfirmationModel) result.getState();
localModel.stopProgress();
cancel();
}, model);
}
Aggregations