Module jpms_dss_document
Interface EvidenceRecordValidatorFactory
- All Superinterfaces:
DocumentValidatorFactory
This interface defines the factory to create a
EvidenceRecordValidator for
a given DSSDocument-
Method Summary
Modifier and TypeMethodDescriptioncreate(eu.europa.esig.dss.model.DSSDocument document) This method instantiates aEvidenceRecordValidatorwith the given documentstatic EvidenceRecordValidatorfromDocument(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 ofEvidenceRecordValidatorsupports 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 ofEvidenceRecordValidatorsupports the given document- Specified by:
isSupportedin interfaceDocumentValidatorFactory- Parameters:
document- the document to be tested- Returns:
- true, if the
EvidenceRecordValidatorsupports the given document
-
create
This method instantiates aEvidenceRecordValidatorwith the given document- Specified by:
createin interfaceDocumentValidatorFactory- Parameters:
document- the document to be used for theEvidenceRecordValidatorcreation- Returns:
- an instance of
EvidenceRecordValidatorwith 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 EvidenceRecordValidator 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:
EvidenceRecordValidatorif corresponding implementation found- Throws:
UnsupportedOperationException- is the document format is not supported or implementation is not found
-