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 java.lang.Object implements OpenPgpTrustStore
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jivesoftware.smackx.ox.store.definition.OpenPgpTrustStore
OpenPgpTrustStore.Trust
-
-
Constructor Summary
Constructors Constructor Description AbstractOpenPgpTrustStore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description OpenPgpTrustStore.Trust
getTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
protected abstract OpenPgpTrustStore.Trust
readTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
Read the trust record for the key with fingerprintfingerprint
of userowner
from local storage.void
setTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust)
protected abstract void
writeTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust)
Write the trust record for the key with fingerprintfingerprint
of userowner
to local storage.
-
-
-
Constructor Detail
-
AbstractOpenPgpTrustStore
public AbstractOpenPgpTrustStore()
-
-
Method Detail
-
readTrust
protected abstract OpenPgpTrustStore.Trust readTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws java.io.IOException
Read the trust record for the key with fingerprintfingerprint
of userowner
from local storage. This method returnsOpenPgpTrustStore.Trust.undecided
in 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:
java.io.IOException
- IO is dangerous
-
writeTrust
protected abstract void writeTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws java.io.IOException
Write the trust record for the key with fingerprintfingerprint
of userowner
to local storage.- Parameters:
owner
- owner of the keyfingerprint
- fingerprint of the keytrust
- trust state of the key- Throws:
java.io.IOException
- IO is dangerous
-
getTrust
public OpenPgpTrustStore.Trust getTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws java.io.IOException
Description copied from interface:OpenPgpTrustStore
Return theOpenPgpTrustStore.Trust
state ofowner
s key with fingerprintfingerprint
. The trust state describes, whether the user trusts a certain key of a contact. If noOpenPgpTrustStore.Trust
record has been found, this method MUST return not null, nutOpenPgpTrustStore.Trust.undecided
.- Specified by:
getTrust
in interfaceOpenPgpTrustStore
- Parameters:
owner
- owner of the keyfingerprint
- fingerprint of the key- Returns:
- trust state
- Throws:
java.io.IOException
- IO is dangerous
-
setTrust
public void setTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws java.io.IOException
Description copied from interface:OpenPgpTrustStore
- Specified by:
setTrust
in interfaceOpenPgpTrustStore
- Parameters:
owner
- owner of the keyfingerprint
- fingerprint of the keytrust
- trust record- Throws:
java.io.IOException
- IO is dangerous
-
-