mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Rename PEP to Pep
This commit is contained in:
parent
4b3f757ed9
commit
4d4f92ba86
6 changed files with 44 additions and 44 deletions
|
@ -67,8 +67,8 @@ import org.jivesoftware.smackx.ox.store.definition.OpenPgpStore;
|
|||
import org.jivesoftware.smackx.ox.store.definition.OpenPgpTrustStore;
|
||||
import org.jivesoftware.smackx.ox.util.OpenPgpPubSubUtil;
|
||||
import org.jivesoftware.smackx.ox.util.SecretKeyBackupHelper;
|
||||
import org.jivesoftware.smackx.pep.PEPListener;
|
||||
import org.jivesoftware.smackx.pep.PEPManager;
|
||||
import org.jivesoftware.smackx.pep.PepListener;
|
||||
import org.jivesoftware.smackx.pep.PepManager;
|
||||
import org.jivesoftware.smackx.pubsub.EventElement;
|
||||
import org.jivesoftware.smackx.pubsub.ItemsExtension;
|
||||
import org.jivesoftware.smackx.pubsub.LeafNode;
|
||||
|
@ -166,7 +166,7 @@ public final class OpenPgpManager extends Manager {
|
|||
*/
|
||||
private OpenPgpProvider provider;
|
||||
|
||||
private final PEPManager pepManager;
|
||||
private final PepManager pepManager;
|
||||
|
||||
private final Set<SigncryptElementReceivedListener> signcryptElementReceivedListeners = new HashSet<>();
|
||||
private final Set<SignElementReceivedListener> signElementReceivedListeners = new HashSet<>();
|
||||
|
@ -180,7 +180,7 @@ public final class OpenPgpManager extends Manager {
|
|||
private OpenPgpManager(XMPPConnection connection) {
|
||||
super(connection);
|
||||
ChatManager.getInstanceFor(connection).addIncomingListener(incomingOpenPgpMessageListener);
|
||||
pepManager = PEPManager.getInstanceFor(connection);
|
||||
pepManager = PepManager.getInstanceFor(connection);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -238,7 +238,7 @@ public final class OpenPgpManager extends Manager {
|
|||
/**
|
||||
* Generate a fresh OpenPGP key pair, given we don't have one already.
|
||||
* Publish the public key to the Public Key Node and update the Public Key Metadata Node with our keys fingerprint.
|
||||
* Lastly register a {@link PEPListener} which listens for updates to Public Key Metadata Nodes.
|
||||
* Lastly register a {@link PepListener} which listens for updates to Public Key Metadata Nodes.
|
||||
*
|
||||
* @throws NoSuchAlgorithmException if we are missing an algorithm to generate a fresh key pair.
|
||||
* @throws NoSuchProviderException if we are missing a suitable {@link java.security.Provider}.
|
||||
|
@ -278,7 +278,7 @@ public final class OpenPgpManager extends Manager {
|
|||
publishPublicKey(pepManager, pubkeyElement, primaryFingerprint);
|
||||
|
||||
// Subscribe to public key changes
|
||||
PEPManager.getInstanceFor(connection()).addPEPListener(metadataListener);
|
||||
PepManager.getInstanceFor(connection()).addPepListener(metadataListener);
|
||||
ServiceDiscoveryManager.getInstanceFor(connection())
|
||||
.addFeature(PEP_NODE_PUBLIC_KEYS_NOTIFY);
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ public final class OpenPgpManager extends Manager {
|
|||
* Remove the metadata listener. This method is mainly used in tests.
|
||||
*/
|
||||
public void stopMetadataListener() {
|
||||
PEPManager.getInstanceFor(connection()).removePEPListener(metadataListener);
|
||||
PepManager.getInstanceFor(connection()).removePepListener(metadataListener);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -497,11 +497,11 @@ public final class OpenPgpManager extends Manager {
|
|||
*/
|
||||
|
||||
/**
|
||||
* {@link PEPListener} that listens for changes to the OX public keys metadata node.
|
||||
* {@link PepListener} that listens for changes to the OX public keys metadata node.
|
||||
*
|
||||
* @see <a href="https://xmpp.org/extensions/xep-0373.html#pubsub-notifications">XEP-0373 §4.4</a>
|
||||
*/
|
||||
private final PEPListener metadataListener = new PEPListener() {
|
||||
private final PepListener metadataListener = new PepListener() {
|
||||
@Override
|
||||
public void eventReceived(final EntityBareJid from, final EventElement event, final Message message) {
|
||||
if (PEP_NODE_PUBLIC_KEYS.equals(event.getEvent().getNode())) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.jivesoftware.smackx.ox.OpenPgpManager;
|
|||
import org.jivesoftware.smackx.ox.element.PubkeyElement;
|
||||
import org.jivesoftware.smackx.ox.element.PublicKeysListElement;
|
||||
import org.jivesoftware.smackx.ox.element.SecretkeyElement;
|
||||
import org.jivesoftware.smackx.pep.PEPManager;
|
||||
import org.jivesoftware.smackx.pep.PepManager;
|
||||
import org.jivesoftware.smackx.pubsub.AccessModel;
|
||||
import org.jivesoftware.smackx.pubsub.ConfigureForm;
|
||||
import org.jivesoftware.smackx.pubsub.Item;
|
||||
|
@ -123,7 +123,7 @@ public class OpenPgpPubSubUtil {
|
|||
* @throws SmackException.NotConnectedException if we are not connected.
|
||||
* @throws SmackException.NoResponseException if the server doesn't respond.
|
||||
*/
|
||||
public static void publishPublicKey(PEPManager pepManager, PubkeyElement pubkeyElement, OpenPgpV4Fingerprint fingerprint)
|
||||
public static void publishPublicKey(PepManager pepManager, PubkeyElement pubkeyElement, OpenPgpV4Fingerprint fingerprint)
|
||||
throws InterruptedException, PubSubException.NotALeafNodeException,
|
||||
XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException {
|
||||
|
||||
|
@ -227,7 +227,7 @@ public class OpenPgpPubSubUtil {
|
|||
* @throws SmackException.NoResponseException if the server doesn't respond.
|
||||
* @return <code>true</code> if the node existed and was deleted, <code>false</code> if the node did not exist.
|
||||
*/
|
||||
public static boolean deletePubkeysListNode(PEPManager pepManager)
|
||||
public static boolean deletePubkeysListNode(PepManager pepManager)
|
||||
throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
|
||||
SmackException.NoResponseException {
|
||||
PubSubManager pm = pepManager.getPepPubSubManager();
|
||||
|
@ -246,7 +246,7 @@ public class OpenPgpPubSubUtil {
|
|||
* @throws SmackException.NoResponseException if the server doesn't respond.
|
||||
* @return <code>true</code> if the node existed and was deleted, <code>false</code> if the node did not exist.
|
||||
*/
|
||||
public static boolean deletePublicKeyNode(PEPManager pepManager, OpenPgpV4Fingerprint fingerprint)
|
||||
public static boolean deletePublicKeyNode(PepManager pepManager, OpenPgpV4Fingerprint fingerprint)
|
||||
throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
|
||||
SmackException.NoResponseException {
|
||||
PubSubManager pm = pepManager.getPepPubSubManager();
|
||||
|
@ -346,7 +346,7 @@ public class OpenPgpPubSubUtil {
|
|||
if (!OpenPgpManager.serverSupportsSecretKeyBackups(connection)) {
|
||||
throw new SmackException.FeatureNotSupportedException("http://jabber.org/protocol/pubsub#access-whitelist");
|
||||
}
|
||||
PubSubManager pm = PEPManager.getInstanceFor(connection).getPepPubSubManager();
|
||||
PubSubManager pm = PepManager.getInstanceFor(connection).getPepPubSubManager();
|
||||
LeafNode secretKeyNode = pm.getOrCreateLeafNode(PEP_NODE_SECRET_KEY);
|
||||
OpenPgpPubSubUtil.changeAccessModelIfNecessary(secretKeyNode, AccessModel.whitelist);
|
||||
|
||||
|
@ -368,7 +368,7 @@ public class OpenPgpPubSubUtil {
|
|||
* @throws SmackException.NotConnectedException if we are not connected
|
||||
* @throws SmackException.NoResponseException /watch?v=7U0FzQzJzyI
|
||||
*/
|
||||
public static SecretkeyElement fetchSecretKey(PEPManager pepManager)
|
||||
public static SecretkeyElement fetchSecretKey(PepManager pepManager)
|
||||
throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException,
|
||||
SmackException.NotConnectedException, SmackException.NoResponseException {
|
||||
PubSubManager pm = pepManager.getPepPubSubManager();
|
||||
|
@ -393,7 +393,7 @@ public class OpenPgpPubSubUtil {
|
|||
* @throws SmackException.NoResponseException if the server sends no response
|
||||
* @return <code>true</code> if the node existed and was deleted, <code>false</code> if the node did not exist.
|
||||
*/
|
||||
public static boolean deleteSecretKeyNode(PEPManager pepManager)
|
||||
public static boolean deleteSecretKeyNode(PepManager pepManager)
|
||||
throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
|
||||
SmackException.NoResponseException {
|
||||
PubSubManager pm = pepManager.getPepPubSubManager();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue