diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2017-02-16 15:04:23 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2017-02-17 11:30:11 +0100 |
commit | a914082d1e284d97f6d1d632ab04e8ba4eff30f7 (patch) | |
tree | cc3493289633b7a37612272453a5e508dcaa8863 /sonar-ws/src/main | |
parent | 88db71f2968ddd983f90adc880b87e08ecd81dd3 (diff) | |
download | sonarqube-a914082d1e284d97f6d1d632ab04e8ba4eff30f7.tar.gz sonarqube-a914082d1e284d97f6d1d632ab04e8ba4eff30f7.zip |
SONAR-8774 Rename component parameters in WS api/components/*
Diffstat (limited to 'sonar-ws/src/main')
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java | 28 | ||||
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java | 6 |
2 files changed, 14 insertions, 20 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java index c533221388e..5b5efb1028d 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java @@ -38,14 +38,14 @@ import static org.sonarqube.ws.client.component.ComponentsWsParameters.ACTION_SH import static org.sonarqube.ws.client.component.ComponentsWsParameters.ACTION_TREE; import static org.sonarqube.ws.client.component.ComponentsWsParameters.ACTION_UPDATE_KEY; import static org.sonarqube.ws.client.component.ComponentsWsParameters.CONTROLLER_COMPONENTS; -import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_BASE_COMPONENT; -import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_BASE_COMPONENT_ID; -import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_DEPRECATED_ID; -import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_DEPRECATED_KEY; -import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_DEPRECATED_NEW_KEY; +import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_COMPONENT; +import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_COMPONENT_ID; import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_FILTER; import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_FROM; +import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_NEW_PROJECT; import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_ORGANIZATION; +import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_PROJECT; +import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_PROJECT_ID; import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_QUALIFIERS; import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_STRATEGY; import static org.sonarqube.ws.client.component.ComponentsWsParameters.PARAM_TO; @@ -68,8 +68,8 @@ public class ComponentsService extends BaseService { public TreeWsResponse tree(TreeWsRequest request) { GetRequest get = new GetRequest(path(ACTION_TREE)) - .setParam(PARAM_BASE_COMPONENT_ID, request.getBaseComponentId()) - .setParam(PARAM_BASE_COMPONENT, request.getBaseComponentKey()) + .setParam(PARAM_COMPONENT_ID, request.getBaseComponentId()) + .setParam(PARAM_COMPONENT, request.getBaseComponentKey()) .setParam(PARAM_QUALIFIERS, inlineMultipleParamValue(request.getQualifiers())) .setParam(PARAM_STRATEGY, request.getStrategy()) .setParam(Param.PAGE, request.getPage()) @@ -81,24 +81,24 @@ public class ComponentsService extends BaseService { public ShowWsResponse show(ShowWsRequest request) { GetRequest get = new GetRequest(path(ACTION_SHOW)) - .setParam(PARAM_DEPRECATED_ID, request.getId()) - .setParam(PARAM_DEPRECATED_KEY, request.getKey()); + .setParam(PARAM_COMPONENT_ID, request.getId()) + .setParam(PARAM_COMPONENT, request.getKey()); return call(get, ShowWsResponse.parser()); } public void updateKey(UpdateWsRequest request) { PostRequest post = new PostRequest(path(ACTION_UPDATE_KEY)) - .setParam(PARAM_DEPRECATED_ID, request.getId()) - .setParam(PARAM_DEPRECATED_KEY, request.getKey()) - .setParam(PARAM_DEPRECATED_NEW_KEY, request.getNewKey()); + .setParam(PARAM_PROJECT_ID, request.getId()) + .setParam(PARAM_PROJECT, request.getKey()) + .setParam(PARAM_NEW_PROJECT, request.getNewKey()); call(post); } public BulkUpdateKeyWsResponse bulkUpdateKey(BulkUpdateWsRequest request) { PostRequest post = new PostRequest(path(ACTION_BULK_UPDATE_KEY)) - .setParam(PARAM_DEPRECATED_ID, request.getId()) - .setParam(PARAM_DEPRECATED_KEY, request.getKey()) + .setParam(PARAM_PROJECT_ID, request.getId()) + .setParam(PARAM_PROJECT, request.getKey()) .setParam(PARAM_FROM, request.getFrom()) .setParam(PARAM_TO, request.getTo()); diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java index e0fd82aaf70..2b62d38f457 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java @@ -36,13 +36,7 @@ public class ComponentsWsParameters { public static final String PARAM_ORGANIZATION = "organization"; public static final String PARAM_QUALIFIERS = "qualifiers"; public static final String PARAM_LANGUAGE = "language"; - public static final String PARAM_BASE_COMPONENT_ID = "baseComponentId"; - public static final String PARAM_BASE_COMPONENT = "baseComponent"; - public static final String PARAM_DEPRECATED_BASE_COMPONENT_KEY = "baseComponentKey"; public static final String PARAM_STRATEGY = "strategy"; - public static final String PARAM_DEPRECATED_ID = "id"; - public static final String PARAM_DEPRECATED_KEY = "key"; - public static final String PARAM_DEPRECATED_NEW_KEY = "newKey"; public static final String PARAM_FROM = "from"; public static final String PARAM_TO = "to"; public static final String PARAM_DRY_RUN = "dryRun"; |