Package eu.europa.esig.dss.validation
Class UserFriendlyIdentifierProvider
java.lang.Object
eu.europa.esig.dss.validation.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
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
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
Sets the prefix to be used for signature identifiers Default = "SIGNATURE"- Parameters:
signaturePrefix
-String
-
setCounterSignaturePrefix
Sets the prefix to be used for counter-signature identifiers Default = "COUNTER-SIGNATURE"- Parameters:
counterSignaturePrefix
-String
-
setTimestampPrefix
Sets the prefix to be used for timestamp identifiers Default = "TIMESTAMP"- Parameters:
timestampPrefix
-String
-
setCertificatePrefix
Sets the prefix to be used for certificate identifiers Default = "CERTIFICATE"- Parameters:
certificatePrefix
-String
-
setCrlPrefix
Sets the prefix to be used for CRL identifiers Default = "CRL"- Parameters:
crlPrefix
-String
-
setOcspPrefix
Sets the prefix to be used for OCSP identifiers Default = "OCSP"- Parameters:
ocspPrefix
-String
-
setSignedDataPrefix
Sets the prefix to be used for original document identifiers Default = "DOCUMENT"- Parameters:
signedDataPrefix
-String
-
setLOTLPrefix
Sets the prefix to be used for a LOTL identifier Default = "LOTL"- Parameters:
lotlPrefix
-String
-
setTLPrefix
Sets the prefix to be used for TL identifiers Default = "TL"- Parameters:
tlPrefix
-String
-
setPivotPrefix
Sets the prefix to be used for pivot identifiers Default = "PIVOT"- Parameters:
pivotPrefix
-String
-
setDateFormat
Sets the dataFormat to be used for identifiers creation Default = "yyyyMMdd-HHmm"- Parameters:
dateFormat
-String
the target date format
-
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
Gets aString
identifier for a givenToken
-
getIdAsStringForSignatureScope
Gets aString
identifier for a givenSignatureScope
- Parameters:
signatureScope
-SignatureScope
to get String id for- Returns:
String
-
getIdAsStringForTL
Gets aString
identifier for a givenTLInfo
-
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
-