]> git.mxchange.org Git - juser-core.git/commitdiff
renamed to better names (Observable hints interface)
authorRoland Häder <roland@mxchange.org>
Wed, 19 Apr 2017 22:55:00 +0000 (00:55 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 19 Apr 2017 22:55:00 +0000 (00:55 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
39 files changed:
src/org/mxchange/jusercore/events/confirmation/ConfirmedUserAccountEvent.java [deleted file]
src/org/mxchange/jusercore/events/confirmation/ObservableUserConfirmedAccountEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/confirmation/UserConfirmedAccountEvent.java
src/org/mxchange/jusercore/events/login/ObservableUserLoggedInEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/login/UserLoggedInEvent.java
src/org/mxchange/jusercore/events/login/UserLoginEvent.java [deleted file]
src/org/mxchange/jusercore/events/logout/ObservableUserLogoutEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/logout/ObserveableUserLogoutEvent.java [deleted file]
src/org/mxchange/jusercore/events/logout/UserLogoutEvent.java
src/org/mxchange/jusercore/events/registration/ObservableUserRegisteredEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/registration/RegisteredUserEvent.java [deleted file]
src/org/mxchange/jusercore/events/registration/UserRegisteredEvent.java
src/org/mxchange/jusercore/events/resendlink/ObservableUserResendLinkAccountEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/resendlink/ResendLinkUserAccountEvent.java [deleted file]
src/org/mxchange/jusercore/events/resendlink/UserResendLinkAccountEvent.java
src/org/mxchange/jusercore/events/user/add/AdminAddedUserEvent.java
src/org/mxchange/jusercore/events/user/add/AdminUserAddedEvent.java [deleted file]
src/org/mxchange/jusercore/events/user/add/ObservableAdminAddedUserEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/delete/AdminDeletedUserEvent.java
src/org/mxchange/jusercore/events/user/delete/AdminUserDeletedEvent.java [deleted file]
src/org/mxchange/jusercore/events/user/delete/ObservableAdminDeletedUserEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/linked/AdminLinkedUserEvent.java
src/org/mxchange/jusercore/events/user/linked/AdminUserLinkedEvent.java [deleted file]
src/org/mxchange/jusercore/events/user/linked/ObservableAdminLinkedUserEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/locked/AdminLockedUserEvent.java
src/org/mxchange/jusercore/events/user/locked/AdminUserLockedEvent.java [deleted file]
src/org/mxchange/jusercore/events/user/locked/ObservableAdminLockedUserEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/password_change/ObservableUpdatedUserPasswordEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/password_change/UpdatedUserPasswordEvent.java
src/org/mxchange/jusercore/events/user/password_change/UserUpdatedPasswordEvent.java [deleted file]
src/org/mxchange/jusercore/events/user/unlocked/AdminUnlockedUserEvent.java
src/org/mxchange/jusercore/events/user/unlocked/AdminUserUnlockedEvent.java [deleted file]
src/org/mxchange/jusercore/events/user/unlocked/ObservableAdminUnlockedUserEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/update/AdminUpdatedUserDataEvent.java
src/org/mxchange/jusercore/events/user/update/AdminUserDataUpdatedEvent.java [deleted file]
src/org/mxchange/jusercore/events/user/update/ObservableAdminUpdatedUserDataEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/update/ObservableUpdatedUserPersonalDataEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/update/UpdatedUserPersonalDataEvent.java
src/org/mxchange/jusercore/events/user/update/UserUpdatedPersonalDataEvent.java [deleted file]

diff --git a/src/org/mxchange/jusercore/events/confirmation/ConfirmedUserAccountEvent.java b/src/org/mxchange/jusercore/events/confirmation/ConfirmedUserAccountEvent.java
deleted file mode 100644 (file)
index 167a936..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.events.confirmation;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event, fired if a new confirmedUser has confirmed
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class ConfirmedUserAccountEvent implements UserConfirmedAccountEvent {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 575_412_375_267_190L;
-
-       /**
-        * Newly confirmed user
-        */
-       private final User confirmedUser;
-
-       /**
-        * Constructor with newly confirmed confirmedUser
-        * <p>
-        * @param confirmedUser Newly confirmed confirmedUser
-        */
-       public ConfirmedUserAccountEvent (final User confirmedUser) {
-               // Is the confirmed user instance valid?
-               if (null == confirmedUser) {
-                       // Throw NPE
-                       throw new NullPointerException("confirmedUser is null"); //NOI18N
-               } else if (confirmedUser.getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("confirmedUser.userId is null"); //NOI18N
-               } else if (confirmedUser.getUserId() < 1) {
-                       // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("confirmedUser.userId={0} is invalid.", confirmedUser.getUserId())); //NOI18N
-               }
-
-               // Set it here
-               this.confirmedUser = confirmedUser;
-       }
-
-       @Override
-       public User getConfirmedUser () {
-               return this.confirmedUser;
-       }
-
-}
diff --git a/src/org/mxchange/jusercore/events/confirmation/ObservableUserConfirmedAccountEvent.java b/src/org/mxchange/jusercore/events/confirmation/ObservableUserConfirmedAccountEvent.java
new file mode 100644 (file)
index 0000000..903394c
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.events.confirmation;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event interface, fired if a new user has registered
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUserConfirmedAccountEvent extends Serializable {
+
+       /**
+        * Getter for user instance
+        * <p>
+        * @return User instance
+        */
+       User getConfirmedUser ();
+
+}
index faa1463b83c76c5d6abcd718c82b19d6927565d3..e859e5e9e1e34c14f6114a061c5ea0e720e775a6 100644 (file)
  */
 package org.mxchange.jusercore.events.confirmation;
 
-import java.io.Serializable;
+import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An event interface, fired if a new user has registered
+ * An event, fired if a new confirmedUser has confirmed
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public interface UserConfirmedAccountEvent extends Serializable {
+public class UserConfirmedAccountEvent implements ObservableUserConfirmedAccountEvent {
 
        /**
-        * Getter for user instance
+        * Serial number
+        */
+       private static final long serialVersionUID = 575_412_375_267_190L;
+
+       /**
+        * Newly confirmed user
+        */
+       private final User confirmedUser;
+
+       /**
+        * Constructor with newly confirmed confirmedUser
         * <p>
-        * @return User instance
+        * @param confirmedUser Newly confirmed confirmedUser
         */
-       User getConfirmedUser ();
+       public UserConfirmedAccountEvent (final User confirmedUser) {
+               // Is the confirmed user instance valid?
+               if (null == confirmedUser) {
+                       // Throw NPE
+                       throw new NullPointerException("confirmedUser is null"); //NOI18N
+               } else if (confirmedUser.getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("confirmedUser.userId is null"); //NOI18N
+               } else if (confirmedUser.getUserId() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("confirmedUser.userId={0} is invalid.", confirmedUser.getUserId())); //NOI18N
+               }
+
+               // Set it here
+               this.confirmedUser = confirmedUser;
+       }
+
+       @Override
+       public User getConfirmedUser () {
+               return this.confirmedUser;
+       }
 
 }
diff --git a/src/org/mxchange/jusercore/events/login/ObservableUserLoggedInEvent.java b/src/org/mxchange/jusercore/events/login/ObservableUserLoggedInEvent.java
new file mode 100644 (file)
index 0000000..719ddce
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.events.login;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events after the user has logged in
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUserLoggedInEvent extends Serializable {
+
+       /**
+        * Getter for user instance
+        * <p>
+        * @return User instance
+        */
+       User getLoggedInUser ();
+
+}
index 209b7a283460fe8bcf8620432fc2a4c7e07a472f..fa5f93cbbdede2962312770f38527c579ce2ffae 100644 (file)
  */
 package org.mxchange.jusercore.events.login;
 
-import java.io.Serializable;
+import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An interface for events after the user has logged in
+ * This event is fired when the loggedInUser has logged in
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public interface UserLoggedInEvent extends Serializable {
+public class UserLoggedInEvent implements ObservableUserLoggedInEvent {
 
        /**
-        * Getter for user instance
+        * Serial number
+        */
+       private static final long serialVersionUID = 163_294_958_817_560L;
+
+       /**
+        * User instance
+        */
+       private final User loggedInUser;
+
+       /**
+        * Constructor with updated user instance
         * <p>
-        * @return User instance
+        * @param loggedInUser Updated user instance
         */
-       User getLoggedInUser ();
+       public UserLoggedInEvent (final User loggedInUser) {
+               // Is the logged-in user instance valid?
+               if (null == loggedInUser) {
+                       // Throw NPE
+                       throw new NullPointerException("loggedInUser is null"); //NOI18N
+               } else if (loggedInUser.getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("loggedInUser.userId is null"); //NOI18N
+               } else if (loggedInUser.getUserId() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("loggedInUser.userId={0} is invalid.", loggedInUser.getUserId())); //NOI18N
+               }
+
+               // Set loggedInUser
+               this.loggedInUser = loggedInUser;
+       }
+
+       @Override
+       public User getLoggedInUser () {
+               return this.loggedInUser;
+       }
 
 }
diff --git a/src/org/mxchange/jusercore/events/login/UserLoginEvent.java b/src/org/mxchange/jusercore/events/login/UserLoginEvent.java
deleted file mode 100644 (file)
index 6dc984b..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.events.login;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * This event is fired when the loggedInUser has logged in
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class UserLoginEvent implements UserLoggedInEvent {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 163_294_958_817_560L;
-
-       /**
-        * User instance
-        */
-       private final User loggedInUser;
-
-       /**
-        * Constructor with updated user instance
-        * <p>
-        * @param loggedInUser Updated user instance
-        */
-       public UserLoginEvent (final User loggedInUser) {
-               // Is the logged-in user instance valid?
-               if (null == loggedInUser) {
-                       // Throw NPE
-                       throw new NullPointerException("loggedInUser is null"); //NOI18N
-               } else if (loggedInUser.getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("loggedInUser.userId is null"); //NOI18N
-               } else if (loggedInUser.getUserId() < 1) {
-                       // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("loggedInUser.userId={0} is invalid.", loggedInUser.getUserId())); //NOI18N
-               }
-
-               // Set loggedInUser
-               this.loggedInUser = loggedInUser;
-       }
-
-       @Override
-       public User getLoggedInUser () {
-               return this.loggedInUser;
-       }
-
-}
diff --git a/src/org/mxchange/jusercore/events/logout/ObservableUserLogoutEvent.java b/src/org/mxchange/jusercore/events/logout/ObservableUserLogoutEvent.java
new file mode 100644 (file)
index 0000000..13e4331
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.events.logout;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events after the user has logged in
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUserLogoutEvent extends Serializable {
+
+       /**
+        * Getter for user instance
+        * <p>
+        * @return User instance
+        */
+       User getLoggedOutUser ();
+
+}
diff --git a/src/org/mxchange/jusercore/events/logout/ObserveableUserLogoutEvent.java b/src/org/mxchange/jusercore/events/logout/ObserveableUserLogoutEvent.java
deleted file mode 100644 (file)
index effafc8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.events.logout;
-
-import java.io.Serializable;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An interface for events after the user has logged in
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface ObserveableUserLogoutEvent extends Serializable {
-
-       /**
-        * Getter for user instance
-        * <p>
-        * @return User instance
-        */
-       User getLoggedOutUser ();
-
-}
index 3ecb1b2da354607f69df570e5f874af947eff8ae..986d056dfd3c5e6f3a1482294bb56a07103b0216 100644 (file)
@@ -24,7 +24,7 @@ import org.mxchange.jusercore.model.user.User;
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public class UserLogoutEvent implements ObserveableUserLogoutEvent {
+public class UserLogoutEvent implements ObservableUserLogoutEvent {
 
        /**
         * Serial number
diff --git a/src/org/mxchange/jusercore/events/registration/ObservableUserRegisteredEvent.java b/src/org/mxchange/jusercore/events/registration/ObservableUserRegisteredEvent.java
new file mode 100644 (file)
index 0000000..3ca2e16
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.events.registration;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event interface, fired if a new user has registered
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUserRegisteredEvent extends Serializable {
+
+       /**
+        * Getter for user instance
+        * <p>
+        * @return User instance
+        */
+       User getRegisteredUser ();
+
+}
diff --git a/src/org/mxchange/jusercore/events/registration/RegisteredUserEvent.java b/src/org/mxchange/jusercore/events/registration/RegisteredUserEvent.java
deleted file mode 100644 (file)
index d0d3e9a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.events.registration;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event, fired if a new registeredUser has registered
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class RegisteredUserEvent implements UserRegisteredEvent {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 186_956_974_127_691L;
-
-       /**
-        * Newly registered registeredUser;
-        */
-       private final User registeredUser;
-
-       /**
-        * Constructor with newly registered registeredUser
-        * <p>
-        * @param registeredUser Newly registered registeredUser
-        */
-       public RegisteredUserEvent (final User registeredUser) {
-               // Is the registered user instance valid?
-               if (null == registeredUser) {
-                       // Throw NPE
-                       throw new NullPointerException("registeredUser is null"); //NOI18N
-               } else if (registeredUser.getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("registeredUser.userId is null"); //NOI18N
-               } else if (registeredUser.getUserId() < 1) {
-                       // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("registeredUser.userId={0} is invalid.", registeredUser.getUserId())); //NOI18N
-               }
-
-               // Set it here
-               this.registeredUser = registeredUser;
-       }
-
-       /**
-        * Getter for registeredUser instance
-        * <p>
-        * @return User instance
-        */
-       @Override
-       public User getRegisteredUser () {
-               return this.registeredUser;
-       }
-
-}
index 5bad60c45af36790625fdf041c0accefd38c7103..53812230be8e6a128a6720bfd6bf06f4ae711f1f 100644 (file)
  */
 package org.mxchange.jusercore.events.registration;
 
-import java.io.Serializable;
+import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An event interface, fired if a new user has registered
+ * An event, fired if a new registeredUser has registered
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public interface UserRegisteredEvent extends Serializable {
+public class UserRegisteredEvent implements ObservableUserRegisteredEvent {
 
        /**
-        * Getter for user instance
+        * Serial number
+        */
+       private static final long serialVersionUID = 186_956_974_127_691L;
+
+       /**
+        * Newly registered registeredUser;
+        */
+       private final User registeredUser;
+
+       /**
+        * Constructor with newly registered registeredUser
+        * <p>
+        * @param registeredUser Newly registered registeredUser
+        */
+       public UserRegisteredEvent (final User registeredUser) {
+               // Is the registered user instance valid?
+               if (null == registeredUser) {
+                       // Throw NPE
+                       throw new NullPointerException("registeredUser is null"); //NOI18N
+               } else if (registeredUser.getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("registeredUser.userId is null"); //NOI18N
+               } else if (registeredUser.getUserId() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("registeredUser.userId={0} is invalid.", registeredUser.getUserId())); //NOI18N
+               }
+
+               // Set it here
+               this.registeredUser = registeredUser;
+       }
+
+       /**
+        * Getter for registeredUser instance
         * <p>
         * @return User instance
         */
-       User getRegisteredUser ();
+       @Override
+       public User getRegisteredUser () {
+               return this.registeredUser;
+       }
 
 }
diff --git a/src/org/mxchange/jusercore/events/resendlink/ObservableUserResendLinkAccountEvent.java b/src/org/mxchange/jusercore/events/resendlink/ObservableUserResendLinkAccountEvent.java
new file mode 100644 (file)
index 0000000..b6055b0
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.events.resendlink;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event interface, fired if a user has resend confirmation link
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUserResendLinkAccountEvent extends Serializable {
+
+       /**
+        * Getter for user instance
+        * <p>
+        * @return User instance
+        */
+       User getResendLinkUser ();
+
+}
diff --git a/src/org/mxchange/jusercore/events/resendlink/ResendLinkUserAccountEvent.java b/src/org/mxchange/jusercore/events/resendlink/ResendLinkUserAccountEvent.java
deleted file mode 100644 (file)
index 884e622..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.events.resendlink;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event, fired if a user has resend confirmation link
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class ResendLinkUserAccountEvent implements UserResendLinkAccountEvent {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 575_412_375_267_190L;
-
-       /**
-        * user resend confirmation link
-        */
-       private final User resendLinkUser;
-
-       /**
-        * Constructor with user resend confirmation link
-        * <p>
-        * @param resendLinkUser User resend confirmation link
-        */
-       public ResendLinkUserAccountEvent (final User resendLinkUser) {
-               // Is the confirmed user instance valid?
-               if (null == resendLinkUser) {
-                       // Throw NPE
-                       throw new NullPointerException("resendLinkUser is null"); //NOI18N
-               } else if (resendLinkUser.getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("resendLinkUser.userId is null"); //NOI18N
-               } else if (resendLinkUser.getUserId() < 1) {
-                       // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("resendLinkUser.userId={0} is invalid.", resendLinkUser.getUserId())); //NOI18N
-               }
-
-               // Set it here
-               this.resendLinkUser = resendLinkUser;
-       }
-
-       @Override
-       public User getResendLinkUser () {
-               return this.resendLinkUser;
-       }
-
-}
index efae54b20242ee31ecff23fe6a5c9d0089e5ce0a..65d0e4b7afa822311d8a5482ce811ab02aa67ca6 100644 (file)
  */
 package org.mxchange.jusercore.events.resendlink;
 
-import java.io.Serializable;
+import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An event interface, fired if a user has resend confirmation link
+ * An event, fired if a user has resend confirmation link
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public interface UserResendLinkAccountEvent extends Serializable {
+public class UserResendLinkAccountEvent implements ObservableUserResendLinkAccountEvent {
 
        /**
-        * Getter for user instance
+        * Serial number
+        */
+       private static final long serialVersionUID = 575_412_375_267_190L;
+
+       /**
+        * user resend confirmation link
+        */
+       private final User resendLinkUser;
+
+       /**
+        * Constructor with user resend confirmation link
         * <p>
-        * @return User instance
+        * @param resendLinkUser User resend confirmation link
         */
-       User getResendLinkUser ();
+       public UserResendLinkAccountEvent (final User resendLinkUser) {
+               // Is the confirmed user instance valid?
+               if (null == resendLinkUser) {
+                       // Throw NPE
+                       throw new NullPointerException("resendLinkUser is null"); //NOI18N
+               } else if (resendLinkUser.getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("resendLinkUser.userId is null"); //NOI18N
+               } else if (resendLinkUser.getUserId() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("resendLinkUser.userId={0} is invalid.", resendLinkUser.getUserId())); //NOI18N
+               }
+
+               // Set it here
+               this.resendLinkUser = resendLinkUser;
+       }
+
+       @Override
+       public User getResendLinkUser () {
+               return this.resendLinkUser;
+       }
 
 }
index 65c8a6afc9884c7ba4e96265824e01d90b18126d..68e33f359ed59c33fc098c4abac9d16c466f47c5 100644 (file)
  */\r
 package org.mxchange.jusercore.events.user.add;\r
 \r
-import java.io.Serializable;\r
+import java.text.MessageFormat;\r
 import org.mxchange.jusercore.model.user.User;\r
 \r
 /**\r
- * An interface for events being fired when an administrator added a new user\r
- * account.\r
+ * An event being fired when the administrator has added a new user account\r
  * <p>\r
  * @author Roland Häder<roland@mxchange.org>\r
  */\r
-public interface AdminAddedUserEvent extends Serializable {\r
+public class AdminAddedUserEvent implements ObservableAdminAddedUserEvent {\r
 \r
        /**\r
-        * Getter for added user instance\r
+        * Serial number\r
+        */\r
+       private static final long serialVersionUID = 14_785_787_174_676_290L;\r
+\r
+       /**\r
+        * Added user instance\r
+        */\r
+       private final User addedUser;\r
+\r
+       /**\r
+        * Constructor with added user instance\r
         * <p>\r
-        * @return Added user instance\r
+        * @param addedUser Added user instance\r
         */\r
-       User getAddedUser ();\r
+       public AdminAddedUserEvent (final User addedUser) {\r
+               // Is the user instance valid?\r
+               if (null == addedUser) {\r
+                       // Throw NPE\r
+                       throw new NullPointerException("addedUser is null"); //NOI18N\r
+               } else if (addedUser.getUserId() == null) {\r
+                       // Throw NPE again\r
+                       throw new NullPointerException("addedUser.userId is null"); //NOI18N\r
+               } else if (addedUser.getUserId() < 1) {\r
+                       // Invalid id number\r
+                       throw new IllegalArgumentException(MessageFormat.format("addedUser.userId={0} is invalid.", addedUser.getUserId())); //NOI18N\r
+               }\r
+\r
+               // Set it here\r
+               this.addedUser = addedUser;\r
+       }\r
+\r
+       @Override\r
+       public User getAddedUser () {\r
+               return this.addedUser;\r
+       }\r
 \r
 }\r
diff --git a/src/org/mxchange/jusercore/events/user/add/AdminUserAddedEvent.java b/src/org/mxchange/jusercore/events/user/add/AdminUserAddedEvent.java
deleted file mode 100644 (file)
index 5d53ab0..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*\r
- * Copyright (C) 2016 Roland Häder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.jusercore.events.user.add;\r
-\r
-import java.text.MessageFormat;\r
-import org.mxchange.jusercore.model.user.User;\r
-\r
-/**\r
- * An event being fired when the administrator has added a new user account\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-public class AdminUserAddedEvent implements AdminAddedUserEvent {\r
-\r
-       /**\r
-        * Serial number\r
-        */\r
-       private static final long serialVersionUID = 14_785_787_174_676_290L;\r
-\r
-       /**\r
-        * Added user instance\r
-        */\r
-       private final User addedUser;\r
-\r
-       /**\r
-        * Constructor with added user instance\r
-        * <p>\r
-        * @param addedUser Added user instance\r
-        */\r
-       public AdminUserAddedEvent (final User addedUser) {\r
-               // Is the user instance valid?\r
-               if (null == addedUser) {\r
-                       // Throw NPE\r
-                       throw new NullPointerException("addedUser is null"); //NOI18N\r
-               } else if (addedUser.getUserId() == null) {\r
-                       // Throw NPE again\r
-                       throw new NullPointerException("addedUser.userId is null"); //NOI18N\r
-               } else if (addedUser.getUserId() < 1) {\r
-                       // Invalid id number\r
-                       throw new IllegalArgumentException(MessageFormat.format("addedUser.userId={0} is invalid.", addedUser.getUserId())); //NOI18N\r
-               }\r
-\r
-               // Set it here\r
-               this.addedUser = addedUser;\r
-       }\r
-\r
-       @Override\r
-       public User getAddedUser () {\r
-               return this.addedUser;\r
-       }\r
-\r
-}\r
diff --git a/src/org/mxchange/jusercore/events/user/add/ObservableAdminAddedUserEvent.java b/src/org/mxchange/jusercore/events/user/add/ObservableAdminAddedUserEvent.java
new file mode 100644 (file)
index 0000000..c26afb6
--- /dev/null
@@ -0,0 +1,37 @@
+/*\r
+ * Copyright (C) 2016 Roland Häder\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+package org.mxchange.jusercore.events.user.add;\r
+\r
+import java.io.Serializable;\r
+import org.mxchange.jusercore.model.user.User;\r
+\r
+/**\r
+ * An interface for events being fired when an administrator added a new user\r
+ * account.\r
+ * <p>\r
+ * @author Roland Häder<roland@mxchange.org>\r
+ */\r
+public interface ObservableAdminAddedUserEvent extends Serializable {\r
+\r
+       /**\r
+        * Getter for added user instance\r
+        * <p>\r
+        * @return Added user instance\r
+        */\r
+       User getAddedUser ();\r
+\r
+}\r
index 96fe2604b2325ac129213e1e4750627f0c5473b9..7526073be4c70fd18fda795cc83ef7039429462e 100644 (file)
  */\r
 package org.mxchange.jusercore.events.user.delete;\r
 \r
-import java.io.Serializable;\r
+import java.text.MessageFormat;\r
 import org.mxchange.jusercore.model.user.User;\r
 \r
 /**\r
- * An interface for events being fired when an administrator added a new user\r
- * account.\r
+ * An event being fired when the administrator has deleted a user account\r
  * <p>\r
  * @author Roland Häder<roland@mxchange.org>\r
  */\r
-public interface AdminDeletedUserEvent extends Serializable {\r
+public class AdminDeletedUserEvent implements ObservableAdminDeletedUserEvent {\r
 \r
        /**\r
-        * Getter for deleted user instance\r
-        * <p>\r
-        * @return Deleted user instance\r
+        * Serial number\r
+        */\r
+       private static final long serialVersionUID = 14_785_787_174_676_290L;\r
+\r
+       /**\r
+        * Deleted user instance\r
+        */\r
+       private final User deletedUser;\r
+\r
+       /**\r
+        * Delete reason\r
         */\r
-       User getDeletedUser ();\r
+       private final String userDeleteReason;\r
 \r
        /**\r
-        * Getter for user delete reason\r
+        * Constructor with deleted user instance\r
         * <p>\r
-        * @return User delete reason\r
+        * @param deletedUser Deleted user instance\r
+        * @param userDeleteReason Delete reason\r
         */\r
-       String getUserDeleteReason ();\r
+       public AdminDeletedUserEvent (final User deletedUser, final String userDeleteReason) {\r
+               // Is the user instance valid?\r
+               if (null == deletedUser) {\r
+                       // Throw NPE\r
+                       throw new NullPointerException("deletedUser is null"); //NOI18N\r
+               } else if (deletedUser.getUserId() == null) {\r
+                       // Throw NPE again\r
+                       throw new NullPointerException("deletedUser.userId is null"); //NOI18N\r
+               } else if (deletedUser.getUserId() < 1) {\r
+                       // Invalid id number\r
+                       throw new IllegalArgumentException(MessageFormat.format("deletedUser.userId={0} is invalid.", deletedUser.getUserId())); //NOI18N\r
+               }\r
+\r
+               // Set it here\r
+               this.deletedUser = deletedUser;\r
+               this.userDeleteReason = userDeleteReason;\r
+       }\r
+\r
+       @Override\r
+       public User getDeletedUser () {\r
+               return this.deletedUser;\r
+       }\r
+\r
+       @Override\r
+       public String getUserDeleteReason () {\r
+               return this.userDeleteReason;\r
+       }\r
 \r
 }\r
diff --git a/src/org/mxchange/jusercore/events/user/delete/AdminUserDeletedEvent.java b/src/org/mxchange/jusercore/events/user/delete/AdminUserDeletedEvent.java
deleted file mode 100644 (file)
index 31d29a6..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*\r
- * Copyright (C) 2016 Roland Häder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.jusercore.events.user.delete;\r
-\r
-import java.text.MessageFormat;\r
-import org.mxchange.jusercore.model.user.User;\r
-\r
-/**\r
- * An event being fired when the administrator has deleted a user account\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-public class AdminUserDeletedEvent implements AdminDeletedUserEvent {\r
-\r
-       /**\r
-        * Serial number\r
-        */\r
-       private static final long serialVersionUID = 14_785_787_174_676_290L;\r
-\r
-       /**\r
-        * Deleted user instance\r
-        */\r
-       private final User deletedUser;\r
-\r
-       /**\r
-        * Delete reason\r
-        */\r
-       private final String userDeleteReason;\r
-\r
-       /**\r
-        * Constructor with deleted user instance\r
-        * <p>\r
-        * @param deletedUser Deleted user instance\r
-        * @param userDeleteReason Delete reason\r
-        */\r
-       public AdminUserDeletedEvent (final User deletedUser, final String userDeleteReason) {\r
-               // Is the user instance valid?\r
-               if (null == deletedUser) {\r
-                       // Throw NPE\r
-                       throw new NullPointerException("deletedUser is null"); //NOI18N\r
-               } else if (deletedUser.getUserId() == null) {\r
-                       // Throw NPE again\r
-                       throw new NullPointerException("deletedUser.userId is null"); //NOI18N\r
-               } else if (deletedUser.getUserId() < 1) {\r
-                       // Invalid id number\r
-                       throw new IllegalArgumentException(MessageFormat.format("deletedUser.userId={0} is invalid.", deletedUser.getUserId())); //NOI18N\r
-               }\r
-\r
-               // Set it here\r
-               this.deletedUser = deletedUser;\r
-               this.userDeleteReason = userDeleteReason;\r
-       }\r
-\r
-       @Override\r
-       public User getDeletedUser () {\r
-               return this.deletedUser;\r
-       }\r
-\r
-       @Override\r
-       public String getUserDeleteReason () {\r
-               return this.userDeleteReason;\r
-       }\r
-\r
-}\r
diff --git a/src/org/mxchange/jusercore/events/user/delete/ObservableAdminDeletedUserEvent.java b/src/org/mxchange/jusercore/events/user/delete/ObservableAdminDeletedUserEvent.java
new file mode 100644 (file)
index 0000000..51079ac
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+ * Copyright (C) 2016 Roland Häder\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+package org.mxchange.jusercore.events.user.delete;\r
+\r
+import java.io.Serializable;\r
+import org.mxchange.jusercore.model.user.User;\r
+\r
+/**\r
+ * An interface for events being fired when an administrator added a new user\r
+ * account.\r
+ * <p>\r
+ * @author Roland Häder<roland@mxchange.org>\r
+ */\r
+public interface ObservableAdminDeletedUserEvent extends Serializable {\r
+\r
+       /**\r
+        * Getter for deleted user instance\r
+        * <p>\r
+        * @return Deleted user instance\r
+        */\r
+       User getDeletedUser ();\r
+\r
+       /**\r
+        * Getter for user delete reason\r
+        * <p>\r
+        * @return User delete reason\r
+        */\r
+       String getUserDeleteReason ();\r
+\r
+}\r
index 14adfb43a8d08852652d7193c4ea163903cd183a..7dc5383bbb910cfe91919553dd821ebfe9c8dac1 100644 (file)
  */
 package org.mxchange.jusercore.events.user.linked;
 
-import java.io.Serializable;
+import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An interface for events being fired when an administrator linked a new user
- * account with existing contact data.
+ * An event being fired when the administrator has linked a new user account
+ * with existing contact data.
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public interface AdminLinkedUserEvent extends Serializable {
+public class AdminLinkedUserEvent implements ObservableAdminLinkedUserEvent {
 
        /**
-        * Getter for linked user instance
+        * Serial number
+        */
+       private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+       /**
+        * Linked user instance
+        */
+       private final User linkedUser;
+
+       /**
+        * Constructor with linked user instance
         * <p>
-        * @return linked user instance
+        * @param linkedUser Linked user instance
         */
-       User getLinkedUser ();
+       public AdminLinkedUserEvent (final User linkedUser) {
+               // Is the user instance valid?
+               if (null == linkedUser) {
+                       // Throw NPE
+                       throw new NullPointerException("linkedUser is null"); //NOI18N
+               } else if (linkedUser.getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("linkedUser.userId is null"); //NOI18N
+               } else if (linkedUser.getUserId() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("linkedUser.userId={0} is invalid.", linkedUser.getUserId())); //NOI18N
+               }
+
+               // Set it here
+               this.linkedUser = linkedUser;
+       }
+
+       @Override
+       public User getLinkedUser () {
+               return this.linkedUser;
+       }
 
 }
diff --git a/src/org/mxchange/jusercore/events/user/linked/AdminUserLinkedEvent.java b/src/org/mxchange/jusercore/events/user/linked/AdminUserLinkedEvent.java
deleted file mode 100644 (file)
index 8b067b9..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.events.user.linked;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event being fired when the administrator has linked a new user account
- * with existing contact data.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class AdminUserLinkedEvent implements AdminLinkedUserEvent {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 14_785_787_174_676_290L;
-
-       /**
-        * Linked user instance
-        */
-       private final User linkedUser;
-
-       /**
-        * Constructor with linked user instance
-        * <p>
-        * @param linkedUser Linked user instance
-        */
-       public AdminUserLinkedEvent (final User linkedUser) {
-               // Is the user instance valid?
-               if (null == linkedUser) {
-                       // Throw NPE
-                       throw new NullPointerException("linkedUser is null"); //NOI18N
-               } else if (linkedUser.getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("linkedUser.userId is null"); //NOI18N
-               } else if (linkedUser.getUserId() < 1) {
-                       // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("linkedUser.userId={0} is invalid.", linkedUser.getUserId())); //NOI18N
-               }
-
-               // Set it here
-               this.linkedUser = linkedUser;
-       }
-
-       @Override
-       public User getLinkedUser () {
-               return this.linkedUser;
-       }
-
-}
diff --git a/src/org/mxchange/jusercore/events/user/linked/ObservableAdminLinkedUserEvent.java b/src/org/mxchange/jusercore/events/user/linked/ObservableAdminLinkedUserEvent.java
new file mode 100644 (file)
index 0000000..bb33592
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.events.user.linked;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events being fired when an administrator linked a new user
+ * account with existing contact data.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminLinkedUserEvent extends Serializable {
+
+       /**
+        * Getter for linked user instance
+        * <p>
+        * @return linked user instance
+        */
+       User getLinkedUser ();
+
+}
index 001aaf34a8b79bdb687fbd2e63845926e4a3a238..bc21cee05125b89ae87695e68a53aa6c7e35b427 100644 (file)
  */
 package org.mxchange.jusercore.events.user.locked;
 
-import java.io.Serializable;
+import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An interface for events being fired when an administrator locked a user
- * account.
+ * An event being fired when the administrator has locked a user account.
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public interface AdminLockedUserEvent extends Serializable {
+public class AdminLockedUserEvent implements ObservableAdminLockedUserEvent {
 
        /**
-        * Getter for locked user instance
+        * Serial number
+        */
+       private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+       /**
+        * Locked user instance
+        */
+       private final User lockedUser;
+
+       /**
+        * Constructor with linked user instance
         * <p>
-        * @return locked user instance
+        * @param lockedUser Locked user instance
         */
-       User getLockedUser ();
+       public AdminLockedUserEvent (final User lockedUser) {
+               // Is the user instance valid?
+               if (null == lockedUser) {
+                       // Throw NPE
+                       throw new NullPointerException("lockedUser is null"); //NOI18N
+               } else if (lockedUser.getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("lockedUser.userId is null"); //NOI18N
+               } else if (lockedUser.getUserId() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("lockedUser.userId={0} is invalid.", lockedUser.getUserId())); //NOI18N
+               }
+
+               // Set it here
+               this.lockedUser = lockedUser;
+       }
+
+       @Override
+       public User getLockedUser () {
+               return this.lockedUser;
+       }
 
 }
diff --git a/src/org/mxchange/jusercore/events/user/locked/AdminUserLockedEvent.java b/src/org/mxchange/jusercore/events/user/locked/AdminUserLockedEvent.java
deleted file mode 100644 (file)
index 4f81edf..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.events.user.locked;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event being fired when the administrator has locked a user account.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class AdminUserLockedEvent implements AdminLockedUserEvent {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 14_785_787_174_676_290L;
-
-       /**
-        * Locked user instance
-        */
-       private final User lockedUser;
-
-       /**
-        * Constructor with linked user instance
-        * <p>
-        * @param lockedUser Locked user instance
-        */
-       public AdminUserLockedEvent (final User lockedUser) {
-               // Is the user instance valid?
-               if (null == lockedUser) {
-                       // Throw NPE
-                       throw new NullPointerException("lockedUser is null"); //NOI18N
-               } else if (lockedUser.getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("lockedUser.userId is null"); //NOI18N
-               } else if (lockedUser.getUserId() < 1) {
-                       // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("lockedUser.userId={0} is invalid.", lockedUser.getUserId())); //NOI18N
-               }
-
-               // Set it here
-               this.lockedUser = lockedUser;
-       }
-
-       @Override
-       public User getLockedUser () {
-               return this.lockedUser;
-       }
-
-}
diff --git a/src/org/mxchange/jusercore/events/user/locked/ObservableAdminLockedUserEvent.java b/src/org/mxchange/jusercore/events/user/locked/ObservableAdminLockedUserEvent.java
new file mode 100644 (file)
index 0000000..ac8bf5e
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.events.user.locked;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events being fired when an administrator locked a user
+ * account.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminLockedUserEvent extends Serializable {
+
+       /**
+        * Getter for locked user instance
+        * <p>
+        * @return locked user instance
+        */
+       User getLockedUser ();
+
+}
diff --git a/src/org/mxchange/jusercore/events/user/password_change/ObservableUpdatedUserPasswordEvent.java b/src/org/mxchange/jusercore/events/user/password_change/ObservableUpdatedUserPasswordEvent.java
new file mode 100644 (file)
index 0000000..c19a47a
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.events.user.password_change;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
+
+/**
+ * An interface for events being fired when a user updates personal data.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUpdatedUserPasswordEvent extends Serializable {
+
+       /**
+        * Getter for password history entry
+        * <p>
+        * @return Password history entry
+        */
+       PasswordHistory getPasswordHistory ();
+
+}
index 48cc588a9cf9cdb3e9d0bbf54822ca87c205e619..6213f1e2a85afaf110a13bb4b4c03033cf9806d3 100644 (file)
  */
 package org.mxchange.jusercore.events.user.password_change;
 
-import java.io.Serializable;
+import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
 
 /**
- * An interface for events being fired when a user updates personal data.
+ * An event being fired when the user has updated personal data
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public interface UpdatedUserPasswordEvent extends Serializable {
+public class UpdatedUserPasswordEvent implements ObservableUpdatedUserPasswordEvent {
 
        /**
-        * Getter for password history entry
+        * Serial number
+        */
+       private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+       /**
+        * Updated user instance
+        */
+       private final PasswordHistory passwordHistory;
+
+       /**
+        * Constructor with updated user instance
         * <p>
-        * @return Password history entry
+        * @param passwordHistory Updated user instance
         */
-       PasswordHistory getPasswordHistory ();
+       public UpdatedUserPasswordEvent (final PasswordHistory passwordHistory) {
+               // Is the user instance valid?
+               if (null == passwordHistory) {
+                       // Throw NPE
+                       throw new NullPointerException("passwordHistory is null"); //NOI18N
+               } else if (passwordHistory.getUserPasswordHistoryUser() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("passwordHistory.userPasswordHistoryUser is null"); //NOI18N
+               } else if (passwordHistory.getUserPasswordHistoryUser().getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("passwordHistory.userPasswordHistoryUser.userId is null"); //NOI18N
+               } else if (passwordHistory.getUserPasswordHistoryUser().getUserId() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("passwordHistory.userPasswordHistoryUser.userId={0} is invalid.", passwordHistory.getUserPasswordHistoryUser().getUserId())); //NOI18N
+               }
+
+               // Set it here
+               this.passwordHistory = passwordHistory;
+       }
+
+       @Override
+       public PasswordHistory getPasswordHistory () {
+               return this.passwordHistory;
+       }
 
 }
diff --git a/src/org/mxchange/jusercore/events/user/password_change/UserUpdatedPasswordEvent.java b/src/org/mxchange/jusercore/events/user/password_change/UserUpdatedPasswordEvent.java
deleted file mode 100644 (file)
index 166c76c..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.events.user.password_change;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
-
-/**
- * An event being fired when the user has updated personal data
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class UserUpdatedPasswordEvent implements UpdatedUserPasswordEvent {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 14_785_787_174_676_290L;
-
-       /**
-        * Updated user instance
-        */
-       private final PasswordHistory passwordHistory;
-
-       /**
-        * Constructor with updated user instance
-        * <p>
-        * @param passwordHistory Updated user instance
-        */
-       public UserUpdatedPasswordEvent (final PasswordHistory passwordHistory) {
-               // Is the user instance valid?
-               if (null == passwordHistory) {
-                       // Throw NPE
-                       throw new NullPointerException("passwordHistory is null"); //NOI18N
-               } else if (passwordHistory.getUserPasswordHistoryUser() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("passwordHistory.userPasswordHistoryUser is null"); //NOI18N
-               } else if (passwordHistory.getUserPasswordHistoryUser().getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("passwordHistory.userPasswordHistoryUser.userId is null"); //NOI18N
-               } else if (passwordHistory.getUserPasswordHistoryUser().getUserId() < 1) {
-                       // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("passwordHistory.userPasswordHistoryUser.userId={0} is invalid.", passwordHistory.getUserPasswordHistoryUser().getUserId())); //NOI18N
-               }
-
-               // Set it here
-               this.passwordHistory = passwordHistory;
-       }
-
-       @Override
-       public PasswordHistory getPasswordHistory () {
-               return this.passwordHistory;
-       }
-
-}
index f321d834b1d57a4ede4a5a8dcc413a18f9f309bb..81cfc880283e93e2eb1f5f0f7177de96e5d7e858 100644 (file)
  */
 package org.mxchange.jusercore.events.user.unlocked;
 
-import java.io.Serializable;
+import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An interface for events being fired when an administrator unlocked a user
- * account.
+ * An event being fired when the administrator has unlocked a user account.
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public interface AdminUnlockedUserEvent extends Serializable {
+public class AdminUnlockedUserEvent implements ObservableAdminUnlockedUserEvent {
 
        /**
-        * Getter for unlocked user instance
+        * Serial number
+        */
+       private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+       /**
+        * Unlocked user instance
+        */
+       private final User unlockedUser;
+
+       /**
+        * Constructor with linked user instance
         * <p>
-        * @return Unlocked user instance
+        * @param unlockedUser Unlocked user instance
         */
-       User getUnlockedUser ();
+       public AdminUnlockedUserEvent (final User unlockedUser) {
+               // Is the user instance valid?
+               if (null == unlockedUser) {
+                       // Throw NPE
+                       throw new NullPointerException("unlockedUser is null"); //NOI18N
+               } else if (unlockedUser.getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("unlockedUser.userId is null"); //NOI18N
+               } else if (unlockedUser.getUserId() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("unlockedUser.userId={0} is invalid.", unlockedUser.getUserId())); //NOI18N
+               }
+
+               // Set it here
+               this.unlockedUser = unlockedUser;
+       }
+
+       @Override
+       public User getUnlockedUser () {
+               return this.unlockedUser;
+       }
 
 }
diff --git a/src/org/mxchange/jusercore/events/user/unlocked/AdminUserUnlockedEvent.java b/src/org/mxchange/jusercore/events/user/unlocked/AdminUserUnlockedEvent.java
deleted file mode 100644 (file)
index 57cf3a5..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.events.user.unlocked;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event being fired when the administrator has unlocked a user account.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class AdminUserUnlockedEvent implements AdminUnlockedUserEvent {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 14_785_787_174_676_290L;
-
-       /**
-        * Unlocked user instance
-        */
-       private final User unlockedUser;
-
-       /**
-        * Constructor with linked user instance
-        * <p>
-        * @param unlockedUser Unlocked user instance
-        */
-       public AdminUserUnlockedEvent (final User unlockedUser) {
-               // Is the user instance valid?
-               if (null == unlockedUser) {
-                       // Throw NPE
-                       throw new NullPointerException("unlockedUser is null"); //NOI18N
-               } else if (unlockedUser.getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("unlockedUser.userId is null"); //NOI18N
-               } else if (unlockedUser.getUserId() < 1) {
-                       // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("unlockedUser.userId={0} is invalid.", unlockedUser.getUserId())); //NOI18N
-               }
-
-               // Set it here
-               this.unlockedUser = unlockedUser;
-       }
-
-       @Override
-       public User getUnlockedUser () {
-               return this.unlockedUser;
-       }
-
-}
diff --git a/src/org/mxchange/jusercore/events/user/unlocked/ObservableAdminUnlockedUserEvent.java b/src/org/mxchange/jusercore/events/user/unlocked/ObservableAdminUnlockedUserEvent.java
new file mode 100644 (file)
index 0000000..ecfd1f1
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.events.user.unlocked;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events being fired when an administrator unlocked a user
+ * account.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminUnlockedUserEvent extends Serializable {
+
+       /**
+        * Getter for unlocked user instance
+        * <p>
+        * @return Unlocked user instance
+        */
+       User getUnlockedUser ();
+
+}
index 0f936e1961c0f365ab188fafb3b2600bec999110..db617ad55d90a791505d89588c22a9368737d77c 100644 (file)
  */\r
 package org.mxchange.jusercore.events.user.update;\r
 \r
-import java.io.Serializable;\r
+import java.text.MessageFormat;\r
 import org.mxchange.jusercore.model.user.User;\r
 \r
 /**\r
- * An interface for events being fired when an administrator updated user data.\r
+ * An event being fired when the administrator has updated user data\r
  * <p>\r
  * @author Roland Häder<roland@mxchange.org>\r
  */\r
-public interface AdminUpdatedUserDataEvent extends Serializable {\r
+public class AdminUpdatedUserDataEvent implements ObservableAdminUpdatedUserDataEvent {\r
 \r
        /**\r
-        * Getter for updated user instance\r
+        * Serial number\r
+        */\r
+       private static final long serialVersionUID = 14_785_787_174_676_290L;\r
+\r
+       /**\r
+        * Updated user instance\r
+        */\r
+       private final User updatedUser;\r
+\r
+       /**\r
+        * Constructor with updated user instance\r
         * <p>\r
-        * @return Added user instance\r
+        * @param updatedUser Updated user instance\r
         */\r
-       User getUpdatedUser ();\r
+       public AdminUpdatedUserDataEvent (final User updatedUser) {\r
+               // Is the user instance valid?\r
+               if (null == updatedUser) {\r
+                       // Throw NPE\r
+                       throw new NullPointerException("updatedUser is null"); //NOI18N\r
+               } else if (updatedUser.getUserId() == null) {\r
+                       // Throw NPE again\r
+                       throw new NullPointerException("updatedUser.userId is null"); //NOI18N\r
+               } else if (updatedUser.getUserId() < 1) {\r
+                       // Invalid id number\r
+                       throw new IllegalArgumentException(MessageFormat.format("updatedUser.userId={0} is invalid.", updatedUser.getUserId())); //NOI18N\r
+               }\r
+\r
+               // Set it here\r
+               this.updatedUser = updatedUser;\r
+       }\r
+\r
+       @Override\r
+       public User getUpdatedUser () {\r
+               return this.updatedUser;\r
+       }\r
 \r
 }\r
diff --git a/src/org/mxchange/jusercore/events/user/update/AdminUserDataUpdatedEvent.java b/src/org/mxchange/jusercore/events/user/update/AdminUserDataUpdatedEvent.java
deleted file mode 100644 (file)
index e913ef4..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*\r
- * Copyright (C) 2016 Roland Häder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.jusercore.events.user.update;\r
-\r
-import java.text.MessageFormat;\r
-import org.mxchange.jusercore.model.user.User;\r
-\r
-/**\r
- * An event being fired when the administrator has updated user data\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-public class AdminUserDataUpdatedEvent implements AdminUpdatedUserDataEvent {\r
-\r
-       /**\r
-        * Serial number\r
-        */\r
-       private static final long serialVersionUID = 14_785_787_174_676_290L;\r
-\r
-       /**\r
-        * Updated user instance\r
-        */\r
-       private final User updatedUser;\r
-\r
-       /**\r
-        * Constructor with updated user instance\r
-        * <p>\r
-        * @param updatedUser Updated user instance\r
-        */\r
-       public AdminUserDataUpdatedEvent (final User updatedUser) {\r
-               // Is the user instance valid?\r
-               if (null == updatedUser) {\r
-                       // Throw NPE\r
-                       throw new NullPointerException("updatedUser is null"); //NOI18N\r
-               } else if (updatedUser.getUserId() == null) {\r
-                       // Throw NPE again\r
-                       throw new NullPointerException("updatedUser.userId is null"); //NOI18N\r
-               } else if (updatedUser.getUserId() < 1) {\r
-                       // Invalid id number\r
-                       throw new IllegalArgumentException(MessageFormat.format("updatedUser.userId={0} is invalid.", updatedUser.getUserId())); //NOI18N\r
-               }\r
-\r
-               // Set it here\r
-               this.updatedUser = updatedUser;\r
-       }\r
-\r
-       @Override\r
-       public User getUpdatedUser () {\r
-               return this.updatedUser;\r
-       }\r
-\r
-}\r
diff --git a/src/org/mxchange/jusercore/events/user/update/ObservableAdminUpdatedUserDataEvent.java b/src/org/mxchange/jusercore/events/user/update/ObservableAdminUpdatedUserDataEvent.java
new file mode 100644 (file)
index 0000000..6697b97
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (C) 2016 Roland Häder\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+package org.mxchange.jusercore.events.user.update;\r
+\r
+import java.io.Serializable;\r
+import org.mxchange.jusercore.model.user.User;\r
+\r
+/**\r
+ * An interface for events being fired when an administrator updated user data.\r
+ * <p>\r
+ * @author Roland Häder<roland@mxchange.org>\r
+ */\r
+public interface ObservableAdminUpdatedUserDataEvent extends Serializable {\r
+\r
+       /**\r
+        * Getter for updated user instance\r
+        * <p>\r
+        * @return Added user instance\r
+        */\r
+       User getUpdatedUser ();\r
+\r
+}\r
diff --git a/src/org/mxchange/jusercore/events/user/update/ObservableUpdatedUserPersonalDataEvent.java b/src/org/mxchange/jusercore/events/user/update/ObservableUpdatedUserPersonalDataEvent.java
new file mode 100644 (file)
index 0000000..fd2b7ad
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (C) 2016 Roland Häder\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+package org.mxchange.jusercore.events.user.update;\r
+\r
+import java.io.Serializable;\r
+import org.mxchange.jusercore.model.user.User;\r
+\r
+/**\r
+ * An interface for events being fired when a user updates personal data.\r
+ * <p>\r
+ * @author Roland Häder<roland@mxchange.org>\r
+ */\r
+public interface ObservableUpdatedUserPersonalDataEvent extends Serializable {\r
+\r
+       /**\r
+        * Getter for updated user instance\r
+        * <p>\r
+        * @return Added user instance\r
+        */\r
+       User getUpdatedUser ();\r
+\r
+}\r
index 31770fb7c2edb6a587bf6948c0d7e9d3cb6325ee..a7ea086953cb7ee01ec7694976f4638828dacf48 100644 (file)
  */\r
 package org.mxchange.jusercore.events.user.update;\r
 \r
-import java.io.Serializable;\r
+import java.text.MessageFormat;\r
 import org.mxchange.jusercore.model.user.User;\r
 \r
 /**\r
- * An interface for events being fired when a user updates personal data.\r
+ * An event being fired when the user has updated personal data\r
  * <p>\r
  * @author Roland Häder<roland@mxchange.org>\r
  */\r
-public interface UpdatedUserPersonalDataEvent extends Serializable {\r
+public class UpdatedUserPersonalDataEvent implements ObservableUpdatedUserPersonalDataEvent {\r
 \r
        /**\r
-        * Getter for updated user instance\r
+        * Serial number\r
+        */\r
+       private static final long serialVersionUID = 14_785_787_174_676_290L;\r
+\r
+       /**\r
+        * Updated user instance\r
+        */\r
+       private final User updatedUser;\r
+\r
+       /**\r
+        * Constructor with updated user instance\r
         * <p>\r
-        * @return Added user instance\r
+        * @param updatedUser Updated user instance\r
         */\r
-       User getUpdatedUser ();\r
+       public UpdatedUserPersonalDataEvent (final User updatedUser) {\r
+               // Is the user instance valid?\r
+               if (null == updatedUser) {\r
+                       // Throw NPE\r
+                       throw new NullPointerException("updatedUser is null"); //NOI18N\r
+               } else if (updatedUser.getUserId() == null) {\r
+                       // Throw NPE again\r
+                       throw new NullPointerException("updatedUser.userId is null"); //NOI18N\r
+               } else if (updatedUser.getUserId() < 1) {\r
+                       // Invalid id number\r
+                       throw new IllegalArgumentException(MessageFormat.format("updatedUser.userId={0} is invalid.", updatedUser.getUserId())); //NOI18N\r
+               }\r
+\r
+               // Set it here\r
+               this.updatedUser = updatedUser;\r
+       }\r
+\r
+       @Override\r
+       public User getUpdatedUser () {\r
+               return this.updatedUser;\r
+       }\r
 \r
 }\r
diff --git a/src/org/mxchange/jusercore/events/user/update/UserUpdatedPersonalDataEvent.java b/src/org/mxchange/jusercore/events/user/update/UserUpdatedPersonalDataEvent.java
deleted file mode 100644 (file)
index ff51c82..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*\r
- * Copyright (C) 2016 Roland Häder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.jusercore.events.user.update;\r
-\r
-import java.text.MessageFormat;\r
-import org.mxchange.jusercore.model.user.User;\r
-\r
-/**\r
- * An event being fired when the user has updated personal data\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-public class UserUpdatedPersonalDataEvent implements UpdatedUserPersonalDataEvent {\r
-\r
-       /**\r
-        * Serial number\r
-        */\r
-       private static final long serialVersionUID = 14_785_787_174_676_290L;\r
-\r
-       /**\r
-        * Updated user instance\r
-        */\r
-       private final User updatedUser;\r
-\r
-       /**\r
-        * Constructor with updated user instance\r
-        * <p>\r
-        * @param updatedUser Updated user instance\r
-        */\r
-       public UserUpdatedPersonalDataEvent (final User updatedUser) {\r
-               // Is the user instance valid?\r
-               if (null == updatedUser) {\r
-                       // Throw NPE\r
-                       throw new NullPointerException("updatedUser is null"); //NOI18N\r
-               } else if (updatedUser.getUserId() == null) {\r
-                       // Throw NPE again\r
-                       throw new NullPointerException("updatedUser.userId is null"); //NOI18N\r
-               } else if (updatedUser.getUserId() < 1) {\r
-                       // Invalid id number\r
-                       throw new IllegalArgumentException(MessageFormat.format("updatedUser.userId={0} is invalid.", updatedUser.getUserId())); //NOI18N\r
-               }\r
-\r
-               // Set it here\r
-               this.updatedUser = updatedUser;\r
-       }\r
-\r
-       @Override\r
-       public User getUpdatedUser () {\r
-               return this.updatedUser;\r
-       }\r
-\r
-}\r