private Future<Boolean> processReports(ReportDataContainer testReportContainer) {
Future<Boolean> submit = null;
if (testReportContainer != null) {
TestPolicy testPolicy = testReportContainer.getTestClass().getAnnotation(TestPolicy.class);
Report policyLevelReport = null;
if(testPolicy != null) {
Class<?> policyClass = testPolicy.value();
policyLevelReport = policyClass.getAnnotation(Report.class);
}
Report testClassLevelReport = testReportContainer.getTestClass().getAnnotation(Report.class);
Report annotation = testClassLevelReport != null ? testClassLevelReport : policyLevelReport;
ReportParametersBean reportParameters = null;
if (System.getProperty(SystemProperties.GENERATE_REPORT.getValue()) != null) {
reportParameters = new ReportParametersBean(
System.getProperty(SystemProperties.REPORT_FORMAT.getValue()),
System.getProperty(SystemProperties.REPORT_LOCATION.getValue()),
System.getProperty(SystemProperties.REPORT_PACKAGES.getValue()),
System.getProperty(SystemProperties.REPORT_TYPE.getValue()));
} else if (annotation != null) {
reportParameters = new ReportParametersBean(annotation.outputFormats(), annotation.reportTypes(), annotation.outputLocation());
} else {
return null;
}
String rawOutputLocation = reportParameters.getOutputLocation();