Class AbstractOpenPgpTrustStore

java.lang.Object
org.jivesoftware.smackx.ox.store.abstr.AbstractOpenPgpTrustStore
All Implemented Interfaces:
OpenPgpTrustStore
Direct Known Subclasses:
FileBasedOpenPgpTrustStore

public abstract class AbstractOpenPgpTrustStore extends Object implements OpenPgpTrustStore
  • Constructor Details

    • AbstractOpenPgpTrustStore

      public AbstractOpenPgpTrustStore()
  • Method Details

    • readTrust

      protected abstract OpenPgpTrustStore.Trust readTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws IOException
      Read the trust record for the key with fingerprint fingerprint of user owner from local storage. This method returns OpenPgpTrustStore.Trust.undecided in case that no trust record has been found.
      Parameters:
      owner - owner of the key
      fingerprint - fingerprint of the key
      Returns:
      trust state of the key
      Throws:
      IOException - IO is dangerous
    • writeTrust

      protected abstract void writeTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws IOException
      Write the trust record for the key with fingerprint fingerprint of user owner to local storage.
      Parameters:
      owner - owner of the key
      fingerprint - fingerprint of the key
      trust - trust state of the key
      Throws:
      IOException - IO is dangerous
    • getTrust

      public OpenPgpTrustStore.Trust getTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws IOException
      Description copied from interface: OpenPgpTrustStore
      Return the OpenPgpTrustStore.Trust state of owners key with fingerprint fingerprint. The trust state describes, whether the user trusts a certain key of a contact. If no OpenPgpTrustStore.Trust record has been found, this method MUST return not null, nut OpenPgpTrustStore.Trust.undecided.
      Specified by:
      getTrust in interface OpenPgpTrustStore
      Parameters:
      owner - owner of the key
      fingerprint - fingerprint of the key
      Returns:
      trust state
      Throws:
      IOException - IO is dangerous
    • setTrust

      public void setTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws IOException
      Description copied from interface: OpenPgpTrustStore
      Store the OpenPgpTrustStore.Trust state of owners key with fingerprint fingerprint.
      Specified by:
      setTrust in interface OpenPgpTrustStore
      Parameters:
      owner - owner of the key
      fingerprint - fingerprint of the key
      trust - trust record
      Throws:
      IOException - IO is dangerous