From b2de33372530a2c274df47cbd60e46c29d3dbdd6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 19 Jan 2009 23:40:35 +0100 Subject: [PATCH] Add core listener methods for key store creation. --- .../pterodactylus/jkeytool/core/CoreListener.java | 19 +++++++++++++++ .../jkeytool/core/CoreListenerSupport.java | 27 ++++++++++++++++++++++ src/net/pterodactylus/jkeytool/gui/MainFrame.java | 14 +++++++++++ 3 files changed, 60 insertions(+) diff --git a/src/net/pterodactylus/jkeytool/core/CoreListener.java b/src/net/pterodactylus/jkeytool/core/CoreListener.java index 54c2ae7..83c9da0 100644 --- a/src/net/pterodactylus/jkeytool/core/CoreListener.java +++ b/src/net/pterodactylus/jkeytool/core/CoreListener.java @@ -31,6 +31,25 @@ import java.util.EventListener; public interface CoreListener extends EventListener { /** + * Notifies all listener that a new key store was created. + * + * @param keyStore + * The key store that was created + */ + public void keyStoreCreated(KeyStore keyStore); + + /** + * Notifies all listeners that a key store of the given type could not be + * created. + * + * @param keyStoreType + * The type of the key store that should be created + * @param reason + * The reason why the key store could not be created + */ + public void keyStoreNotCreated(String keyStoreType, Throwable reason); + + /** * Notifies all listeners that a key store was loaded from a file. * * @param keyStoreFile diff --git a/src/net/pterodactylus/jkeytool/core/CoreListenerSupport.java b/src/net/pterodactylus/jkeytool/core/CoreListenerSupport.java index 58501fb..1b3dbe5 100644 --- a/src/net/pterodactylus/jkeytool/core/CoreListenerSupport.java +++ b/src/net/pterodactylus/jkeytool/core/CoreListenerSupport.java @@ -46,6 +46,33 @@ public class CoreListenerSupport extends AbstractListenerSupport