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
ConstructorsConstructorDescriptionDefault constructor instantiating empty maps of processed tokens -
Method Summary
Modifier and TypeMethodDescriptiongetIdAsString(IdentifierBasedObject object) Gets aStringidentifier for a given objectprotected StringgetIdAsStringForCertRef(CertificateRef certificateRef) Gets aStringidentifier for a givenCertificateRefprotected StringgetIdAsStringForRevRef(RevocationRef<?> revocationRef) Gets aStringidentifier for a givenRevocationRefprotected StringgetIdAsStringForRevTokenIdentifier(EncapsulatedRevocationTokenIdentifier<?> revocationIdentifier) Gets aStringidentifier for a givenEncapsulatedRevocationTokenIdentifierprotected StringgetIdAsStringForSignature(AdvancedSignature signature) Gets aStringidentifier for a givenAdvancedSignatureprotected StringgetIdAsStringForSignatureScope(SignatureScope signatureScope) Gets aStringidentifier for a givenSignatureScopeprotected StringgetIdAsStringForTL(TLInfo tlInfo) Gets aStringidentifier for a givenTLInfoprotected StringgetIdAsStringForToken(Token token) Gets aStringidentifier for a givenTokenvoidsetCertificatePrefix(String certificatePrefix) Sets the prefix to be used for certificate identifiers Default = "CERTIFICATE"voidsetCounterSignaturePrefix(String counterSignaturePrefix) Sets the prefix to be used for counter-signature identifiers Default = "COUNTER-SIGNATURE"voidsetCrlPrefix(String crlPrefix) Sets the prefix to be used for CRL identifiers Default = "CRL"voidsetDateFormat(String dateFormat) Sets the dataFormat to be used for identifiers creation Default = "yyyyMMdd-HHmm"voidsetLOTLPrefix(String lotlPrefix) Sets the prefix to be used for a LOTL identifier Default = "LOTL"voidsetOcspPrefix(String ocspPrefix) Sets the prefix to be used for OCSP identifiers Default = "OCSP"voidsetPivotPrefix(String pivotPrefix) Sets the prefix to be used for pivot identifiers Default = "PIVOT"voidsetSignaturePrefix(String signaturePrefix) Sets the prefix to be used for signature identifiers Default = "SIGNATURE"voidsetSignedDataPrefix(String signedDataPrefix) Sets the prefix to be used for original document identifiers Default = "DOCUMENT"voidsetTimestampPrefix(String timestampPrefix) Sets the prefix to be used for timestamp identifiers Default = "TIMESTAMP"voidsetTLPrefix(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-Stringthe target date format
-
getIdAsString
Description copied from interface:TokenIdentifierProviderGets aStringidentifier for a given object- Specified by:
getIdAsStringin interfaceTokenIdentifierProvider- Parameters:
object-IdentifierBasedObjectto get String id for- Returns:
String
-
getIdAsStringForSignature
Gets aStringidentifier for a givenAdvancedSignature- Parameters:
signature-AdvancedSignatureto get String id for- Returns:
String
-
getIdAsStringForToken
Gets aStringidentifier for a givenToken -
getIdAsStringForSignatureScope
Gets aStringidentifier for a givenSignatureScope- Parameters:
signatureScope-SignatureScopeto get String id for- Returns:
String
-
getIdAsStringForTL
Gets aStringidentifier for a givenTLInfo -
getIdAsStringForCertRef
Gets aStringidentifier for a givenCertificateRef- Parameters:
certificateRef-CertificateRefto get String id for- Returns:
String
-
getIdAsStringForRevRef
Gets aStringidentifier for a givenRevocationRef- Parameters:
revocationRef-RevocationRefto get String id for- Returns:
String
-
getIdAsStringForRevTokenIdentifier
protected String getIdAsStringForRevTokenIdentifier(EncapsulatedRevocationTokenIdentifier<?> revocationIdentifier) Gets aStringidentifier for a givenEncapsulatedRevocationTokenIdentifier- Parameters:
revocationIdentifier-EncapsulatedRevocationTokenIdentifierto get String id for- Returns:
String
-