Package eu.europa.esig.dss.simplereport
Class SimpleReport
java.lang.Object
eu.europa.esig.dss.simplereport.SimpleReport
A SimpleReport holder to fetch values from a JAXB SimpleReport.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdESValidationErrors
(String tokenId) This method retrieve the ETSI EN 319 102-1 AdES validation errors for a given token by idgetAdESValidationInfo
(String tokenId) This method retrieve the ETSI EN 319 102-1 AdES validation information for a given token by idgetAdESValidationWarnings
(String tokenId) This method retrieve the ETSI EN 319 102-1 AdES validation warnings for a given token by idgetBestSignatureTime
(String signatureId) This method returns the best-signature-timegetCertificateChain
(String tokenId) Returns a certificate chain a given tokenIdReturns a container type, when applicable (i.e.Returns a file name for the validated documentgetEvidenceRecordById
(String evidenceRecordId) This method returns a wrapper for the given evidence recordThis method retrieves the evidence record idsgetEvidenceRecordPOE
(String evidenceRecordId) This method returns the lowest POE of evidence recordgetEvidenceRecordTimestamps
(String evidenceRecordId) This method returns a list of timestamps for an evidence record with the given idgetExtensionPeriodMax
(String tokenId) If the token validation is TOTAL_PASSED or PASSED, the result is a date indicating the latest datetime when it is possible date to extend the token (i.e. before expiration of the signing certificate or the latest timestamping certificate).getExtensionPeriodMin
(String tokenId) If the token validation is TOTAL_PASSED or PASSED, the result is a date indicating when the token extension becomes possible ensuring the revocation freshness (all certificates can be covered by a usable revocation data).This method returns the first evidence record Id.This method returns the first signature id.This method returns the first timestamp id.getIndication
(String tokenId) This method returns the indication obtained after the validation of a token.This method returns the jaxb model of the simple reportReturns a PDF/A Profile namegetProducedBy
(String timestampId) This method returns the timestamp's producer namegetProductionTime
(String timestampId) This method returns the timestamp production timegetQualificationErrors
(String tokenId) This method retrieve the qualification process's errors for a given token by idgetQualificationInfo
(String tokenId) This method retrieves the qualification process's information for a given token by idgetQualificationWarnings
(String tokenId) This method retrieve the qualification process's warnings for a given token by idgetSignatureEvidenceRecords
(String signatureId) This method returns a list of evidence record for a signature with the given idgetSignatureExtensionPeriodMax
(String signatureId) Deprecated.since DSS 6.3.getSignatureExtensionPeriodMin
(String signatureId) Deprecated.since DSS 6.3.getSignatureFormat
(String signatureId) This method returns the signature format (XAdES_BASELINE_B...)This method retrieves the signature idsgetSignatureQualification
(String signatureId) Returns the signature type: QES, AdES, AdESqc, NAgetSignatureScopes
(String tokenId) This method returns a list ofXmlSignatureScope
s for the token (signature, timestamp or evidence record) with a given Idint
This method returns the number of signaturesgetSignatureTimestamps
(String signatureId) This method returns a list of timestamps for a signature with the given idgetSignedBy
(String signatureId) This method returns the signature's signer namegetSigningTime
(String signatureId) This method returns the signature timegetSubIndication
(String tokenId) This method returns the sub-indication obtained after the validation of the token.getTimestampEvidenceRecords
(String timestampId) This method returns a list of evidence record for a time-stamp with the given idThis method retrieves the timestamp idsgetTimestampQualification
(String timestampId) This method returns the timestamp's qualificationgetTokenFilename
(String tokenId) Returns a file name for a given tokenIdThis method returns the validation time.int
This method returns the number of valid signaturesboolean
Returns whether the PDF document is compliant to PDF/A specification.boolean
This method checks if a signature is valid (TOTAL_PASSED) or timestamp validation PASSED
-
Constructor Details
-
SimpleReport
Default constructor- Parameters:
wrapped
-XmlSimpleReport
-
-
Method Details
-
getValidationTime
This method returns the validation time.- Returns:
- the validation time
-
getIndication
This method returns the indication obtained after the validation of a token.- Parameters:
tokenId
- DSS unique identifier of the token- Returns:
- the indication for the given token Id
-
getSubIndication
This method returns the sub-indication obtained after the validation of the token.- Parameters:
tokenId
- DSS unique identifier of the token- Returns:
- the sub-indication for the given token Id
-
isValid
This method checks if a signature is valid (TOTAL_PASSED) or timestamp validation PASSED- Parameters:
tokenId
- a token id to get a result for- Returns:
- true if the signature Indication element is equals to
Indication.TOTAL_PASSED
or the timestamp Indication element is Equals toIndication.PASSED
-
getSignatureIdList
This method retrieves the signature ids- Returns:
- the
List
of signature id(s) contained in the simpleReport
-
getTimestampIdList
This method retrieves the timestamp ids- Returns:
- the
List
of timestamp id(s) contained in the simpleReport
-
getEvidenceRecordIdList
This method retrieves the evidence record ids- Returns:
- the
List
of evidence record id(s) contained in the simpleReport
-
getFirstSignatureId
This method returns the first signature id.- Returns:
- the first signature id
-
getFirstTimestampId
This method returns the first timestamp id.- Returns:
- the first timestamp id
-
getFirstEvidenceRecordId
This method returns the first evidence record Id.- Returns:
- the first evidence record id
-
getDocumentFilename
Returns a file name for the validated document- Returns:
String
document file name
-
getTokenFilename
Returns a file name for a given tokenId -
getCertificateChain
Returns a certificate chain a given tokenId- Parameters:
tokenId
-String
id of a token to get its certificate chain- Returns:
XmlCertificateChain
for the token
-
getAdESValidationErrors
This method retrieve the ETSI EN 319 102-1 AdES validation errors for a given token by id- Parameters:
tokenId
- the token id- Returns:
- the linked errors
-
getAdESValidationWarnings
This method retrieve the ETSI EN 319 102-1 AdES validation warnings for a given token by id- Parameters:
tokenId
- the token id- Returns:
- the linked warnings
-
getAdESValidationInfo
This method retrieve the ETSI EN 319 102-1 AdES validation information for a given token by id- Parameters:
tokenId
- the token id- Returns:
- the linked information
-
getQualificationErrors
This method retrieve the qualification process's errors for a given token by id- Parameters:
tokenId
- the token id- Returns:
- the linked errors
-
getQualificationWarnings
This method retrieve the qualification process's warnings for a given token by id- Parameters:
tokenId
- the token id- Returns:
- the linked warnings
-
getQualificationInfo
This method retrieves the qualification process's information for a given token by id- Parameters:
tokenId
- the token id- Returns:
- the linked information
-
getSignatureQualification
Returns the signature type: QES, AdES, AdESqc, NA- Parameters:
signatureId
- the signature id to test- Returns:
- the
SignatureQualification
of the given signature
-
getSignatureFormat
This method returns the signature format (XAdES_BASELINE_B...)- Parameters:
signatureId
- the signature id- Returns:
- the linked signature format
-
getBestSignatureTime
This method returns the best-signature-time- Parameters:
signatureId
- the signature id- Returns:
- the best signing time
-
getSigningTime
This method returns the signature time- Parameters:
signatureId
- the signature id- Returns:
- the signing time
-
getSignatureExtensionPeriodMin
Deprecated.since DSS 6.3. Please use#getExtensionPeriodMin(signatureId)
method instead.If the signature validation is TOTAL_PASSED, the result date is the date from when a signature extension is possible to ensure the revocation freshness (all certificates can be covered by a usable revocation data). When certificate chain(s) do not require fresh revocation data (e.g. if signature contains all necessary revocation data), NULL is returned.- Parameters:
signatureId
- the signature id- Returns:
- the minimal useful date for a signature extension (or null)
-
getSignatureExtensionPeriodMax
Deprecated.since DSS 6.3. Please use#getExtensionPeriodMax(signatureId)
method instead.If the signature validation is TOTAL_PASSED, the result date is the maximum possible date to extend the signature (before the expiration of the signing certificate or the latest timestamping certificate).- Parameters:
signatureId
- the signature id- Returns:
- the maximum useful date for a signature extension (or null)
-
getExtensionPeriodMin
If the token validation is TOTAL_PASSED or PASSED, the result is a date indicating when the token extension becomes possible ensuring the revocation freshness (all certificates can be covered by a usable revocation data). When certificate chain(s) do not require fresh revocation data (e.g. if signature contains all necessary revocation data), NULL is returned.NOTE: The extension period is not computed for timestamps unambiguously related to other tokens (e.g. signature timestamps, etc.)
- Parameters:
tokenId
-String
the token identifier- Returns:
- the minimal useful date for the token extension (or null)
-
getExtensionPeriodMax
If the token validation is TOTAL_PASSED or PASSED, the result is a date indicating the latest datetime when it is possible date to extend the token (i.e. before expiration of the signing certificate or the latest timestamping certificate).NOTE: The extension period is not computed for timestamps unambiguously related to other tokens (e.g. signature timestamps, etc.)
- Parameters:
tokenId
-String
the token identifier- Returns:
- the maximum useful date for the token extension (or null)
-
getSignedBy
This method returns the signature's signer name- Parameters:
signatureId
- the signature id- Returns:
- the signatory
-
getSignaturesCount
public int getSignaturesCount()This method returns the number of signatures- Returns:
- the number of signatures
-
getValidSignaturesCount
public int getValidSignaturesCount()This method returns the number of valid signatures- Returns:
- the number of valid signatures
-
getProductionTime
This method returns the timestamp production time- Parameters:
timestampId
- the timestamp id- Returns:
- the production time
-
getProducedBy
This method returns the timestamp's producer name- Parameters:
timestampId
- the timestamp id- Returns:
- a name of the timestamp's producer
-
getTimestampQualification
This method returns the timestamp's qualification- Parameters:
timestampId
- the timestamp id- Returns:
TimestampQualification
for a given timestamp
-
getEvidenceRecordById
This method returns a wrapper for the given evidence record- Parameters:
evidenceRecordId
- the evidence record id- Returns:
- the wrapper for the given evidence record id
-
getSignatureTimestamps
This method returns a list of timestamps for a signature with the given id- Parameters:
signatureId
- the signature id- Returns:
- list if timestamps
-
getSignatureEvidenceRecords
This method returns a list of evidence record for a signature with the given id- Parameters:
signatureId
- the signature id- Returns:
- list if evidence records
-
getTimestampEvidenceRecords
This method returns a list of evidence record for a time-stamp with the given id- Parameters:
timestampId
- the time-stamp id- Returns:
- list if evidence records
-
getEvidenceRecordTimestamps
This method returns a list of timestamps for an evidence record with the given id- Parameters:
evidenceRecordId
- the evidence record id- Returns:
- list if timestamp wrappers
-
getEvidenceRecordPOE
This method returns the lowest POE of evidence record- Parameters:
evidenceRecordId
- the evidence record id- Returns:
- the best signing time
-
getSignatureScopes
This method returns a list ofXmlSignatureScope
s for the token (signature, timestamp or evidence record) with a given Id- Parameters:
tokenId
-String
id of a token to getXmlSignatureScope
s for- Returns:
- a list of
XmlSignatureScope
s
-
getContainerType
Returns a container type, when applicable (i.e. ASiC validation)- Returns:
ASiCContainerType
-
getPDFAProfile
Returns a PDF/A Profile name- Returns:
String
-
isPDFACompliant
public boolean isPDFACompliant()Returns whether the PDF document is compliant to PDF/A specification. Returns FALSE for all non-PDF documents.- Returns:
- if the document is compliant to the determined PDF/A profile
-
getJaxbModel
This method returns the jaxb model of the simple report- Returns:
- the jaxb model
-