Add core listener methods for key store creation.
[jkeytool.git] / src / net / pterodactylus / jkeytool / core / CoreListenerSupport.java
index 58501fb..1b3dbe5 100644 (file)
@@ -46,6 +46,33 @@ public class CoreListenerSupport extends AbstractListenerSupport<Core, CoreListe
        //
 
        /**
+        * Notifies all listeners that a new key store was created.
+        *
+        * @see CoreListener#keyStoreCreated(KeyStore)
+        * @param keyStore
+        *            The key store that was created
+        */
+       public void fireKeyStoreCreated(KeyStore keyStore) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.keyStoreCreated(keyStore);
+               }
+       }
+
+       /**
+        * Notifies all listeners that a key store could not be created.
+        *
+        * @param keyStoreType
+        *            The type of the key store
+        * @param reason
+        *            The reason why the key store could not be created
+        */
+       public void fireKeyStoreNotCreated(String keyStoreType, Throwable reason) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.keyStoreNotCreated(keyStoreType, reason);
+               }
+       }
+
+       /**
         * Notifies all listeners that a keystore was loaded from a file.
         *
         * @see CoreListener#keyStoreLoaded(File, KeyStore)