/** * */ package at.gv.egiz.pdfas.impl.api.analyze; import java.util.List; import at.gv.egiz.pdfas.api.analyze.AnalyzeResult; import at.gv.egiz.pdfas.api.exceptions.PdfAsException; /** * Holds the result of an analyzation. * * @author wprinz */ public class AnalyzeResultImpl implements AnalyzeResult { /** * The found signatures. */ protected List signatures = null; /** * The found non-signature update blocks. */ protected List noSignatures = null; protected boolean hasBeenCorrected = false; /** * Constructor. * * @param signatures * The found signatures. * @param noSignatures * The found non-signature update blocks. */ public AnalyzeResultImpl(List signatures, List noSignatures, boolean hasBeenCorrected) { if (signatures == null) { throw new IllegalArgumentException("The list of found signatures must not be null."); } this.signatures = signatures; this.noSignatures = noSignatures; this.hasBeenCorrected = hasBeenCorrected; } /** * Constructor. * * @param signatures * The found signatures. */ public AnalyzeResultImpl(List signatures) { if (signatures == null) { throw new IllegalArgumentException("The list of found signatures must not be null."); } this.signatures = signatures; } /** * @see at.gv.egiz.pdfas.api.analyze.AnalyzeResult#getSignatures() */ public List getSignatures() throws PdfAsException { return this.signatures; } public List getNoSignatures() { return this.noSignatures; } /** * Tells if the document has been corrected before verification. The correction maybe done * after a first failing parse to repair a document (if enabled in the configuration * correct_document_on_verify_if_necessary). The correction can only work for textual * signatures. Binary signatures are lost anyhow. * @return */ public boolean hasBeenCorrected() { return hasBeenCorrected; } public void setHasBeenCorrected(boolean hasBeenCorrected) { this.hasBeenCorrected = hasBeenCorrected; } }