Class AbstractOpenPgpMetadataStore
- java.lang.Object
-
- org.jivesoftware.smackx.ox.store.abstr.AbstractOpenPgpMetadataStore
-
- All Implemented Interfaces:
OpenPgpMetadataStore
- Direct Known Subclasses:
FileBasedOpenPgpMetadataStore
public abstract class AbstractOpenPgpMetadataStore extends java.lang.Object implements OpenPgpMetadataStore
-
-
Constructor Summary
Constructors Constructor Description AbstractOpenPgpMetadataStore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date>
getAnnouncedFingerprintsOf(BareJid contact)
Return aMap
containing all announced fingerprints of a contact, as well as the dates on which they were last modified bycontact
.protected abstract java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date>
readAnnouncedFingerprintsOf(BareJid contact)
Read the fingerprints and modification dates of announced keys of a user from local storage.void
setAnnouncedFingerprintsOf(BareJid contact, java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> data)
Store a contacts announced fingerprints and dates of last modification.protected abstract void
writeAnnouncedFingerprintsOf(BareJid contact, java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> metadata)
Write the fingerprints and modification dates of announced keys of a user to local storage.
-
-
-
Constructor Detail
-
AbstractOpenPgpMetadataStore
public AbstractOpenPgpMetadataStore()
-
-
Method Detail
-
getAnnouncedFingerprintsOf
public java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> getAnnouncedFingerprintsOf(BareJid contact) throws java.io.IOException
Description copied from interface:OpenPgpMetadataStore
Return aMap
containing all announced fingerprints of a contact, as well as the dates on which they were last modified bycontact
. This method MUST NOT return null.- Specified by:
getAnnouncedFingerprintsOf
in interfaceOpenPgpMetadataStore
- Parameters:
contact
- contact in which we are interested.- Returns:
- announced fingerprints
- Throws:
java.io.IOException
- IO is dangerous
-
setAnnouncedFingerprintsOf
public void setAnnouncedFingerprintsOf(BareJid contact, java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> data) throws java.io.IOException
Description copied from interface:OpenPgpMetadataStore
Store a contacts announced fingerprints and dates of last modification.- Specified by:
setAnnouncedFingerprintsOf
in interfaceOpenPgpMetadataStore
- Parameters:
contact
- contact in which we are interested.data
-Map
containing the contacts announced fingerprints and dates of last modification.- Throws:
java.io.IOException
- IO is dangerous
-
readAnnouncedFingerprintsOf
protected abstract java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> readAnnouncedFingerprintsOf(BareJid contact) throws java.io.IOException
Read the fingerprints and modification dates of announced keys of a user from local storage.- Parameters:
contact
- contact- Returns:
- contacts announced key fingerprints and latest modification dates
- Throws:
java.io.IOException
- IO is dangerous
-
writeAnnouncedFingerprintsOf
protected abstract void writeAnnouncedFingerprintsOf(BareJid contact, java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> metadata) throws java.io.IOException
Write the fingerprints and modification dates of announced keys of a user to local storage.- Parameters:
contact
- contactmetadata
- announced key fingerprints and latest modification dates- Throws:
java.io.IOException
- IO is dangerous
-
-