java.lang.Object
eu.europa.esig.dss.signature.AbstractSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
eu.europa.esig.dss.jades.signature.JAdESService
- All Implemented Interfaces:
eu.europa.esig.dss.signature.CounterSignatureService<JAdESCounterSignatureParameters>,eu.europa.esig.dss.signature.DocumentSignatureService<JAdESSignatureParameters,,JAdESTimestampParameters> eu.europa.esig.dss.signature.MultipleDocumentsSignatureService<JAdESSignatureParameters,,JAdESTimestampParameters> Serializable
public class JAdESService
extends eu.europa.esig.dss.signature.AbstractSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
implements eu.europa.esig.dss.signature.MultipleDocumentsSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>, eu.europa.esig.dss.signature.CounterSignatureService<JAdESCounterSignatureParameters>
Contains methods for JAdES signature creation/extension
- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.signature.AbstractSignatureService
certificateVerifier, tspSource -
Constructor Summary
ConstructorsConstructorDescriptionJAdESService(eu.europa.esig.dss.spi.validation.CertificateVerifier certificateVerifier) This is the constructor to create an instance of theJAdESService. -
Method Summary
Modifier and TypeMethodDescriptioneu.europa.esig.dss.model.DSSDocumentaddSignaturePolicyStore(eu.europa.esig.dss.model.DSSDocument document, eu.europa.esig.dss.model.SignaturePolicyStore signaturePolicyStore) Incorporates a Signature Policy Store as a base64Url-encoded unsigned property into the JAdES Signatureeu.europa.esig.dss.model.DSSDocumentaddSignaturePolicyStore(eu.europa.esig.dss.model.DSSDocument document, eu.europa.esig.dss.model.SignaturePolicyStore signaturePolicyStore, boolean base64UrlInstance) Incorporates a Signature Policy Store as an unsigned property into the JAdES Signatureprotected voidassertSigningCertificateValid(eu.europa.esig.dss.signature.AbstractSignatureParameters<?> parameters) eu.europa.esig.dss.model.DSSDocumentcounterSignSignature(eu.europa.esig.dss.model.DSSDocument signatureDocument, JAdESCounterSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue) eu.europa.esig.dss.model.DSSDocumentextendDocument(eu.europa.esig.dss.model.DSSDocument toExtendDocument, JAdESSignatureParameters parameters) eu.europa.esig.dss.spi.x509.tsp.TimestampTokengetContentTimestamp(eu.europa.esig.dss.model.DSSDocument toSignDocument, JAdESSignatureParameters parameters) eu.europa.esig.dss.spi.x509.tsp.TimestampTokengetContentTimestamp(List<eu.europa.esig.dss.model.DSSDocument> toSignDocuments, JAdESSignatureParameters parameters) This methods allows to create a TimestampToken for a detached JAdES (with a 'sigD' parameter).eu.europa.esig.dss.model.ToBeSignedgetDataToBeCounterSigned(eu.europa.esig.dss.model.DSSDocument signatureDocument, JAdESCounterSignatureParameters parameters) eu.europa.esig.dss.model.ToBeSignedgetDataToSign(eu.europa.esig.dss.model.DSSDocument toSignDocument, JAdESSignatureParameters parameters) eu.europa.esig.dss.model.ToBeSignedgetDataToSign(List<eu.europa.esig.dss.model.DSSDocument> toSignDocuments, JAdESSignatureParameters parameters) protected JAdESBuildergetJAdESBuilder(JAdESSignatureParameters parameters, List<eu.europa.esig.dss.model.DSSDocument> documentsToSign) Returns the JAdESBuilder to be usedbooleanisValidSignatureValue(eu.europa.esig.dss.model.ToBeSigned toBeSigned, eu.europa.esig.dss.model.SignatureValue signatureValue, eu.europa.esig.dss.model.x509.CertificateToken signingCertificate) eu.europa.esig.dss.model.DSSDocumentsignDocument(eu.europa.esig.dss.model.DSSDocument toSignDocument, JAdESSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue) eu.europa.esig.dss.model.DSSDocumentsignDocument(List<eu.europa.esig.dss.model.DSSDocument> toSignDocuments, JAdESSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue) eu.europa.esig.dss.model.DSSDocumenttimestamp(List<eu.europa.esig.dss.model.DSSDocument> toTimestampDocuments, JAdESTimestampParameters parameters) Methods inherited from class eu.europa.esig.dss.signature.AbstractSignatureService
ensureSignatureValue, getFinalDocumentName, getFinalDocumentName, getFinalFileName, getFinalFileName, getFinalFileName, setTspSource, timestampMethods 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.CounterSignatureService
setTspSource
-
Constructor Details
-
JAdESService
public JAdESService(eu.europa.esig.dss.spi.validation.CertificateVerifier certificateVerifier) This is the constructor to create an instance of theJAdESService. A certificate verifier must be provided.- Parameters:
certificateVerifier-CertificateVerifierprovides information on the sources to be used in the validation process in the context of a signature.
-
-
Method Details
-
getContentTimestamp
public eu.europa.esig.dss.spi.x509.tsp.TimestampToken getContentTimestamp(eu.europa.esig.dss.model.DSSDocument toSignDocument, JAdESSignatureParameters parameters) - Specified by:
getContentTimestampin interfaceeu.europa.esig.dss.signature.DocumentSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
-
getContentTimestamp
public eu.europa.esig.dss.spi.x509.tsp.TimestampToken getContentTimestamp(List<eu.europa.esig.dss.model.DSSDocument> toSignDocuments, JAdESSignatureParameters parameters) This methods allows to create a TimestampToken for a detached JAdES (with a 'sigD' parameter). NOTE: The toSignDocuments must be present in the same order they will be passed to signature computation process- Specified by:
getContentTimestampin interfaceeu.europa.esig.dss.signature.MultipleDocumentsSignatureService<JAdESSignatureParameters,JAdESTimestampParameters> - Parameters:
toSignDocuments- a list ofDSSDocuments to be timestampedparameters-JAdESSignatureParameters- Returns:
- content
TimestampToken
-
getDataToSign
public eu.europa.esig.dss.model.ToBeSigned getDataToSign(eu.europa.esig.dss.model.DSSDocument toSignDocument, JAdESSignatureParameters parameters) - Specified by:
getDataToSignin interfaceeu.europa.esig.dss.signature.DocumentSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
-
getDataToSign
public eu.europa.esig.dss.model.ToBeSigned getDataToSign(List<eu.europa.esig.dss.model.DSSDocument> toSignDocuments, JAdESSignatureParameters parameters) - Specified by:
getDataToSignin interfaceeu.europa.esig.dss.signature.MultipleDocumentsSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
-
signDocument
public eu.europa.esig.dss.model.DSSDocument signDocument(eu.europa.esig.dss.model.DSSDocument toSignDocument, JAdESSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue) - Specified by:
signDocumentin interfaceeu.europa.esig.dss.signature.DocumentSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
-
signDocument
public eu.europa.esig.dss.model.DSSDocument signDocument(List<eu.europa.esig.dss.model.DSSDocument> toSignDocuments, JAdESSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue) - Specified by:
signDocumentin interfaceeu.europa.esig.dss.signature.MultipleDocumentsSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
-
getJAdESBuilder
protected JAdESBuilder getJAdESBuilder(JAdESSignatureParameters parameters, List<eu.europa.esig.dss.model.DSSDocument> documentsToSign) Returns the JAdESBuilder to be used- Parameters:
parameters-JAdESSignatureParametersdocumentsToSign- a list ofDSSDocuments- Returns:
JAdESBuilder
-
extendDocument
public eu.europa.esig.dss.model.DSSDocument extendDocument(eu.europa.esig.dss.model.DSSDocument toExtendDocument, JAdESSignatureParameters parameters) - Specified by:
extendDocumentin interfaceeu.europa.esig.dss.signature.DocumentSignatureService<JAdESSignatureParameters,JAdESTimestampParameters> - Specified by:
extendDocumentin interfaceeu.europa.esig.dss.signature.MultipleDocumentsSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
-
timestamp
public eu.europa.esig.dss.model.DSSDocument timestamp(List<eu.europa.esig.dss.model.DSSDocument> toTimestampDocuments, JAdESTimestampParameters parameters) - Specified by:
timestampin interfaceeu.europa.esig.dss.signature.MultipleDocumentsSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
-
addSignaturePolicyStore
public eu.europa.esig.dss.model.DSSDocument addSignaturePolicyStore(eu.europa.esig.dss.model.DSSDocument document, eu.europa.esig.dss.model.SignaturePolicyStore signaturePolicyStore) Incorporates a Signature Policy Store as a base64Url-encoded unsigned property into the JAdES Signature- Parameters:
document-DSSDocumentcontaining a JAdES Signature to add a SignaturePolicyStore tosignaturePolicyStore-SignaturePolicyStoreto add- Returns:
DSSDocumentJAdESSignature with an incorporates SignaturePolicyStore
-
addSignaturePolicyStore
public eu.europa.esig.dss.model.DSSDocument addSignaturePolicyStore(eu.europa.esig.dss.model.DSSDocument document, eu.europa.esig.dss.model.SignaturePolicyStore signaturePolicyStore, boolean base64UrlInstance) Incorporates a Signature Policy Store as an unsigned property into the JAdES Signature- Parameters:
document-DSSDocumentcontaining a JAdES Signature to add a SignaturePolicyStore tosignaturePolicyStore-SignaturePolicyStoreto addbase64UrlInstance- defines if the SignaturePolicyStore shall be incorporated in its corresponding base64Url representation, otherwise if FALSE incorporates in the clear JSON representation- Returns:
DSSDocumentJAdESSignature with an incorporates SignaturePolicyStore
-
getDataToBeCounterSigned
public eu.europa.esig.dss.model.ToBeSigned getDataToBeCounterSigned(eu.europa.esig.dss.model.DSSDocument signatureDocument, JAdESCounterSignatureParameters parameters) - Specified by:
getDataToBeCounterSignedin interfaceeu.europa.esig.dss.signature.CounterSignatureService<JAdESCounterSignatureParameters>
-
counterSignSignature
public eu.europa.esig.dss.model.DSSDocument counterSignSignature(eu.europa.esig.dss.model.DSSDocument signatureDocument, JAdESCounterSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue) - Specified by:
counterSignSignaturein interfaceeu.europa.esig.dss.signature.CounterSignatureService<JAdESCounterSignatureParameters>
-
isValidSignatureValue
public boolean isValidSignatureValue(eu.europa.esig.dss.model.ToBeSigned toBeSigned, eu.europa.esig.dss.model.SignatureValue signatureValue, eu.europa.esig.dss.model.x509.CertificateToken signingCertificate) - Specified by:
isValidSignatureValuein interfaceeu.europa.esig.dss.signature.DocumentSignatureService<JAdESSignatureParameters,JAdESTimestampParameters> - Specified by:
isValidSignatureValuein interfaceeu.europa.esig.dss.signature.MultipleDocumentsSignatureService<JAdESSignatureParameters,JAdESTimestampParameters> - Overrides:
isValidSignatureValuein classeu.europa.esig.dss.signature.AbstractSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
-
assertSigningCertificateValid
protected void assertSigningCertificateValid(eu.europa.esig.dss.signature.AbstractSignatureParameters<?> parameters) - Overrides:
assertSigningCertificateValidin classeu.europa.esig.dss.signature.AbstractSignatureService<JAdESSignatureParameters,JAdESTimestampParameters>
-