Search in sources :

Example 1 with Operation

use of org.sonarqube.ws.Issues.Operation in project sonarqube by SonarSource.

the class SearchResponseFormat method formatOperation.

Operation formatOperation(SearchResponseData data) {
    Operation.Builder response = Operation.newBuilder();
    if (data.getIssues().size() == 1) {
        Issue.Builder issueBuilder = Issue.newBuilder();
        IssueDto dto = data.getIssues().get(0);
        formatIssue(issueBuilder, dto, data);
        formatIssueActions(data, issueBuilder, dto);
        formatIssueTransitions(data, issueBuilder, dto);
        formatIssueComments(data, issueBuilder, dto);
        response.setIssue(issueBuilder.build());
    }
    response.addAllComponents(formatComponents(data));
    response.addAllRules(formatRules(data).getRulesList());
    response.addAllUsers(formatUsers(data).getUsersList());
    return response.build();
}
Also used : Issue(org.sonarqube.ws.Issues.Issue) IssueDto(org.sonar.db.issue.IssueDto) Operation(org.sonarqube.ws.Issues.Operation)

Aggregations

IssueDto (org.sonar.db.issue.IssueDto)1 Issue (org.sonarqube.ws.Issues.Issue)1 Operation (org.sonarqube.ws.Issues.Operation)1