Class OfflineRevocationSource<R extends Revocation>
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.OfflineRevocationSource<R>
- All Implemented Interfaces:
MultipleRevocationSource<R>
,Serializable
- Direct Known Subclasses:
OfflineCRLSource
,OfflineOCSPSource
public abstract class OfflineRevocationSource<R extends Revocation> extends Object implements MultipleRevocationSource<R>
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Modifier Constructor Description protected
OfflineRevocationSource(RevocationTokenRefMatcher<R> tokenRefMatcher)
-
Method Summary
Modifier and Type Method Description void
addBinary(EncapsulatedRevocationTokenIdentifier 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 binary)
This method adds aRevocationToken
from the binaryvoid
addRevocationReference(RevocationRef<R> reference, RevocationRefOrigin origin)
This method adds a revocation reference with its originEncapsulatedRevocationTokenIdentifier
findBinaryForReference(RevocationRef<R> ref)
Returns the linkedEncapsulatedRevocationTokenIdentifier
for a givenRevocationRef
Map<RevocationRef<R>,Set<RevocationRefOrigin>>
findRefsAndOriginsForBinary(EncapsulatedRevocationTokenIdentifier identifier)
Retrieves a Map of orphanRevocationRef
with theirRevocationRefOrigin
s for a givenEncapsulatedRevocationTokenIdentifier
Map<RevocationRef<R>,Set<RevocationRefOrigin>>
findRefsAndOriginsForRevocationToken(RevocationToken<R> revocationToken)
Retrieves a Map of foundRevocationRef
with their origins for the givenRevocationToken
List<RevocationToken<R>>
getADBERevocationValuesTokens()
Retrieves the list of allRevocationToken
s present in the ADBE element NOTE: Applicable only for PAdES revocation sourceSet<EncapsulatedRevocationTokenIdentifier>
getAllReferencedRevocationBinaries()
Retrieves the Set of tokens which have a referenceSet<EncapsulatedRevocationTokenIdentifier>
getAllRevocationBinaries()
Retrieves all found revocation binariesMap<EncapsulatedRevocationTokenIdentifier,Set<RevocationOrigin>>
getAllRevocationBinariesWithOrigins()
Retrieves all found revocation binaries with their originsSet<RevocationRef<R>>
getAllRevocationReferences()
Retrieves a Set of all foundRevocationRef
Set<RevocationToken<R>>
getAllRevocationTokens()
Retrieves a Set of all foundRevocationToken
Map<RevocationToken<R>,Set<RevocationOrigin>>
getAllRevocationTokensWithOrigins()
Returns all tokens with their originsList<RevocationRef<R>>
getAttributeRevocationRefs()
Retrieves the list of allRevocationRef
s present in the signature 'attribute-revocation-references' attribute (used in CAdES and XAdES)List<RevocationToken<R>>
getAttributeRevocationValuesTokens()
Retrieves the list of allRevocationToken
s present in 'AttributeRevocationValues' element NOTE: Applicable only for XAdES revocation sourceList<EncapsulatedRevocationTokenIdentifier>
getCMSSignedDataRevocationBinaries()
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in the CMS SignedData NOTE: Applicable only for CAdES revocation sourcesList<RevocationToken<R>>
getCMSSignedDataRevocationTokens()
Retrieves the list of allRevocationToken
s present in the CMS SignedData NOTE: Applicable only for CAdES revocation sourcesList<RevocationRef<R>>
getCompleteRevocationRefs()
Retrieves the list of allRevocationRef
s present in the signature 'complete-revocation-references' attribute (used in CAdES and XAdES)List<EncapsulatedRevocationTokenIdentifier>
getDSSDictionaryBinaries()
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation sourceList<RevocationToken<R>>
getDSSDictionaryTokens()
Retrieves the list of allRevocationToken
s present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation sourceMap<RevocationRef<R>,Set<RevocationRefOrigin>>
getOrphanRevocationReferencesWithOrigins()
Retrieves a Map of orphanRevocationRef
with theirRevocationRefOrigin
sList<RevocationToken<R>>
getRevocationValuesTokens()
Retrieves the list of allRevocationToken
s present in 'RevocationValues' element NOTE: Applicable only for CAdES and XAdES revocation sourcesList<RevocationToken<R>>
getTimestampValidationDataTokens()
Retrieves the list of allRevocationToken
s present in 'TimestampValidationData' element NOTE: Applicable only for XAdES revocation sourceMap<RevocationToken<R>,Set<RevocationOrigin>>
getUniqueRevocationTokensWithOrigins()
Returns a Map of uniqueRevocationToken
based on binary (a same binary can cover several certificates) with their originsList<EncapsulatedRevocationTokenIdentifier>
getVRIDictionaryBinaries()
Retrieves the list of allEncapsulatedRevocationTokenIdentifier
s present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation sourceList<RevocationToken<R>>
getVRIDictionaryTokens()
Retrieves 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
-
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
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,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
-
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
-
getRevocationValuesTokens
Retrieves the list of allRevocationToken
s present in 'RevocationValues' element NOTE: Applicable only for CAdES and XAdES revocation sources- Returns:
- list of
RevocationToken
s
-
getAttributeRevocationValuesTokens
Retrieves the list of allRevocationToken
s present in 'AttributeRevocationValues' element NOTE: Applicable only for XAdES revocation source- Returns:
- list of
RevocationToken
s
-
getTimestampValidationDataTokens
Retrieves the list of allRevocationToken
s present in 'TimestampValidationData' element NOTE: Applicable only for XAdES revocation source- 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
-
getADBERevocationValuesTokens
Retrieves the list of allRevocationToken
s present in the ADBE element 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 identifier)Retrieves a Map of orphanRevocationRef
with theirRevocationRefOrigin
s for a givenEncapsulatedRevocationTokenIdentifier
- 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
-