diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-01-06 17:46:38 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-01-13 14:13:35 +0100 |
commit | 0242e1da3fea5a96a9f0632156b1cacdd89b9ace (patch) | |
tree | 68166c8f6ed52713ba24b5d94e9fe00616491e05 /sonar-plugin-api | |
parent | 49b3b0bc394ce675356d832e1d12459b9be543bd (diff) | |
download | sonarqube-0242e1da3fea5a96a9f0632156b1cacdd89b9ace.tar.gz sonarqube-0242e1da3fea5a96a9f0632156b1cacdd89b9ace.zip |
SONAR-7135 WS api/measures/component_tree navigate through components and display measures
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java index 5bc022283d7..f517cc49c5d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java @@ -411,32 +411,24 @@ public interface WebService extends Definable<WebService.Context> { * Add predefined parameters related to sorting of results. */ public <V> NewAction addSortParams(Collection<V> possibleValues, @Nullable V defaultValue, boolean defaultAscending) { - genericAddSortParam(possibleValues, defaultValue, defaultAscending, "Sort field"); - + createSortParams(possibleValues, defaultValue, defaultAscending); return this; } /** - * Add predefined parameters related to sorting of results. Comma-separated list + * Add predefined parameters related to sorting of results. */ - public <V> NewAction addMultiSortsParams(Collection<V> possibleValues, @Nullable V defaultValue, boolean defaultAscending) { - genericAddSortParam(possibleValues, defaultValue, defaultAscending, "Comma-separated list of sort fields"); - - return this; - } - - public <V> NewAction genericAddSortParam(Collection<V> possibleValues, @Nullable V defaultValue, boolean defaultAscending, String description) { - createParam(Param.SORT) - .setDescription(description) - .setDeprecatedKey("sort") - .setDefaultValue(defaultValue) - .setPossibleValues(possibleValues); - + public <V> NewParam createSortParams(Collection<V> possibleValues, @Nullable V defaultValue, boolean defaultAscending) { createParam(Param.ASCENDING) .setDescription("Ascending sort") .setBooleanPossibleValues() .setDefaultValue(defaultAscending); - return this; + + return createParam(Param.SORT) + .setDescription("Sort field") + .setDeprecatedKey("sort") + .setDefaultValue(defaultValue) + .setPossibleValues(possibleValues); } /** |