Class SignedDocumentExtender
java.lang.Object
eu.europa.esig.dss.extension.SignedDocumentExtender
- All Implemented Interfaces:
DocumentExtender
- Direct Known Subclasses:
AbstractDocumentExtender
This class contains common code for signature augmentation utilities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CertificateVerifierThe reference to the certificate verifier.protected DocumentSignatureService<?,?>[] (Optional) Document signature services.protected TSPSourceThe source to be used for a timestamp token request, when applicable. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SignedDocumentExtenderfromDocument(DSSDocument dssDocument) This method guesses the document format and returns an appropriate document reader.abstract SignatureFormGets the signature form for the current implementationbooleanisASiC()Gets whether the document to be extended represents an ASiC containervoidsetCertificateVerifier(CertificateVerifier certificateVerifier) Sets a CertificateVerifier providing a configuration for validation of certificates within the original signature or signatures.voidsetServices(DocumentSignatureService<?, ?>... services) (Optional) Sets document signature services.voidsetTspSource(TSPSource tspSource) Source to be used for time-stamp requests, when applicable (e.g.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DocumentExtender
extendDocument, extendDocument, extendDocument, extendDocument, isSupported
-
Field Details
-
certificateVerifier
The reference to the certificate verifier. The current DSS implementation proposesCommonCertificateVerifier. This verifier encapsulates the references to different sources used in the signature validation process. -
tspSource
The source to be used for a timestamp token request, when applicable. -
services
(Optional) Document signature services. When defined, the applicable instance of a corresponding service will be used. If no suitable service found, a new service instance will be created.
-
-
Constructor Details
-
SignedDocumentExtender
protected SignedDocumentExtender()Empty constructor
-
-
Method Details
-
fromDocument
This method guesses the document format and returns an appropriate document reader.- Parameters:
dssDocument- The instance ofDSSDocumentto validate- Returns:
- returns the specific instance of
DocumentReaderin terms of the document type
-
setCertificateVerifier
Description copied from interface:DocumentExtenderSets a CertificateVerifier providing a configuration for validation of certificates within the original signature or signatures.- Specified by:
setCertificateVerifierin interfaceDocumentExtender- Parameters:
certificateVerifier-CertificateVerifier
-
setTspSource
Description copied from interface:DocumentExtenderSource to be used for time-stamp requests, when applicable (e.g. BASELINE-T or BASELINE-LTA profile extension)- Specified by:
setTspSourcein interfaceDocumentExtender- Parameters:
tspSource-TSPSource
-
setServices
(Optional) Sets document signature services. When defined, the applicable instance of a corresponding service will be used. If no suitable service found, a new service instance will be created.- Parameters:
services- an array ofDocumentSignatureServices
-
getSignatureForm
Gets the signature form for the current implementation- Returns:
SignatureForm
-
isASiC
public boolean isASiC()Gets whether the document to be extended represents an ASiC container- Returns:
- TRUE if the document is an ASiC container, FALSE otherwise
-