@Override public void visitProblemReport(ProblemReport problemReport) { m_domain = problemReport.getDomain(); m_report = new ProblemReport(); m_report.getIps().addAll(problemReport.getIps()); m_report.getDomainNames().addAll(problemReport.getDomainNames()); m_report.setDomain(problemReport.getDomain()); m_report.setStartTime(problemReport.getStartTime()); m_report.setEndTime(problemReport.getEndTime()); super.visitProblemReport(problemReport); }
public ProblemReport createAggregatedReport(Map<String, ProblemReport> reports) { ProblemReport report = new ProblemReport(Constants.ALL); ProblemReportAllBuilder visitor = new ProblemReportAllBuilder(report); try { for (ProblemReport temp : reports.values()) { if (m_manager.validateDomain(temp.getDomain())) { report.getIps().add(temp.getDomain()); report.getDomainNames().add(temp.getDomain()); visitor.visitProblemReport(temp); } } } catch (Exception e) { Cat.logError(e); } return report; }