use of org.asqatasun.webapp.presentation.data.TestResult in project Asqatasun by Asqatasun.
the class TestResultFactory method getTestResultListFromCriterion.
/**
*
* @param webresource
* @param crit
* @return the test result list without user filter (used for the export
* function)
*/
public Map<Theme, List<TestResult>> getTestResultListFromCriterion(WebResource webresource, Criterion crit) {
// Map that associates a list of results with a theme
List<TestResult> testResultList = new LinkedList();
List<ProcessResult> netResultList = (List<ProcessResult>) processResultDataService.getProcessResultListByWebResourceAndCriterion(webresource, crit);
netResultList.addAll(addNotTestedProcessResult(testDataService.findAllByCriterion(crit), crit.getTheme().getCode(), netResultList));
sortCollection(netResultList);
for (ProcessResult processResult : netResultList) {
if (processResult instanceof DefiniteResult) {
TestResult testResult = getTestResult(processResult, true, false);
testResultList.add(testResult);
}
}
Map<Theme, List<TestResult>> testResultMap = new HashMap();
testResultMap.put(crit.getTheme(), testResultList);
return testResultMap;
}
Aggregations