use of com.hp.octane.integrations.dto.DTOFactory in project octane-ci-java-sdk by MicroFocus.
the class SonarToOctaneIssueUtil method createOctaneIssues.
public static List<OctaneIssue> createOctaneIssues(List<SonarIssue> issues, String remoteTag, String sonarUrl, Set<String> issuesRequiredExtendedDataKeys, Map<String, SonarRule> rules) {
if (issues == null) {
return new ArrayList<>();
}
DTOFactory dtoFactory = DTOFactory.getInstance();
List<OctaneIssue> octaneIssues = new ArrayList<>();
for (SonarIssue issue : issues) {
OctaneIssue octaneIssue = createOctaneIssue(dtoFactory, issue, rules, sonarUrl);
octaneIssue.setRemoteTag(remoteTag);
octaneIssues.add(octaneIssue);
if (issuesRequiredExtendedDataKeys.contains(issue.getKey())) {
Map<String, String> extendedData = prepareExtendedData(issue, rules);
octaneIssue.setExtendedData(extendedData);
setOctaneStatus(issue, octaneIssue, true);
} else {
setOctaneStatus(issue, octaneIssue, false);
}
}
return octaneIssues;
}
use of com.hp.octane.integrations.dto.DTOFactory in project octane-ci-java-sdk by MicroFocus.
the class SSCToOctaneIssueUtil method createOctaneIssues.
public static List<OctaneIssue> createOctaneIssues(List<Issues.Issue> issues, String remoteTag, Map<Integer, IssueDetails> issueDetailsById) {
if (issues == null) {
return new ArrayList<>();
}
logger.warn("SSCToOctane.createOctaneIssues");
DTOFactory dtoFactory = DTOFactory.getInstance();
List<OctaneIssue> octaneIssues = new ArrayList<>();
for (Issues.Issue issue : issues) {
OctaneIssue octaneIssue = createOctaneIssue(dtoFactory, issue, issueDetailsById.get(issue.id));
octaneIssues.add(octaneIssue);
octaneIssue.setRemoteTag(remoteTag);
}
return octaneIssues;
}
Aggregations