/** * * This is part of the internal API. * This is a GET request. * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/show">Further information about this action online (including a response example)</a> * @since 5.4 */ public ShowWsResponse show(ShowRequest request) { return call( new GetRequest(path("show")) .setParam("branch", request.getBranch()) .setParam("component", request.getComponent()) .setParam("componentId", request.getComponentId()) .setParam("pullRequest", request.getPullRequest()), ShowWsResponse.parser()); }
private File toFile(Issues.Component component, String branch) { ShowRequest showRequest = new ShowRequest().setComponent(component.getKey()); if (isNotBlankAndNotEmpty(branch)) { showRequest.setBranch(branch); } Components.ShowWsResponse showWsResponse = wsClient.components().show(showRequest); StringBuilder sb = new StringBuilder(component.getPath()); for (Components.Component a : showWsResponse.getAncestorsList()) { if (Qualifiers.MODULE.equals(a.getQualifier()) && a.getPath() != null) { sb.insert(0, a.getPath() + File.separator); } } return new File(sb.toString()); }
/** * * This is part of the internal API. * This is a GET request. * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/show">Further information about this action online (including a response example)</a> * @since 5.4 */ public ShowWsResponse show(ShowRequest request) { return call( new GetRequest(path("show")) .setParam("branch", request.getBranch()) .setParam("component", request.getComponent()) .setParam("componentId", request.getComponentId()) .setParam("pullRequest", request.getPullRequest()), ShowWsResponse.parser()); }