use of com.att.aro.core.bestpractice.pojo.AbstractBestPracticeResult in project VideoOptimzer by attdevsupport.
the class BestPracticeResultsListener method getBPSummaryRows.
private List<List<Object>> getBPSummaryRows() {
int pass = 0;
int fail = 0;
int warning = 0;
int selftest = 0;
int configure = 0;
int nodata = 0;
for (AbstractBestPracticeResult result : traceData.getBestPracticeResults()) {
switch(result.getResultType()) {
case PASS:
++pass;
break;
case FAIL:
++fail;
break;
case WARNING:
++warning;
break;
case SELF_TEST:
++selftest;
break;
case CONFIG_REQUIRED:
++configure;
break;
case NO_DATA:
++nodata;
break;
default:
break;
}
}
List<List<Object>> data = new ArrayList<>();
data.add(Arrays.asList(getFontStyledColumn(BPResultType.PASS.getDescription()), pass));
data.add(Arrays.asList(getFontStyledColumn(BPResultType.FAIL.getDescription()), fail));
data.add(Arrays.asList(getFontStyledColumn(BPResultType.WARNING.getDescription()), warning));
data.add(Arrays.asList(getFontStyledColumn(BPResultType.SELF_TEST.getDescription()), selftest));
data.add(Arrays.asList(getFontStyledColumn(BPResultType.CONFIG_REQUIRED.getDescription()), configure));
data.add(Arrays.asList(getFontStyledColumn(BPResultType.NO_DATA.getDescription()), nodata));
return data;
}
Aggregations