private void onSetParameter() {
    if (getEntity() == null) {
      return;
    }

    GlusterVolumeEntity volume = getEntity();

    VolumeParameterModel model = (VolumeParameterModel) getWindow();

    if (!model.validate()) {
      return;
    }

    GlusterVolumeOptionEntity option = new GlusterVolumeOptionEntity();
    option.setVolumeId(volume.getId());
    option.setKey(model.getSelectedKey().getEntity());
    option.setValue(model.getValue().getEntity());

    model.startProgress();

    Frontend.getInstance()
        .runAction(
            VdcActionType.SetGlusterVolumeOption,
            new GlusterVolumeOptionParameters(option),
            new IFrontendActionAsyncCallback() {

              @Override
              public void executed(FrontendActionAsyncResult result) {
                VolumeParameterListModel localModel = (VolumeParameterListModel) result.getState();
                localModel.postOnSetParameter(result.getReturnValue());
              }
            },
            this);
  }
  /**
   * Sets all options of a volume by invoking the action {@link
   * VdcActionType#SetGlusterVolumeOption} in a loop. <br>
   * Errors if any are collected and added to "executeFailedMessages"
   *
   * @param volume
   */
  private void setVolumeOptions(GlusterVolumeEntity volume) {
    List<String> errors = new ArrayList<String>();
    for (GlusterVolumeOptionEntity option : volume.getOptions()) {
      // make sure that volume id is set
      option.setVolumeId(volume.getId());
      VdcReturnValueBase setOptionReturnValue =
          runBllAction(
              VdcActionType.SetGlusterVolumeOption, new GlusterVolumeOptionParameters(option));
      if (!getSucceeded()) {
        errors.addAll(setOptionReturnValue.getCanDoActionMessages());
        errors.addAll(setOptionReturnValue.getExecuteFailedMessages());
      }
    }

    if (!errors.isEmpty()) {
      handleVdsErrors(AuditLogType.GLUSTER_VOLUME_OPTION_SET_FAILED, errors);
    }
  }
 public GlusterVolumeOptionEntity(Guid volumeId, String key, String value) {
   setVolumeId(volumeId);
   setKey(key);
   setValue(value);
 }