Package eu.europa.esig.dss.simplereport
Class SimpleReport
java.lang.Object
eu.europa.esig.dss.simplereport.SimpleReport
public class SimpleReport extends Object
A SimpleReport holder to fetch values from a JAXB SimpleReport.
-
Constructor Summary
Constructors Constructor Description SimpleReport(XmlSimpleReport wrapped) -
Method Summary
Modifier and Type Method Description DategetBestSignatureTime(String signatureId)This method returns the best-signature-timeXmlCertificateChaingetCertificateChain(String tokenId)Returns a certificate chain a given tokenIdStringgetDocumentFilename()Returns a file name for the validated documentList<String>getErrors(String tokenId)This method retrieve the errors for a given token by idStringgetFirstSignatureId()This method returns the first signature id.StringgetFirstTimestampId()This method returns the first timestamp id.IndicationgetIndication(String tokenId)This method returns the indication obtained after the validation of a token.List<String>getInfo(String tokenId)This method retrieves the information for a given token by idXmlSimpleReportgetJaxbModel()This methods returns the jaxb model of the simple reportStringgetProducedBy(String timestampId)This method returns the timestamp's producer nameDategetProductionTime(String timestampId)This method returns the timestamp production timeDategetSignatureExtensionPeriodMax(String signatureId)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).DategetSignatureExtensionPeriodMin(String signatureId)If the signature validation is TOTAL_PASSED, the result date is the date from when a signature extension is useful (all certificates can be covered by an usable revocation data).SignatureLevelgetSignatureFormat(String signatureId)This method returns the signature format (XAdES_BASELINE_B...)List<String>getSignatureIdList()This method retrieves the signature idsSignatureQualificationgetSignatureQualification(String signatureId)Returns the signature type: QES, AdES, AdESqc, NAintgetSignaturesCount()This method returns the number of signaturesStringgetSignedBy(String signatureId)This method returns the signature's signer nameDategetSigningTime(String signatureId)This method returns the signature timeSubIndicationgetSubIndication(String tokenId)This method returns the sub-indication obtained after the validation of the token.List<String>getTimestampIdList()This method retrieves the timestamp idsTimestampQualificationgetTimestampQualification(String timestampId)This method returns the timestamp's qualificationStringgetTokenFilename(String tokenId)Returns a file name for a given tokenIdDategetValidationTime()This method returns the validation time.intgetValidSignaturesCount()This method returns the number of valid signaturesList<String>getWarnings(String tokenId)This method retrieve the warnings for a given token by idbooleanisValid(String tokenId)This method checks if a signature is valid (TOTAL_PASSED) or timestamp validation PASSED
-
Constructor Details
-
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_PASSEDor the timestamp Indication element is Equals toIndication.PASSED
-
getSignatureIdList
This method retrieves the signature ids- Returns:
- the
Listof signature id(s) contained in the simpleReport
-
getTimestampIdList
This method retrieves the timestamp ids- Returns:
- the
Listof timestamp 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
-
getDocumentFilename
Returns a file name for the validated document- Returns:
Stringdocument file name
-
getTokenFilename
Returns a file name for a given tokenId -
getCertificateChain
Returns a certificate chain a given tokenId- Parameters:
tokenId-Stringid of a token to get its certificate chain- Returns:
XmlCertificateChainfor the token
-
getInfo
This method retrieves the information for a given token by id- Parameters:
tokenId- the token id- Returns:
- the linked information
-
getErrors
This method retrieve the errors for a given token by id- Parameters:
tokenId- the token id- Returns:
- the linked errors
-
getWarnings
This method retrieve the warnings for a given token by id- Parameters:
tokenId- the token id- Returns:
- the linked warnings
-
getSignatureQualification
Returns the signature type: QES, AdES, AdESqc, NA- Parameters:
signatureId- the signature id to test- Returns:
- the
SignatureQualificationof 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
If the signature validation is TOTAL_PASSED, the result date is the date from when a signature extension is useful (all certificates can be covered by an usable revocation data).- Parameters:
signatureId- the signature id- Returns:
- the minimal useful date for a signature extension (or null)
-
getSignatureExtensionPeriodMax
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)
-
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:
TimestampQualificationfor a given timestamp
-
getJaxbModel
This methods returns the jaxb model of the simple report- Returns:
- the jaxb model
-