use of com.epam.ta.reportportal.entity.widget.content.healthcheck.HealthCheckTableContent in project commons-dao by reportportal.
the class HealthCheckTableChain method concat.
private List<HealthCheckTableContent> concat(boolean contentFirst, Map<String, HealthCheckTableStatisticsContent> content, Map<String, List<String>> columnMapping) {
List<HealthCheckTableContent> result = Lists.newArrayListWithExpectedSize(content.size());
if (contentFirst) {
content.forEach((key, statistics) -> {
HealthCheckTableContent resultEntry = entryFromStatistics(key, statistics);
ofNullable(columnMapping.get(key)).ifPresent(resultEntry::setCustomValues);
result.add(resultEntry);
});
} else {
columnMapping.forEach((key, attributes) -> {
HealthCheckTableContent resultEntry = ofNullable(content.remove(key)).map(statisticsContent -> entryFromStatistics(key, statisticsContent)).orElseGet(HealthCheckTableContent::new);
resultEntry.setCustomValues(attributes);
result.add(resultEntry);
});
content.forEach((key, statistics) -> result.add(entryFromStatistics(key, statistics)));
}
return result;
}
use of com.epam.ta.reportportal.entity.widget.content.healthcheck.HealthCheckTableContent in project commons-dao by reportportal.
the class HealthCheckTableChain method entryFromStatistics.
private HealthCheckTableContent entryFromStatistics(String key, HealthCheckTableStatisticsContent statisticsContent) {
HealthCheckTableContent resultEntry = new HealthCheckTableContent();
resultEntry.setAttributeValue(key);
resultEntry.setPassingRate(statisticsContent.getPassingRate());
resultEntry.setStatistics(statisticsContent.getStatistics());
return resultEntry;
}
Aggregations