Class AbstractASiCSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>
java.lang.Object
eu.europa.esig.dss.signature.AbstractSignatureService<SP,TP>
eu.europa.esig.dss.asic.common.signature.AbstractASiCSignatureService<SP,TP>
- All Implemented Interfaces:
DocumentSignatureService<SP,TP>,MultipleDocumentsSignatureService<SP,TP>,Serializable
- Direct Known Subclasses:
ASiCWithCAdESService,ASiCWithXAdESService
public abstract class AbstractASiCSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters> extends AbstractSignatureService<SP,TP> implements MultipleDocumentsSignatureService<SP,TP>
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected ASiCExtractResultarchiveContentFields inherited from class eu.europa.esig.dss.signature.AbstractSignatureService
certificateVerifier, tspSource -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractASiCSignatureService(CertificateVerifier certificateVerifier) -
Method Summary
Modifier and Type Method Description protected DSSDocumentbuildASiCContainer(List<DSSDocument> documentsToBeSigned, List<DSSDocument> signatures, List<DSSDocument> documentsToStore, ASiCParameters asicParameters, DSSDocument rootContainer)protected voidextractCurrentArchive(DSSDocument archive)protected abstract AbstractASiCContainerExtractorgetArchiveExtractor(DSSDocument archive)TimestampTokengetContentTimestamp(DSSDocument toSignDocument, SP parameters)This method allows to compute a content-timestamp (which is added in the signed properties)ToBeSignedgetDataToSign(DSSDocument toSignDocument, SP parameters)Retrieves the bytes of the data that need to be signed based on thetoSignDocumentandparameters.protected List<DSSDocument>getEmbeddedArchiveManifests()protected List<DSSDocument>getEmbeddedManifests()protected DSSDocumentgetEmbeddedMimetype()protected List<DSSDocument>getEmbeddedSignatures()protected List<DSSDocument>getEmbeddedSignedDocuments()protected List<DSSDocument>getEmbeddedTimestamps()protected abstract StringgetExpectedSignatureExtension()protected abstract booleanisSignatureFilename(String name)protected DSSDocumentmergeArchiveAndExtendedSignatures(DSSDocument archiveDocument, List<DSSDocument> signaturesToAdd)DSSDocumentsignDocument(DSSDocument toSignDocument, SP parameters, SignatureValue signatureValue)Signs the toSignDocument with the provided signatureValue.protected voidstoreZipComment(ASiCParameters asicParameters, ZipOutputStream zos)DSSDocumenttimestamp(DSSDocument toTimestampDocument, TP parameters)This method allows to add a timestamp to an unsigned documentMethods inherited from class eu.europa.esig.dss.signature.AbstractSignatureService
assertSigningDateInCertificateValidityRange, getFinalArchiveName, getFinalFileName, setTspSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.europa.esig.dss.signature.DocumentSignatureService
extendDocumentMethods inherited from interface eu.europa.esig.dss.signature.MultipleDocumentsSignatureService
extendDocument, getContentTimestamp, getDataToSign, signDocument, timestamp
-
Field Details
-
Constructor Details
-
Method Details
-
getExpectedSignatureExtension
-
getContentTimestamp
Description copied from interface:DocumentSignatureServiceThis method allows to compute a content-timestamp (which is added in the signed properties)- Specified by:
getContentTimestampin interfaceDocumentSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>- Parameters:
toSignDocument- document to sign or the already existing signatureparameters- set of the driving signing parameters- Returns:
- a timestamp token
-
getDataToSign
Description copied from interface:DocumentSignatureServiceRetrieves the bytes of the data that need to be signed based on thetoSignDocumentandparameters. WhentoSignDocumentcontains an already existing signature the returned bytes are related to a new parallel signature. - Enveloped signature (XML): a new signature is added and the signed data corresponds to that pointed by the first signature; - Enveloping signature: - - XML: The parallel signature is not possible - - CMS: A new parallel signature is added - Detached signature: - - XML: The parallel signature is added - - CMS: A new parallel signature is added- Specified by:
getDataToSignin interfaceDocumentSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>- Parameters:
toSignDocument- document to sign or the already existing signatureparameters- set of the driving signing parameters- Returns:
- the data to be signed
-
signDocument
public DSSDocument signDocument(DSSDocument toSignDocument, SP parameters, SignatureValue signatureValue)Description copied from interface:DocumentSignatureServiceSigns the toSignDocument with the provided signatureValue.- Specified by:
signDocumentin interfaceDocumentSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>- Parameters:
toSignDocument- document to signparameters- set of the driving signing parameterssignatureValue- the signature value to incorporate- Returns:
- the signed document (
toSignDocumentwith the incorporated signature or the detached signature)
-
timestamp
Description copied from interface:DocumentSignatureServiceThis method allows to add a timestamp to an unsigned document- Specified by:
timestampin interfaceDocumentSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>- Overrides:
timestampin classAbstractSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>- Parameters:
toTimestampDocument- the document to be timestampedparameters- set of the driving timestamping parameters- Returns:
- the timestamped document
-
extractCurrentArchive
-
getArchiveExtractor
-
getEmbeddedSignatures
-
getEmbeddedManifests
-
getEmbeddedArchiveManifests
-
getEmbeddedTimestamps
-
getEmbeddedSignedDocuments
-
getEmbeddedMimetype
-
mergeArchiveAndExtendedSignatures
protected DSSDocument mergeArchiveAndExtendedSignatures(DSSDocument archiveDocument, List<DSSDocument> signaturesToAdd) -
isSignatureFilename
-
buildASiCContainer
protected DSSDocument buildASiCContainer(List<DSSDocument> documentsToBeSigned, List<DSSDocument> signatures, List<DSSDocument> documentsToStore, ASiCParameters asicParameters, DSSDocument rootContainer) -
storeZipComment
-