Class UserFriendlyIdentifierProvider
java.lang.Object
eu.europa.esig.dss.validation.identifier.UserFriendlyIdentifierProvider
- All Implemented Interfaces:
TokenIdentifierProvider
Creates an identifier for a given token by the template:
TOKEN-CommonCertName-CreationDate-id(optional)
Examples:
SIGNATURE-JohnConner-20201015-2045
CERTIFICATE-CryptoSign-20151014-1425
-
Constructor Summary
ConstructorDescriptionDefault constructor instantiating empty maps of processed tokens -
Method Summary
Modifier and TypeMethodDescriptiongetIdAsString
(IdentifierBasedObject object) Gets aString
identifier for a given objectprotected String
getIdAsStringForCertRef
(CertificateRef certificateRef) Gets aString
identifier for a givenCertificateRef
protected String
getIdAsStringForEvidenceRecordIdentifier
(EvidenceRecord evidenceRecord) Gets aString
identifier for a givenEvidenceRecord
protected String
getIdAsStringForRevRef
(RevocationRef<?> revocationRef) Gets aString
identifier for a givenRevocationRef
protected String
getIdAsStringForRevTokenIdentifier
(EncapsulatedRevocationTokenIdentifier<?> revocationIdentifier) Gets aString
identifier for a givenEncapsulatedRevocationTokenIdentifier
protected String
getIdAsStringForSignature
(AdvancedSignature signature) Gets aString
identifier for a givenAdvancedSignature
protected String
getIdAsStringForSignatureScope
(SignatureScope signatureScope) Gets aString
identifier for a givenSignatureScope
protected String
getIdAsStringForTL
(TLInfo tlInfo) Gets aString
identifier for a givenTLInfo
protected String
getIdAsStringForToken
(Token token) Gets aString
identifier for a givenToken
void
setCertificatePrefix
(String certificatePrefix) Sets the prefix to be used for certificate identifiers Default = "CERTIFICATE"void
setCounterSignaturePrefix
(String counterSignaturePrefix) Sets the prefix to be used for counter-signature identifiers Default = "COUNTER-SIGNATURE"void
setCrlPrefix
(String crlPrefix) Sets the prefix to be used for CRL identifiers Default = "CRL"void
setDateFormat
(String dateFormat) Sets the dataFormat to be used for identifiers creation Default = "yyyyMMdd-HHmm"void
setEvidenceRecordPrefix
(String evidenceRecordPrefix) Sets the prefix to be used for evidence record identifiers Default = "EVIDENCE-RECORD"void
setLOTLPrefix
(String lotlPrefix) Sets the prefix to be used for a LOTL identifier Default = "LOTL"void
setOcspPrefix
(String ocspPrefix) Sets the prefix to be used for OCSP identifiers Default = "OCSP"void
setPivotPrefix
(String pivotPrefix) Sets the prefix to be used for pivot identifiers Default = "PIVOT"void
setSignaturePrefix
(String signaturePrefix) Sets the prefix to be used for signature identifiers Default = "SIGNATURE"void
setSignedDataPrefix
(String signedDataPrefix) Sets the prefix to be used for original document identifiers Default = "DOCUMENT"void
setTimestampPrefix
(String timestampPrefix) Sets the prefix to be used for timestamp identifiers Default = "TIMESTAMP"void
setTLPrefix
(String tlPrefix) Sets the prefix to be used for TL identifiers Default = "TL"
-
Constructor Details
-
UserFriendlyIdentifierProvider
public UserFriendlyIdentifierProvider()Default constructor instantiating empty maps of processed tokens
-
-
Method Details
-
setSignaturePrefix
-
setCounterSignaturePrefix
-
setTimestampPrefix
-
setCertificatePrefix
-
setCrlPrefix
-
setOcspPrefix
-
setSignedDataPrefix
-
setEvidenceRecordPrefix
-
setLOTLPrefix
-
setTLPrefix
-
setPivotPrefix
-
setDateFormat
-
getIdAsString
Description copied from interface:TokenIdentifierProvider
Gets aString
identifier for a given object- Specified by:
getIdAsString
in interfaceTokenIdentifierProvider
- Parameters:
object
-IdentifierBasedObject
to get String id for- Returns:
String
-
getIdAsStringForSignature
Gets aString
identifier for a givenAdvancedSignature
- Parameters:
signature
-AdvancedSignature
to get String id for- Returns:
String
-
getIdAsStringForToken
-
getIdAsStringForSignatureScope
Gets aString
identifier for a givenSignatureScope
- Parameters:
signatureScope
-SignatureScope
to get String id for- Returns:
String
-
getIdAsStringForTL
-
getIdAsStringForCertRef
Gets aString
identifier for a givenCertificateRef
- Parameters:
certificateRef
-CertificateRef
to get String id for- Returns:
String
-
getIdAsStringForRevRef
Gets aString
identifier for a givenRevocationRef
- Parameters:
revocationRef
-RevocationRef
to get String id for- Returns:
String
-
getIdAsStringForRevTokenIdentifier
protected String getIdAsStringForRevTokenIdentifier(EncapsulatedRevocationTokenIdentifier<?> revocationIdentifier) Gets aString
identifier for a givenEncapsulatedRevocationTokenIdentifier
- Parameters:
revocationIdentifier
-EncapsulatedRevocationTokenIdentifier
to get String id for- Returns:
String
-
getIdAsStringForEvidenceRecordIdentifier
Gets aString
identifier for a givenEvidenceRecord
- Parameters:
evidenceRecord
-EvidenceRecord
to get String id for- Returns:
String
-