use of org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult in project ovirt-engine by oVirt.
the class VmBaseListModel method createUnitVmModelNetworkAsyncCallback.
protected UnitVmModelNetworkAsyncCallback createUnitVmModelNetworkAsyncCallback(VM vm, UnitVmModel model) {
if (vm.getVmtGuid().equals(Guid.Empty)) {
return new UnitVmModelNetworkAsyncCallback(model, addVmFromBlankTemplateNetworkManager) {
@Override
public void executed(FrontendActionAsyncResult result) {
getWindow().stopProgress();
ActionReturnValue returnValue = result.getReturnValue();
if (returnValue != null && returnValue.getSucceeded()) {
setWindow(null);
updateActionsAvailability();
} else {
cancel();
}
super.executed(result);
}
};
}
return new UnitVmModelNetworkAsyncCallback(model, defaultNetworkCreatingManager);
}
Aggregations