Exemple #1
0
  private void addLabelFilters(JSONObject conditionArgs) {
    List<String> include = new ArrayList<String>(), exclude = new ArrayList<String>();

    getIncludeAndExclude(include, exclude, FilterFactory.LABEL_TYPE);

    if (!savedShowInvalid) {
      exclude.add(TestLabelManager.INVALIDATED_LABEL);
    }

    if (!include.isEmpty()) {
      conditionArgs.put("include_labels", Utils.stringsToJSON(include));
    }
    if (!exclude.isEmpty()) {
      conditionArgs.put("exclude_labels", Utils.stringsToJSON(exclude));
    }
  }
Exemple #2
0
  public void addQueryParameters(JSONObject parameters) {
    for (HeaderField field : getSelectedItems()) {
      field.addQueryParameters(parameters);
    }

    List<String> fixedValues = getFixedValues();
    if (fixedValues != null) {
      JSONObject fixedValuesObject =
          Utils.setDefaultValue(parameters, "fixed_headers", new JSONObject()).isObject();
      fixedValuesObject.put(
          getSelectedItems().get(0).getSqlName(), Utils.stringsToJSON(fixedValues));
    }
  }