Class OfflineRevocationSource<R extends Revocation>
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.OfflineRevocationSource<R>
- Type Parameters:
R
- the revocation class type (CRL/OCSP)
- All Implemented Interfaces:
MultipleRevocationSource<R>
,RevocationSource<R>
,Serializable
- Direct Known Subclasses:
OfflineCRLSource
,OfflineOCSPSource
public abstract class OfflineRevocationSource<R extends Revocation>
extends Object
implements RevocationSource<R>, MultipleRevocationSource<R>
Represents a revocation sources for a data obtained from an offline source (e.g. signature)
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
OfflineRevocationSource
(RevocationTokenRefMatcher<R> tokenRefMatcher) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBinary
(EncapsulatedRevocationTokenIdentifier<R> binary, RevocationOrigin origin) This method adds a token binary with its originvoid
addRevocation
(RevocationToken<R> token, RevocationOrigin origin) This method adds a revocation token with its originvoid
addRevocation
(RevocationToken<R> token, EncapsulatedRevocationTokenIdentifier<R> binary) This method adds aRevocationToken
from the binaryvoid
addRevocationReference
(RevocationRef<R> reference, RevocationRefOrigin origin) This method adds a revocation reference with its originReturns the linkedEncapsulatedRevocationTokenIdentifier
for a givenRevocationRef
Retrieves a Map of orphanRevocationRef
with theirRevocationRefOrigin
s for a givenEncapsulatedRevocationTokenIdentifier
findRefsAndOriginsForRevocationToken
(RevocationToken<R> revocationToken) Retrieves a Map of foundRevocationRef
with their origins for the givenRevocationToken
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in the ADBE signed attributeRetrieves the list of allRevocationToken
s present in the ADBE signed attribute NOTE: Applicable only for PAdES revocation sourceRetrieves the Set of tokens which have a referenceRetrieves all found revocation binariesRetrieves all found revocation binaries with their originsRetrieves a Set of all foundRevocationRef
Retrieves a Set of all foundRevocationToken
Returns all tokens with their originsRetrieves the list of allRevocationRef
s present in the signature 'attribute-revocation-references' attribute (used in CAdES and XAdES)Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'AttributeRevocationValues' elementRetrieves the list of allRevocationToken
s present in 'AttributeRevocationValues' elementRetrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in the CMS SignedData NOTE: Applicable only for CAdES revocation sourcesRetrieves the list of allRevocationToken
s present in the CMS SignedData NOTE: Applicable only for CAdES revocation sourcesRetrieves the list of allRevocationRef
s present in the signature 'complete-revocation-references' attribute (used in CAdES and XAdES)Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation sourceRetrieves the list of allRevocationToken
s present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation sourceRetrieves a Map of orphanRevocationRef
with theirRevocationRefOrigin
sprotected Map<RevocationRef<R>,
Set<RevocationRefOrigin>> Returns a map of revocation references with the corresponding originsgetRevocationToken
(CertificateToken certificateToken, CertificateToken issuerCertificateToken) This method returns the latest issued revocation token from a set of all revocation data found for the givencertificateToken
.Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'RevocationValues' elementRetrieves the list of allRevocationToken
s present in 'RevocationValues' elementRetrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'TimestampValidationData' elementRetrieves the list of allRevocationToken
s present in 'TimestampValidationData' elementReturns a Map of uniqueRevocationToken
based on binary (a same binary can cover several certificates) with their originsRetrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation sourceRetrieves the list of allRevocationToken
s present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation sourceboolean
isEmpty()
This method checks if the revocation source is emptyboolean
isOrphan
(RevocationRef<R> reference) This method verifies if a givenRevocationRef
is an orphan (not linked to a completeRevocationToken
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.europa.esig.dss.spi.x509.revocation.MultipleRevocationSource
getRevocationTokens
-
Constructor Details
-
OfflineRevocationSource
The default constructor- Parameters:
tokenRefMatcher
-RevocationTokenRefMatcher
used to match tokens and their corresponding references
-
-
Method Details
-
addBinary
This method adds a token binary with its origin- Parameters:
binary
- the binary token to be addedorigin
- the origin where the token has been found
-
addRevocation
This method adds a revocation token with its origin- Parameters:
token
- the revocation token to be addedorigin
- the origin where the token has been found
-
addRevocation
public void addRevocation(RevocationToken<R> token, EncapsulatedRevocationTokenIdentifier<R> binary) This method adds aRevocationToken
from the binary- Parameters:
token
- the token to be addedbinary
- the binary where the token has been extracted
-
addRevocationReference
This method adds a revocation reference with its origin- Parameters:
reference
- the revocation reference to be addedorigin
- the origin where the reference has been found
-
getAllRevocationBinaries
Retrieves all found revocation binaries- Returns:
- a Set of
EncapsulatedRevocationTokenIdentifier
-
getAllRevocationBinariesWithOrigins
public Map<EncapsulatedRevocationTokenIdentifier<R>,Set<RevocationOrigin>> getAllRevocationBinariesWithOrigins()Retrieves all found revocation binaries with their origins- Returns:
- a Map of
EncapsulatedRevocationTokenIdentifier
with their origins
-
getAllRevocationTokens
Retrieves a Set of all foundRevocationToken
- Returns:
- all
RevocationToken
-
getAllRevocationTokensWithOrigins
Returns all tokens with their origins- Returns:
- a map of tokens with the different origins
-
getUniqueRevocationTokensWithOrigins
Returns a Map of uniqueRevocationToken
based on binary (a same binary can cover several certificates) with their origins- Returns:
- a map of tokens with the different origins
-
getAllRevocationReferences
Retrieves a Set of all foundRevocationRef
- Returns:
- all
RevocationRef
-
getRevocationReferencesWithOrigins
Returns a map of revocation references with the corresponding origins- Returns:
- a map between
RevocationRef
s and a set ofRevocationRefOrigin
s
-
getRevocationToken
public RevocationToken<R> getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) This method returns the latest issued revocation token from a set of all revocation data found for the givencertificateToken
. Returns NULL, if no corresponding revocation data found for the certificate.- Specified by:
getRevocationToken
in interfaceRevocationSource<R extends Revocation>
- Parameters:
certificateToken
- TheCertificateToken
for which the request is madeissuerCertificateToken
- TheCertificateToken
which is the issuer of the certificateToken- Returns:
RevocationToken
-
getCMSSignedDataRevocationBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in the CMS SignedData NOTE: Applicable only for CAdES revocation sources- Returns:
- list of
EncapsulatedRevocationTokenIdentifier
s
-
getCMSSignedDataRevocationTokens
Retrieves the list of allRevocationToken
s present in the CMS SignedData NOTE: Applicable only for CAdES revocation sources- Returns:
- list of
RevocationToken
s
-
getRevocationValuesBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'RevocationValues' element- Returns:
- list of
EncapsulatedRevocationTokenIdentifier
s
-
getRevocationValuesTokens
Retrieves the list of allRevocationToken
s present in 'RevocationValues' element- Returns:
- list of
RevocationToken
s
-
getAttributeRevocationValuesBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'AttributeRevocationValues' element- Returns:
- list of
EncapsulatedRevocationTokenIdentifier
s
-
getAttributeRevocationValuesTokens
Retrieves the list of allRevocationToken
s present in 'AttributeRevocationValues' element- Returns:
- list of
RevocationToken
s
-
getTimestampValidationDataBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'TimestampValidationData' element- Returns:
- list of
EncapsulatedRevocationTokenIdentifier
s
-
getTimestampValidationDataTokens
Retrieves the list of allRevocationToken
s present in 'TimestampValidationData' element- Returns:
- list of
RevocationToken
s
-
getDSSDictionaryBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationToken
s
-
getDSSDictionaryTokens
Retrieves the list of allRevocationToken
s present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationToken
s
-
getVRIDictionaryBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationToken
s
-
getVRIDictionaryTokens
Retrieves the list of allRevocationToken
s present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationToken
s
-
getADBERevocationValuesBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in the ADBE signed attribute- Returns:
- list of
EncapsulatedRevocationTokenIdentifier
s
-
getADBERevocationValuesTokens
Retrieves the list of allRevocationToken
s present in the ADBE signed attribute NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationToken
s
-
getCompleteRevocationRefs
Retrieves the list of allRevocationRef
s present in the signature 'complete-revocation-references' attribute (used in CAdES and XAdES)- Returns:
- list of
RevocationRef
s
-
getAttributeRevocationRefs
Retrieves the list of allRevocationRef
s present in the signature 'attribute-revocation-references' attribute (used in CAdES and XAdES)- Returns:
- list of
RevocationRef
s
-
findRefsAndOriginsForRevocationToken
public Map<RevocationRef<R>,Set<RevocationRefOrigin>> findRefsAndOriginsForRevocationToken(RevocationToken<R> revocationToken) Retrieves a Map of foundRevocationRef
with their origins for the givenRevocationToken
- Parameters:
revocationToken
-RevocationToken
to get references for- Returns:
- Map of
RevocationRef
s with their origins
-
findRefsAndOriginsForBinary
public Map<RevocationRef<R>,Set<RevocationRefOrigin>> findRefsAndOriginsForBinary(EncapsulatedRevocationTokenIdentifier<R> identifier) Retrieves a Map of orphanRevocationRef
with theirRevocationRefOrigin
s for a givenEncapsulatedRevocationTokenIdentifier
- Parameters:
identifier
-EncapsulatedRevocationTokenIdentifier
- Returns:
- a Map of orphan references with their origins
-
findBinaryForReference
Returns the linkedEncapsulatedRevocationTokenIdentifier
for a givenRevocationRef
- Parameters:
ref
- theRevocationRef
to find- Returns:
- the related
EncapsulatedRevocationTokenIdentifier
-
getOrphanRevocationReferencesWithOrigins
Retrieves a Map of orphanRevocationRef
with theirRevocationRefOrigin
s- Returns:
- a Map of orphan references with their origins
-
isOrphan
This method verifies if a givenRevocationRef
is an orphan (not linked to a completeRevocationToken
- Parameters:
reference
- the reference to be tested- Returns:
- true if the given reference is an orphan
-
getAllReferencedRevocationBinaries
Retrieves the Set of tokens which have a reference- Returns:
- a Set of Token Identifiers which are referenced
-
isEmpty
public boolean isEmpty()This method checks if the revocation source is empty- Returns:
- true if the source is empty
-