private void onResetParameter() { ConfirmationModel model = (ConfirmationModel) getWindow(); if (model.getProgress() != null) { return; } if (getSelectedItem() == null) { return; } GlusterVolumeOptionEntity selectedOption = getSelectedItem(); ResetGlusterVolumeOptionsParameters parameters = new ResetGlusterVolumeOptionsParameters( selectedOption.getVolumeId(), selectedOption, 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); }
@Override public boolean equals(Object obj) { if (!(obj instanceof GlusterVolumeOptionEntity)) { return false; } GlusterVolumeOptionEntity option = (GlusterVolumeOptionEntity) obj; return (getId().equals(option.getId()) && (volumeId != null && volumeId.equals(option.getVolumeId())) && key.equals(option.getKey()) && value.equals(option.getValue())); }