summaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java26
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);
}
/**