@Test public void notValidTstFile() throws Exception { expectedException.expect(MalformedDocumentException.class); validationService.validateDocument(buildValidationDocument("timestamptoken-invalid.asics")); }
@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);  }