public TreeWsResponse tree(TreeWsRequest request) {
GetRequest get = new GetRequest(path(ACTION_TREE))
.setParam(PARAM_COMPONENT_ID, request.getBaseComponentId())
- .setParam(PARAM_COMPONENT, request.getBaseComponentKey())
+ .setParam("baseComponentKey", request.getBaseComponentKey())
+ .setParam(PARAM_COMPONENT, request.getComponent())
.setParam(PARAM_BRANCH, request.getBranch())
.setParam(PARAM_QUALIFIERS, inlineMultipleParamValue(request.getQualifiers()))
.setParam(PARAM_STRATEGY, request.getStrategy())
public class TreeWsRequest {
private String baseComponentId;
private String baseComponentKey;
+ private String component;
private String branch;
private String strategy;
private List<String> qualifiers;
private Integer page;
private Integer pageSize;
+ /**
+ * @deprecated since 6.4, please use {@link #getComponent()} instead
+ */
+ @Deprecated
@CheckForNull
public String getBaseComponentId() {
return baseComponentId;
}
+ /**
+ * @deprecated since 6.4, please use {@link #setComponent(String)} instead
+ */
+ @Deprecated
public TreeWsRequest setBaseComponentId(@Nullable String baseComponentId) {
this.baseComponentId = baseComponentId;
return this;
}
+ /**
+ * @deprecated since 6.4, please use {@link #getComponent()} instead
+ */
+ @Deprecated
@CheckForNull
public String getBaseComponentKey() {
return baseComponentKey;
}
+ /**
+ * @deprecated since 6.4, please use {@link #setComponent(String)} instead
+ */
+ @Deprecated
public TreeWsRequest setBaseComponentKey(@Nullable String baseComponentKey) {
this.baseComponentKey = baseComponentKey;
return this;
}
+ public TreeWsRequest setComponent(@Nullable String component) {
+ this.component = component;
+ return this;
+ }
+
+ @CheckForNull
+ public String getComponent() {
+ return component;
+ }
+
@CheckForNull
public String getBranch() {
return branch;
underTest.tree(new TreeWsRequest()
.setBaseComponentId(componentId)
.setBaseComponentKey(componentKey)
+ .setComponent(componentKey)
.setBranch("my_branch")
.setQualifiers(asList("q1", "q2"))
.setStrategy(strategy)
serviceTester.assertThat(serviceTester.getGetRequest())
.hasPath("tree")
.hasParam("componentId", componentId)
+ .hasParam("baseComponentKey", componentKey)
.hasParam("component", componentKey)
.hasParam("branch", "my_branch")
.hasParam("qualifiers", "q1,q2")