public abstract class AbstractOpenPgpTrustStore extends Object implements OpenPgpTrustStore
OpenPgpTrustStore.Trust
Constructor and Description |
---|
AbstractOpenPgpTrustStore() |
Modifier and Type | Method and Description |
---|---|
OpenPgpTrustStore.Trust |
getTrust(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
|
protected abstract OpenPgpTrustStore.Trust |
readTrust(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
Read the trust record for the key with fingerprint
fingerprint of user owner from local storage. |
void |
setTrust(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint,
OpenPgpTrustStore.Trust trust)
|
protected abstract void |
writeTrust(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint,
OpenPgpTrustStore.Trust trust)
Write the trust record for the key with fingerprint
fingerprint of user owner to local storage. |
public AbstractOpenPgpTrustStore()
protected abstract OpenPgpTrustStore.Trust readTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws IOException
fingerprint
of user owner
from local storage.
This method returns Trust#undecided
in case that no trust record has been found.owner
- owner of the keyfingerprint
- fingerprint of the keyIOException
- IO is dangerousprotected abstract void writeTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws IOException
fingerprint
of user owner
to local storage.owner
- owner of the keyfingerprint
- fingerprint of the keytrust
- trust state of the keyIOException
- IO is dangerouspublic OpenPgpTrustStore.Trust getTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws IOException
OpenPgpTrustStore
OpenPgpTrustStore.Trust
state of owner
s 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
.getTrust
in interface OpenPgpTrustStore
owner
- owner of the keyfingerprint
- fingerprint of the keyIOException
- IO is dangerouspublic void setTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws IOException
OpenPgpTrustStore
setTrust
in interface OpenPgpTrustStore
owner
- owner of the keyfingerprint
- fingerprint of the keytrust
- trust recordIOException
- IO is dangerous