Class AbstractDocumentExtender<SP extends AbstractSignatureParameters<?>, TP extends eu.europa.esig.dss.model.TimestampParameters>
java.lang.Object
eu.europa.esig.dss.extension.SignedDocumentExtender
eu.europa.esig.dss.extension.AbstractDocumentExtender<SP,TP>
- Type Parameters:
SP-SerializableSignatureParametersspecifying the signature creation parametersTP-SerializableTimestampParametersspecifying the timestamp creation parameters, when applicable
public abstract class AbstractDocumentExtender<SP extends AbstractSignatureParameters<?>, TP extends eu.europa.esig.dss.model.TimestampParameters>
extends SignedDocumentExtender
This class provides an abstract implementation of the
eu.europa.esig.dss.spi.augmentation.DocumentExtender-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected eu.europa.esig.dss.model.DSSDocumentThe document to be augmented (with the signatures)Fields inherited from class SignedDocumentExtender
certificateVerifier, services, tspSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract DocumentSignatureService<SP, TP> This method created a new instance ofDocumentSignatureServiceprotected abstract SPThis method returns a new instance of empty signature parameters, according to the given format implementationeu.europa.esig.dss.model.DSSDocumentextendDocument(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile) eu.europa.esig.dss.model.DSSDocumentextendDocument(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, eu.europa.esig.dss.model.SerializableSignatureParameters... extensionParameters) eu.europa.esig.dss.model.DSSDocumentextendDocument(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, List<eu.europa.esig.dss.model.DSSDocument> detachedContents) eu.europa.esig.dss.model.DSSDocumentextendDocument(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, List<eu.europa.esig.dss.model.DSSDocument> detachedContents, eu.europa.esig.dss.model.SerializableSignatureParameters... extensionParameters) protected SPfillSignatureParameters(SP signatureParameters, eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, List<eu.europa.esig.dss.model.DSSDocument> detachedContents) This method fills thesignatureParameterswith the parameters from theaugmentationParametersprotected eu.europa.esig.dss.enumerations.SignatureLevelgetSignatureLevel(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile) Gets the targetSignatureLevelfor the givenSignatureProfilerelatively to the signature formatprotected SPinitSignatureParameters(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, List<eu.europa.esig.dss.model.DSSDocument> detachedContents, eu.europa.esig.dss.model.SerializableSignatureParameters... extensionParameters) This method initializes signature parameters to be used on the signature augmentationprotected DocumentSignatureService<SP, TP> This method initializes a newDocumentSignatureServicebooleanisSupported(eu.europa.esig.dss.model.DSSDocument arg0) protected abstract booleanisSupportedParameters(eu.europa.esig.dss.model.SerializableSignatureParameters parameters) This method verifies whether the provided signature parameters are supported by the current implementationprotected abstract booleanisSupportedService(DocumentSignatureService<?, ?> service) This method verifies whether the provided document signature service is supported by the current implementationMethods inherited from class SignedDocumentExtender
fromDocument, getSignatureForm, isASiC, setCertificateVerifier, setServices, setTspSource
-
Field Details
-
document
protected eu.europa.esig.dss.model.DSSDocument documentThe document to be augmented (with the signatures)
-
-
Constructor Details
-
AbstractDocumentExtender
protected AbstractDocumentExtender()Empty constructor
-
-
Method Details
-
extendDocument
public eu.europa.esig.dss.model.DSSDocument extendDocument(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile) -
extendDocument
public eu.europa.esig.dss.model.DSSDocument extendDocument(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, List<eu.europa.esig.dss.model.DSSDocument> detachedContents) -
extendDocument
public eu.europa.esig.dss.model.DSSDocument extendDocument(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, eu.europa.esig.dss.model.SerializableSignatureParameters... extensionParameters) -
extendDocument
public eu.europa.esig.dss.model.DSSDocument extendDocument(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, List<eu.europa.esig.dss.model.DSSDocument> detachedContents, eu.europa.esig.dss.model.SerializableSignatureParameters... extensionParameters) -
initSignatureService
This method initializes a newDocumentSignatureService- Returns:
DocumentSignatureService
-
createSignatureService
This method created a new instance ofDocumentSignatureService- Returns:
DocumentSignatureService
-
isSupportedService
This method verifies whether the provided document signature service is supported by the current implementation- Parameters:
service-DocumentSignatureServiceto check- Returns:
- TRUE if the service is supported by the current implementation, FALSE otherwise
-
initSignatureParameters
protected SP initSignatureParameters(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, List<eu.europa.esig.dss.model.DSSDocument> detachedContents, eu.europa.esig.dss.model.SerializableSignatureParameters... extensionParameters) This method initializes signature parameters to be used on the signature augmentation- Parameters:
signatureProfile-SignatureProfilerepresenting a target level on signature augmentationdetachedContents- a list ofDSSDocumentfor a detached signatureextensionParameters- array of format specificSerializableSignatureParameters, when applicable- Returns:
SerializableSignatureParameters
-
emptySignatureParameters
This method returns a new instance of empty signature parameters, according to the given format implementation- Returns:
SerializableSignatureParameters
-
isSupportedParameters
protected abstract boolean isSupportedParameters(eu.europa.esig.dss.model.SerializableSignatureParameters parameters) This method verifies whether the provided signature parameters are supported by the current implementation- Parameters:
parameters-SerializableSignatureParametersto check- Returns:
- TRUE if the parameters are supported by the current implementation, FALSE otherwise
-
fillSignatureParameters
protected SP fillSignatureParameters(SP signatureParameters, eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, List<eu.europa.esig.dss.model.DSSDocument> detachedContents) This method fills thesignatureParameterswith the parameters from theaugmentationParameters- Parameters:
signatureParameters-SerializableSignatureParametersto fillsignatureProfile-SignatureProfilerepresenting a target level on signature augmentationdetachedContents- a list ofDSSDocumentfor a detached signature- Returns:
SerializableSignatureParameters
-
getSignatureLevel
protected eu.europa.esig.dss.enumerations.SignatureLevel getSignatureLevel(eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile) Gets the targetSignatureLevelfor the givenSignatureProfilerelatively to the signature format- Parameters:
signatureProfile-SignatureProfile- Returns:
SignatureLevel
-
isSupported
boolean isSupported(eu.europa.esig.dss.model.DSSDocument arg0)
-