Class AbstractOpenPgpTrustStore
java.lang.Object
org.jivesoftware.smackx.ox.store.abstr.AbstractOpenPgpTrustStore
- All Implemented Interfaces:
OpenPgpTrustStore
- Direct Known Subclasses:
FileBasedOpenPgpTrustStore
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jivesoftware.smackx.ox.store.definition.OpenPgpTrustStore
OpenPgpTrustStore.Trust -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract OpenPgpTrustStore.TrustRead the trust record for the key with fingerprintfingerprintof userownerfrom local storage.voidsetTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) protected abstract voidwriteTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) Write the trust record for the key with fingerprintfingerprintof userownerto local storage.
-
Constructor Details
-
AbstractOpenPgpTrustStore
public AbstractOpenPgpTrustStore()
-
-
Method Details
-
readTrust
protected abstract OpenPgpTrustStore.Trust readTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws IOException Read the trust record for the key with fingerprintfingerprintof userownerfrom local storage. This method returnsOpenPgpTrustStore.Trust.undecidedin case that no trust record has been found.- Parameters:
owner- owner of the keyfingerprint- fingerprint of the key- Returns:
- trust state of the key
- Throws:
IOException- IO is dangerous
-
writeTrust
protected abstract void writeTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws IOException Write the trust record for the key with fingerprintfingerprintof userownerto local storage.- Parameters:
owner- owner of the keyfingerprint- fingerprint of the keytrust- trust state of the key- Throws:
IOException- IO is dangerous
-
getTrust
public OpenPgpTrustStore.Trust getTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws IOException Description copied from interface:OpenPgpTrustStoreReturn theOpenPgpTrustStore.Truststate ofowners key with fingerprintfingerprint. The trust state describes, whether the user trusts a certain key of a contact. If noOpenPgpTrustStore.Trustrecord has been found, this method MUST return not null, nutOpenPgpTrustStore.Trust.undecided.- Specified by:
getTrustin interfaceOpenPgpTrustStore- Parameters:
owner- owner of the keyfingerprint- fingerprint of the key- Returns:
- trust state
- Throws:
IOException- IO is dangerous
-
setTrust
public void setTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws IOException Description copied from interface:OpenPgpTrustStore- Specified by:
setTrustin interfaceOpenPgpTrustStore- Parameters:
owner- owner of the keyfingerprint- fingerprint of the keytrust- trust record- Throws:
IOException- IO is dangerous
-