@Test public void dataFiledChanged() throws Exception { SimpleReport simpleReport = validationService.validateDocument(buildValidationDocument("timestamptoken-datafile-changed.asics")).getSimpleReport(); Assert.assertEquals("Signature not intact", simpleReport.getValidationConclusion().getTimeStampTokens().get(0).getError().get(0).getContent()); }
@Override public Reports validateDocument(ValidationDocument validationDocument) { List<InMemoryDocument> documents = getFilesFromContainer(validationDocument); validateContainer(documents); TimeStampToken timeStampToken = getTimeStamp(documents); List<Error> errors = validateTimeStamp(documents, timeStampToken); TimeStampTokenValidationReportBuilder reportBuilder = new TimeStampTokenValidationReportBuilder(validationDocument, timeStampToken, signaturePolicyService.getPolicy(validationDocument.getSignaturePolicy()), errors, reportConfigurationProperties.isReportSignatureEnabled()); return reportBuilder.build(); }
TimeStampTokenValidationService implements ValidationService { @Override public Reports validateDocument(ValidationDocument validationDocument) { List<InMemoryDocument> documents = getFilesFromContainer(validationDocument); validateContainer(documents); TimeStampToken timeStampToken = getTimeStamp(documents); List<Error> errors = validateTimeStamp(documents, timeStampToken); TimeStampTokenValidationReportBuilder reportBuilder = new TimeStampTokenValidationReportBuilder(validationDocument, timeStampToken, signaturePolicyService.getPolicy(validationDocument.getSignaturePolicy()), errors, reportConfigurationProperties.isReportSignatureEnabled()); return reportBuilder.build(); } }
TimeStampTokenValidationService implements ValidationService { @Override public Reports validateDocument(ValidationDocument validationDocument) { List<InMemoryDocument> documents = getFilesFromContainer(validationDocument); validateContainer(documents); TimeStampToken timeStampToken = getTimeStamp(documents); List<Error> errors = validateTimeStamp(documents, timeStampToken); TimeStampTokenValidationReportBuilder reportBuilder = new TimeStampTokenValidationReportBuilder(validationDocument, timeStampToken, signaturePolicyService.getPolicy(validationDocument.getSignaturePolicy()), errors, reportConfigurationProperties.isReportSignatureEnabled()); return reportBuilder.build(); }  }
TimeStampTokenValidationService implements ValidationService { @Override public Reports validateDocument(ValidationDocument validationDocument) { List<InMemoryDocument> documents = getFilesFromContainer(validationDocument); validateContainer(documents); TimeStampToken timeStampToken = getTimeStamp(documents); List<Error> errors = validateTimeStamp(documents, timeStampToken); TimeStampTokenValidationReportBuilder reportBuilder = new TimeStampTokenValidationReportBuilder(validationDocument, timeStampToken, signaturePolicyService.getPolicy(validationDocument.getSignaturePolicy()), errors, reportConfigurationProperties.isReportSignatureEnabled()); return reportBuilder.build(); }  @Override Reports validateDocument(ValidationDocument validationDocument); @Autowired @Qualifier("timestampPolicyService") void setSignaturePolicyService(SignaturePolicyService<ValidationPolicy> signaturePolicyService); @Autowired void setReportConfigurationProperties(ReportConfigurationProperties reportConfigurationProperties); }
TimeStampTokenValidationService implements ValidationService { @Override public Reports validateDocument(ValidationDocument validationDocument) { List<InMemoryDocument> documents = getFilesFromContainer(validationDocument); validateContainer(documents); TimeStampToken timeStampToken = getTimeStamp(documents); List<Error> errors = validateTimeStamp(documents, timeStampToken); TimeStampTokenValidationReportBuilder reportBuilder = new TimeStampTokenValidationReportBuilder(validationDocument, timeStampToken, signaturePolicyService.getPolicy(validationDocument.getSignaturePolicy()), errors, reportConfigurationProperties.isReportSignatureEnabled()); return reportBuilder.build(); }  @Override Reports validateDocument(ValidationDocument validationDocument); @Autowired @Qualifier("timestampPolicyService") void setSignaturePolicyService(SignaturePolicyService<ValidationPolicy> signaturePolicyService); @Autowired void setReportConfigurationProperties(ReportConfigurationProperties reportConfigurationProperties);  }