/* * DSS - Digital Signature Services * * Copyright (C) 2013 European Commission, Directorate-General Internal Market and Services (DG MARKT), B-1049 Bruxelles/Brussel * * Developed by: 2013 ARHS Developments S.A. (rue Nicolas Bové 2B, L-1253 Luxembourg) http://www.arhs-developments.com * * This file is part of the "DSS - Digital Signature Services" project. * * "DSS - Digital Signature Services" is free software: you can redistribute it and/or modify it under the terms of * the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the * License, or (at your option) any later version. * * DSS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along with * "DSS - Digital Signature Services". If not, see <http://www.gnu.org/licenses/>. */ package eu.europa.ec.markt.dss.validation102853.report; /** * This class is a container for all reports generated by the validation process: diagnostic data, detailed report and simple report. * <p/> * DISCLAIMER: Project owner DG-MARKT. * * @author <a href="mailto:dgmarkt.Project-DSS@arhs-developments.com">ARHS Developments</a> * @version $Revision: 1016 $ - $Date: 2011-06-17 15:30:45 +0200 (Fri, 17 Jun 2011) $ */ public class Reports { /** * This variable contains the reference to the diagnostic data object. */ protected DiagnosticData diagnosticData; /** * This is the detailed report of the validation. */ protected DetailedReport detailedReport; /** * This is the simple report generated at the end of the validation process. */ protected SimpleReport simpleReport; /** * This variable defines the sequence of the reports related to a document to validate. It's only used with ASiC-E container. */ private Reports nextReports; /** * This is the default constructor to instantiate this container. * * @param diagnosticData {@code DiagnosticData} * @param detailedReport {@code DetailedReport} * @param simpleReport {@code SimpleReport} */ public Reports(final DiagnosticData diagnosticData, final DetailedReport detailedReport, final SimpleReport simpleReport) { this.diagnosticData = diagnosticData; this.detailedReport = detailedReport; this.simpleReport = simpleReport; } /** * This method returns the reference to the diagnostic data object generated during the validation process. * * @return {@code DiagnosticData} */ public DiagnosticData getDiagnosticData() { return diagnosticData; } public DetailedReport getDetailedReport() { return detailedReport; } public SimpleReport getSimpleReport() { return simpleReport; } /** * This method allows to set the sequence of the reports related to a document to validate. It's only used with ASiC-E container. * * @param nextReports */ public void setNextReport(final Reports nextReports) { this.nextReports = nextReports; } /** * @return {@code Reports} which corresponds to the next signature found with in the ASiC-E container. {@code null} if there is no more signatures. */ public Reports getNextReports() { return nextReports; } /** * For debug purpose. */ public void print() { String reportDeep = "#"; Reports currentReports = this; do { System.out.println("[" + reportDeep + "] ----------------Diagnostic data-----------------"); System.out.println(currentReports.diagnosticData); System.out.println("[" + reportDeep + "] ----------------Validation report---------------"); System.out.println(currentReports.detailedReport); System.out.println("[" + reportDeep + "] ----------------Simple report-------------------"); System.out.println(currentReports.simpleReport); System.out.println("[" + reportDeep + "] END ------------------------------------------------"); reportDeep += "#"; currentReports = currentReports.getNextReports(); } while (currentReports != null); } }