aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-ws-client/src/main/java')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/ManualMeasureCreateQuery.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ManualMeasureCreateQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ManualMeasureCreateQuery.java
index 83d95c37922..b4c55497a96 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ManualMeasureCreateQuery.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ManualMeasureCreateQuery.java
@@ -26,6 +26,7 @@ public class ManualMeasureCreateQuery extends CreateQuery<ManualMeasure> {
private String resourceKey;
private String metricKey;
+ private Integer intValue;
private Double value;
private String textValue;
private String description;
@@ -52,6 +53,15 @@ public class ManualMeasureCreateQuery extends CreateQuery<ManualMeasure> {
return this;
}
+ public Integer getIntValue() {
+ return intValue;
+ }
+
+ public ManualMeasureCreateQuery setIntValue(Integer intValue) {
+ this.intValue = intValue;
+ return this;
+ }
+
public String getTextValue() {
return textValue;
}
@@ -76,7 +86,11 @@ public class ManualMeasureCreateQuery extends CreateQuery<ManualMeasure> {
url.append(ManualMeasureQuery.BASE_URL);
appendUrlParameter(url, "resource", resourceKey);
appendUrlParameter(url, "metric", metricKey);
- appendUrlParameter(url, "val", value);
+ if (value != null) {
+ appendUrlParameter(url, "val", value);
+ } else if (intValue != null) {
+ appendUrlParameter(url, "val", intValue);
+ }
// limitations : POST body is not used, so the complete URL size is limited
appendUrlParameter(url, "text", textValue);