Class 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 a Map containing all announced fingerprints of a contact, as well as the dates on which they were last modified by contact.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 a Map containing all announced fingerprints of a contact, as well as the dates on which they were last modified by contact. This method MUST NOT return null.
        Specified by:
        getAnnouncedFingerprintsOf in interface OpenPgpMetadataStore
        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 interface OpenPgpMetadataStore
        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 - contact
        metadata - announced key fingerprints and latest modification dates
        Throws:
        java.io.IOException - IO is dangerous