Class PublicKeyRingSelectionStrategy<O>
- java.lang.Object
-
- org.pgpainless.util.selection.keyring.PublicKeyRingSelectionStrategy<O>
-
- Type Parameters:
O
- Type of identifier
- All Implemented Interfaces:
KeyRingSelectionStrategy<org.bouncycastle.openpgp.PGPPublicKeyRing,org.bouncycastle.openpgp.PGPPublicKeyRingCollection,O>
- Direct Known Subclasses:
ExactUserId.PubRingSelectionStrategy
,Whitelist.PubRingSelectionStrategy
,Wildcard.PubRingSelectionStrategy
public abstract class PublicKeyRingSelectionStrategy<O> extends java.lang.Object implements KeyRingSelectionStrategy<org.bouncycastle.openpgp.PGPPublicKeyRing,org.bouncycastle.openpgp.PGPPublicKeyRingCollection,O>
AbstractKeyRingSelectionStrategy
forPGPPublicKeyRings
.
-
-
Constructor Summary
Constructors Constructor Description PublicKeyRingSelectionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<org.bouncycastle.openpgp.PGPPublicKeyRing>
selectKeyRingsFromCollection(O identifier, org.bouncycastle.openpgp.PGPPublicKeyRingCollection keyRingCollection)
Iterate of the givenMultiMap<O,org.bouncycastle.openpgp.PGPPublicKeyRing>
selectKeyRingsFromCollections(MultiMap<O,org.bouncycastle.openpgp.PGPPublicKeyRingCollection> keyRingCollections)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pgpainless.util.selection.keyring.KeyRingSelectionStrategy
accept
-
-
-
-
Method Detail
-
selectKeyRingsFromCollection
public java.util.Set<org.bouncycastle.openpgp.PGPPublicKeyRing> selectKeyRingsFromCollection(@Nonnull O identifier, @Nonnull org.bouncycastle.openpgp.PGPPublicKeyRingCollection keyRingCollection)
Description copied from interface:KeyRingSelectionStrategy
Iterate of the givenkeyRingCollection
and return aSet
of all acceptable keyRings in the collection, based on the givenidentifier
.- Specified by:
selectKeyRingsFromCollection
in interfaceKeyRingSelectionStrategy<org.bouncycastle.openpgp.PGPPublicKeyRing,org.bouncycastle.openpgp.PGPPublicKeyRingCollection,O>
- Parameters:
identifier
- identifierkeyRingCollection
- collection- Returns:
- set of acceptable key rings
-
selectKeyRingsFromCollections
public MultiMap<O,org.bouncycastle.openpgp.PGPPublicKeyRing> selectKeyRingsFromCollections(@Nonnull MultiMap<O,org.bouncycastle.openpgp.PGPPublicKeyRingCollection> keyRingCollections)
Description copied from interface:KeyRingSelectionStrategy
Iterate over all keyRings in the givenMultiMap
of keyRingCollections and return a newMultiMap
which for every identifier (key of the map) contains all acceptable keyRings based on that identifier.- Specified by:
selectKeyRingsFromCollections
in interfaceKeyRingSelectionStrategy<org.bouncycastle.openpgp.PGPPublicKeyRing,org.bouncycastle.openpgp.PGPPublicKeyRingCollection,O>
- Parameters:
keyRingCollections
- MultiMap of identifiers and keyRingCollections.- Returns:
- MultiMap of identifiers and acceptable keyRings.
-
-