Interface KeyRingSelectionStrategy<R,C,O>
-
- Type Parameters:
R- Type ofPGPKeyRing(PGPSecretKeyRingorPGPPublicKeyRing).C- Type of key ring collection (e.g.PGPSecretKeyRingCollectionorPGPPublicKeyRingCollection).O- Type of key identifier
- All Known Implementing Classes:
ExactUserId.PubRingSelectionStrategy,ExactUserId.SecRingSelectionStrategy,PublicKeyRingSelectionStrategy,SecretKeyRingSelectionStrategy,Whitelist.PubRingSelectionStrategy,Whitelist.SecRingSelectionStrategy,Wildcard.PubRingSelectionStrategy,Wildcard.SecRingSelectionStrategy,XMPP.PubRingSelectionStrategy,XMPP.SecRingSelectionStrategy
public interface KeyRingSelectionStrategy<R,C,O>Filter for selecting public / secret key rings based on identifiers (e.g. user-ids).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaccept(O identifier, R keyRing)Return true, if the filter accepts the givenjava.util.Set<R>selectKeyRingsFromCollection(O identifier, C keyRingCollection)Iterate of the givenorg.pgpainless.util.MultiMap<O,R>selectKeyRingsFromCollections(org.pgpainless.util.MultiMap<O,C> keyRingCollections)Iterate over all keyRings in the givenMultiMapof keyRingCollections and return a newMultiMapwhich for every identifier (key of the map) contains all acceptable keyRings based on that identifier.
-
-
-
Method Detail
-
accept
boolean accept(O identifier, R keyRing)
Return true, if the filter accepts the givenkeyRing
based on the givenidentifier
.- Parameters:
identifier- identifierkeyRing- key ring- Returns:
- acceptance
-
selectKeyRingsFromCollection
java.util.Set<R> selectKeyRingsFromCollection(O identifier, C keyRingCollection)
Iterate of the givenkeyRingCollection
and return aSetof all acceptable keyRings in the collection, based on the givenidentifier
.- Parameters:
identifier- identifierkeyRingCollection- collection- Returns:
- set of acceptable key rings
-
selectKeyRingsFromCollections
org.pgpainless.util.MultiMap<O,R> selectKeyRingsFromCollections(org.pgpainless.util.MultiMap<O,C> keyRingCollections)
Iterate over all keyRings in the givenMultiMapof keyRingCollections and return a newMultiMapwhich for every identifier (key of the map) contains all acceptable keyRings based on that identifier.- Parameters:
keyRingCollections- MultiMap of identifiers and keyRingCollections.- Returns:
- MultiMap of identifiers and acceptable keyRings.
-
-