Search in sources :

Example 6 with FrontendActionAsyncResult

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);
}
Also used : UnitVmModelNetworkAsyncCallback(org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModelNetworkAsyncCallback) FrontendActionAsyncResult(org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue)

Aggregations

FrontendActionAsyncResult (org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult)6 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)3 IFrontendActionAsyncCallback (org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback)3 HashSet (java.util.HashSet)1 Set (java.util.Set)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 ActionType (org.ovirt.engine.core.common.action.ActionType)1 ExtendSANStorageDomainParameters (org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters)1 ReduceSANStorageDomainDevicesCommandParameters (org.ovirt.engine.core.common.action.ReduceSANStorageDomainDevicesCommandParameters)1 StorageDomainManagementParameter (org.ovirt.engine.core.common.action.StorageDomainManagementParameter)1 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)1 StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)1 EngineFault (org.ovirt.engine.core.common.errors.EngineFault)1 VdcOperation (org.ovirt.engine.ui.frontend.communication.VdcOperation)1 UnitVmModelNetworkAsyncCallback (org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModelNetworkAsyncCallback)1