]> git.mxchange.org Git - juser-activity-core.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Thu, 21 Apr 2016 09:42:05 +0000 (11:42 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 21 Apr 2016 09:42:05 +0000 (11:42 +0200)
- moved "add-user" event to sub-package
- added event when an administrator updated user data

src/org/mxchange/jusercore/events/user/AdminAddedUserEvent.java [deleted file]
src/org/mxchange/jusercore/events/user/AdminUserAddedEvent.java [deleted file]
src/org/mxchange/jusercore/events/user/add/AdminAddedUserEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/add/AdminUserAddedEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/update/AdminUpdatedUserDataEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/user/update/AdminUserDataUpdatedEvent.java [new file with mode: 0644]

diff --git a/src/org/mxchange/jusercore/events/user/AdminAddedUserEvent.java b/src/org/mxchange/jusercore/events/user/AdminAddedUserEvent.java
deleted file mode 100644 (file)
index 49cc25e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * 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;
-
-import java.io.Serializable;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An interface for events being fired when an administrator added a new user
- * account.
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface AdminAddedUserEvent extends Serializable {
-
-       /**
-        * Getter for added user instance
-        * <p>
-        * @return Added user instance
-        */
-       User getAddedUser ();
-
-}
diff --git a/src/org/mxchange/jusercore/events/user/AdminUserAddedEvent.java b/src/org/mxchange/jusercore/events/user/AdminUserAddedEvent.java
deleted file mode 100644 (file)
index a4d1fdd..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*\r
- * Copyright (C) 2016 Roland Haeder\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;\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 Haeder<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/AdminAddedUserEvent.java b/src/org/mxchange/jusercore/events/user/add/AdminAddedUserEvent.java
new file mode 100644 (file)
index 0000000..f1b8173
--- /dev/null
@@ -0,0 +1,37 @@
+/*\r
+ * Copyright (C) 2016 Roland Haeder\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 Haeder<roland@mxchange.org>\r
+ */\r
+public interface AdminAddedUserEvent extends Serializable {\r
+\r
+       /**\r
+        * Getter for added user instance\r
+        * <p>\r
+        * @return Added user instance\r
+        */\r
+       User getAddedUser ();\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
new file mode 100644 (file)
index 0000000..8889084
--- /dev/null
@@ -0,0 +1,66 @@
+/*\r
+ * Copyright (C) 2016 Roland Haeder\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 Haeder<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/update/AdminUpdatedUserDataEvent.java b/src/org/mxchange/jusercore/events/user/update/AdminUpdatedUserDataEvent.java
new file mode 100644 (file)
index 0000000..b1d675b
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (C) 2016 Roland Haeder\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 Haeder<roland@mxchange.org>\r
+ */\r
+public interface AdminUpdatedUserDataEvent extends Serializable {\r
+\r
+       /**\r
+        * Getter for added 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/AdminUserDataUpdatedEvent.java b/src/org/mxchange/jusercore/events/user/update/AdminUserDataUpdatedEvent.java
new file mode 100644 (file)
index 0000000..4a9fda3
--- /dev/null
@@ -0,0 +1,66 @@
+/*\r
+ * Copyright (C) 2016 Roland Haeder\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 Haeder<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