Module jpms_dss_spi
Interface EvidenceRecordAnalyzerFactory
- All Superinterfaces:
DocumentAnalyzerFactory
This class is used to load a corresponding implementation of
EvidenceRecordAnalyzer
for processing of an evidence record document-
Method Summary
Modifier and TypeMethodDescriptioncreate(eu.europa.esig.dss.model.DSSDocument document) This method instantiates aEvidenceRecordAnalyzerwith the given documentstatic EvidenceRecordAnalyzerfromDocument(eu.europa.esig.dss.model.DSSDocument document) Creates anEvidenceRecordValidatorby loading a corresponding implementation, acrossEvidenceRecordValidatorFactoryinstances found by ServiceLoader.booleanisSupported(eu.europa.esig.dss.model.DSSDocument document) This method tests if the current implementation ofEvidenceRecordAnalyzersupports the given documentstatic booleanisSupportedDocument(eu.europa.esig.dss.model.DSSDocument document) Verifies if thedocumentis supported by one of the implementations, acrossEvidenceRecordValidatorFactoryinstances found by ServiceLoader.
-
Method Details
-
isSupported
boolean isSupported(eu.europa.esig.dss.model.DSSDocument document) This method tests if the current implementation ofEvidenceRecordAnalyzersupports the given document- Specified by:
isSupportedin interfaceDocumentAnalyzerFactory- Parameters:
document- the document to be tested- Returns:
- true, if the
EvidenceRecordAnalyzersupports the given document
-
create
This method instantiates aEvidenceRecordAnalyzerwith the given document- Specified by:
createin interfaceDocumentAnalyzerFactory- Parameters:
document- the document to be used for theEvidenceRecordAnalyzercreation- Returns:
- an instance of
EvidenceRecordAnalyzerwith the document
-
isSupportedDocument
static boolean isSupportedDocument(eu.europa.esig.dss.model.DSSDocument document) Verifies if thedocumentis supported by one of the implementations, acrossEvidenceRecordValidatorFactoryinstances found by ServiceLoader.- Parameters:
document-DSSDocumentto verify- Returns:
- TRUE if the evidence record is supported by one of the found implementations, FALSE otherwise
-
fromDocument
static EvidenceRecordAnalyzer fromDocument(eu.europa.esig.dss.model.DSSDocument document) throws UnsupportedOperationException Creates anEvidenceRecordValidatorby loading a corresponding implementation, acrossEvidenceRecordValidatorFactoryinstances found by ServiceLoader.- Parameters:
document-DSSDocumentto load validator for- Returns:
EvidenceRecordAnalyzerif corresponding implementation found- Throws:
UnsupportedOperationException- is the document format is not supported or implementation is not found
-