Class FileBasedOpenPgpMetadataStore
- java.lang.Object
-
- org.jivesoftware.smackx.ox.store.abstr.AbstractOpenPgpMetadataStore
-
- org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpMetadataStore
-
- All Implemented Interfaces:
OpenPgpMetadataStore
public class FileBasedOpenPgpMetadataStore extends AbstractOpenPgpMetadataStore
Implementation of theOpenPgpMetadataStore
, which stores metadata information in a file structure. The information is stored in the following directory structure:<basePath>/ <userjid@server.tld>/ announced.list // list of the users announced key fingerprints and modification dates
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ANNOUNCED
-
Constructor Summary
Constructors Constructor Description FileBasedOpenPgpMetadataStore(java.io.File basePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
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.-
Methods inherited from class org.jivesoftware.smackx.ox.store.abstr.AbstractOpenPgpMetadataStore
getAnnouncedFingerprintsOf, setAnnouncedFingerprintsOf
-
-
-
-
Field Detail
-
ANNOUNCED
public static final java.lang.String ANNOUNCED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FileBasedOpenPgpMetadataStore
public FileBasedOpenPgpMetadataStore(java.io.File basePath)
-
-
Method Detail
-
readAnnouncedFingerprintsOf
public java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> readAnnouncedFingerprintsOf(BareJid contact) throws java.io.IOException
Description copied from class:AbstractOpenPgpMetadataStore
Read the fingerprints and modification dates of announced keys of a user from local storage.- Specified by:
readAnnouncedFingerprintsOf
in classAbstractOpenPgpMetadataStore
- Parameters:
contact
- contact- Returns:
- contacts announced key fingerprints and latest modification dates
- Throws:
java.io.IOException
- IO is dangerous
-
writeAnnouncedFingerprintsOf
public void writeAnnouncedFingerprintsOf(BareJid contact, java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> metadata) throws java.io.IOException
Description copied from class:AbstractOpenPgpMetadataStore
Write the fingerprints and modification dates of announced keys of a user to local storage.- Specified by:
writeAnnouncedFingerprintsOf
in classAbstractOpenPgpMetadataStore
- Parameters:
contact
- contactmetadata
- announced key fingerprints and latest modification dates- Throws:
java.io.IOException
- IO is dangerous
-
-