public Resolution getUniqueValues() throws JSONException {
    JSONObject json = new JSONObject();
    json.put("success", Boolean.FALSE);

    try {
      Layer layer = applicationLayer.getService().getSingleLayer(applicationLayer.getLayerName());
      if (layer != null && layer.getFeatureType() != null) {
        SimpleFeatureType sft = layer.getFeatureType();
        List<String> beh = sft.calculateUniqueValues(attribute);
        json.put("uniqueValues", new JSONArray(beh));
        json.put("success", Boolean.TRUE);
      }
    } catch (Exception e) {
      json.put("msg", e.toString());
    }
    return new StreamingResolution("application/json", new StringReader(json.toString()));
  }