Package org.digidoc4j.impl.ddoc
Class DDocSignature
java.lang.Object
org.digidoc4j.impl.ddoc.DDocSignature
- All Implemented Interfaces:
Serializable,Signature
Signature implementation. Provides an interface for handling a signature and the
corresponding OCSP response properties.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns signature as XAdES XMLorg.digidoc4j.ddoc.CertValuegetCertValueOfType(int type) Retrieves CertValue element with the desired typegetCity()Returns the signature production city.Returns the computer's time of signing.Returns the signature production country.getId()Returns the signature id.intGet index In array.Returns the signature OCSP responder certificate.byte[]Returns the signature OCSP response nonce ornullif OCSP response is not present or OCSP nonce is not found inside the OCSP response.This method returns OCSP response creation time (Date object), it can be null.Returns the signature production postal code.Returns the signature profile.Returns the signature method that was used for signing.Returns the signer's roles.Returns the signature certificate that was used for signing.Returns the signature production state or province.Returns the signature timestamp generation time.Returns the signature TimeStampToken certificate.This method returns OCSP response creation time (Date object), it can be null.Returns the identifier that uniquely identifies this signature.voidsetCertificate(X509Cert cert) Set certificate.voidsetIndexInArray(int indexInArray) Set index In array.Validates the signature.
-
Constructor Details
-
DDocSignature
public DDocSignature(org.digidoc4j.ddoc.Signature signature) - Parameters:
signature- add description
-
-
Method Details
-
setCertificate
Set certificate.- Parameters:
cert-
-
getCity
Description copied from interface:SignatureReturns the signature production city. -
getCountryName
Description copied from interface:SignatureReturns the signature production country.- Specified by:
getCountryNamein interfaceSignature- Returns:
- production country
-
getId
Description copied from interface:SignatureReturns the signature id. -
getUniqueId
Description copied from interface:SignatureReturns the identifier that uniquely identifies this signature.- Specified by:
getUniqueIdin interfaceSignature- Returns:
- unique identifier
-
getOCSPNonce
public byte[] getOCSPNonce()Description copied from interface:SignatureReturns the signature OCSP response nonce ornullif OCSP response is not present or OCSP nonce is not found inside the OCSP response.- Specified by:
getOCSPNoncein interfaceSignature- Returns:
- OCSP response nonce or
nullif not found
-
getOCSPCertificate
Description copied from interface:SignatureReturns the signature OCSP responder certificate.- Specified by:
getOCSPCertificatein interfaceSignature- Returns:
- OCSP responder certificate
-
getPostalCode
Description copied from interface:SignatureReturns the signature production postal code.- Specified by:
getPostalCodein interfaceSignature- Returns:
- postal code
-
getOCSPResponseCreationTime
This method returns OCSP response creation time (Date object), it can be null.- Specified by:
getOCSPResponseCreationTimein interfaceSignature- Returns:
- date.
-
getTimeStampCreationTime
Description copied from interface:SignatureReturns the signature timestamp generation time.- Specified by:
getTimeStampCreationTimein interfaceSignature- Returns:
- generation timestamp
-
getTrustedSigningTime
This method returns OCSP response creation time (Date object), it can be null.- Specified by:
getTrustedSigningTimein interfaceSignature- Returns:
- date.
-
getProfile
Description copied from interface:SignatureReturns the signature profile.- Specified by:
getProfilein interfaceSignature- Returns:
- profile
-
getSignatureMethod
Description copied from interface:SignatureReturns the signature method that was used for signing.- Specified by:
getSignatureMethodin interfaceSignature- Returns:
- signature method
-
getSignerRoles
Description copied from interface:SignatureReturns the signer's roles.- Specified by:
getSignerRolesin interfaceSignature- Returns:
- signer roles
-
getSigningCertificate
Description copied from interface:SignatureReturns the signature certificate that was used for signing.- Specified by:
getSigningCertificatein interfaceSignature- Returns:
- signature certificate
-
getClaimedSigningTime
Description copied from interface:SignatureReturns the computer's time of signing.See also
Signature.getTrustedSigningTime()- Specified by:
getClaimedSigningTimein interfaceSignature- Returns:
- signing time
-
getStateOrProvince
Description copied from interface:SignatureReturns the signature production state or province.- Specified by:
getStateOrProvincein interfaceSignature- Returns:
- production state or province
-
getTimeStampTokenCertificate
Description copied from interface:SignatureReturns the signature TimeStampToken certificate. For a DDOC Signature it throws a NotYetImplementedException.- Specified by:
getTimeStampTokenCertificatein interfaceSignature- Returns:
- TimeStampToken certificate
-
validateSignature
Description copied from interface:SignatureValidates the signature.- Specified by:
validateSignaturein interfaceSignature- Returns:
- the validation result.
-
getCertValueOfType
public org.digidoc4j.ddoc.CertValue getCertValueOfType(int type) Retrieves CertValue element with the desired type- Parameters:
type- CertValue type- Returns:
- CertValue element or null if not found
-
getAdESSignature
public byte[] getAdESSignature()Description copied from interface:SignatureReturns signature as XAdES XML- Specified by:
getAdESSignaturein interfaceSignature- Returns:
- signature as byte array
-
getIndexInArray
public int getIndexInArray()Get index In array.- Returns:
- integer.
-
setIndexInArray
public void setIndexInArray(int indexInArray) Set index In array.- Parameters:
indexInArray-
-