private void OnRemove() { ConfirmationModel model = (ConfirmationModel) getWindow(); if (model.getProgress() != null) { return; } java.util.ArrayList<VdcActionParametersBase> list = new java.util.ArrayList<VdcActionParametersBase>(); for (Object item : getSelectedItems()) { VmNetworkInterface a = (VmNetworkInterface) item; list.add( new RemoveVmTemplateInterfaceParameters(getEntityStronglyTyped().getId(), a.getId())); } model.StartProgress(null); Frontend.RunMultipleAction( VdcActionType.RemoveVmTemplateInterface, list, new IFrontendMultipleActionAsyncCallback() { @Override public void Executed(FrontendMultipleActionAsyncResult result) { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.StopProgress(); Cancel(); } }, model); }
private void onRemove() { if (getSelectedItems() != null && getSelectedItems().size() > 0) { ConfirmationModel model = (ConfirmationModel) getWindow(); if (model.getProgress() != null) { return; } ArrayList<VdcActionParametersBase> list = new ArrayList<VdcActionParametersBase>(); for (Object perm : getSelectedItems()) { PermissionsOperationsParameters tempVar = new PermissionsOperationsParameters(); tempVar.setPermission((Permission) perm); list.add(tempVar); } model.startProgress(null); Frontend.getInstance() .runMultipleAction( VdcActionType.RemoveSystemPermission, list, new IFrontendMultipleActionAsyncCallback() { @Override public void executed(FrontendMultipleActionAsyncResult result) { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.stopProgress(); cancel(); } }, model); } }
private void onResetAllParameters() { ConfirmationModel model = (ConfirmationModel) getWindow(); if (model.getProgress() != null) { return; } if (getEntity() == null) { return; } GlusterVolumeEntity volume = getEntity(); ResetGlusterVolumeOptionsParameters parameters = new ResetGlusterVolumeOptionsParameters(volume.getId(), null, false); model.startProgress(); Frontend.getInstance() .runAction( VdcActionType.ResetGlusterVolumeOptions, parameters, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.stopProgress(); cancel(); } }, model); }
private void onDisableHook() { if (getConfirmWindow() == null) { return; } ConfirmationModel model = (ConfirmationModel) getConfirmWindow(); if (model.getProgress() != null) { return; } ArrayList<VdcActionParametersBase> list = new ArrayList<VdcActionParametersBase>(); for (Object item : getSelectedItems()) { GlusterHookEntity hook = (GlusterHookEntity) item; list.add(new GlusterHookParameters(hook.getId())); } model.startProgress(); Frontend.getInstance() .runMultipleAction( VdcActionType.DisableGlusterHook, list, new IFrontendMultipleActionAsyncCallback() { @Override public void executed(FrontendMultipleActionAsyncResult result) { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.stopProgress(); cancelConfirmation(); } }, model); }