@Test public void validTimeStampToken() { SimpleReport simpleReport = validationService.validateDocument(buildValidationDocument("timestamptoken-ddoc.asics")).getSimpleReport(); TimeStampTokenValidationData validationData = simpleReport.getValidationConclusion().getTimeStampTokens().get(0); Assert.assertEquals(TimeStampTokenValidationData.Indication.TOTAL_PASSED, validationData.getIndication()); Assert.assertEquals("SK TIMESTAMPING AUTHORITY", validationData.getSignedBy()); Assert.assertNull(validationData.getError()); }
@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);  }