]> git.mxchange.org Git - juser-login-core.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Thu, 25 Aug 2016 12:55:25 +0000 (14:55 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 25 Aug 2016 12:55:25 +0000 (14:55 +0200)
- added event when user has resend confirmation link
- tpzo fixed

src/org/mxchange/jusercore/events/confirmation/ConfirmedUserAccountEvent.java
src/org/mxchange/jusercore/events/confirmation/UserConfirmedAccountEvent.java
src/org/mxchange/jusercore/events/registration/RegisteredUserEvent.java
src/org/mxchange/jusercore/events/registration/UserRegisteredEvent.java
src/org/mxchange/jusercore/events/resendlink/ResendLinkUserAccountEvent.java [new file with mode: 0644]
src/org/mxchange/jusercore/events/resendlink/UserResendLinkAccountEvent.java [new file with mode: 0644]

index 0481159e93ce8bad863c3799a0388d651deb4e7b..0dcc07cd0f724d4c5bc48c53f5f1c07138dbc07b 100644 (file)
@@ -20,7 +20,7 @@ import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An event, fireed if a new confirmedUser has confirmed
+ * An event, fired if a new confirmedUser has confirmed
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
@@ -58,11 +58,6 @@ public class ConfirmedUserAccountEvent implements UserConfirmedAccountEvent {
                this.confirmedUser = confirmedUser;
        }
 
-       /**
-        * Getter for confirmedUser instance
-        * <p>
-        * @return User instance
-        */
        @Override
        public User getConfirmedUser () {
                return this.confirmedUser;
index 1bbea50ebce879eb2ab3cf4f54f7406f57da76aa..c66bd6b7705ac67bcf4039ae4b5c1339f1e1cf10 100644 (file)
@@ -20,7 +20,7 @@ import java.io.Serializable;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An event interface, fireed if a new user has registered
+ * An event interface, fired if a new user has registered
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
index 85ae4739090c602d6e999657659fe2a1b63f32c0..d825aaaecc12642250b5f98daf25c65943262663 100644 (file)
@@ -20,7 +20,7 @@ import java.text.MessageFormat;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An event, fireed if a new registeredUser has registered
+ * An event, fired if a new registeredUser has registered
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
index ee1ecbed9b082e35d64f758637e295f198a3f0c1..f47856f47081c509e4600e6964704fa0500652f9 100644 (file)
@@ -20,7 +20,7 @@ import java.io.Serializable;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * An event interface, fireed if a new user has registered
+ * An event interface, fired if a new user has registered
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
diff --git a/src/org/mxchange/jusercore/events/resendlink/ResendLinkUserAccountEvent.java b/src/org/mxchange/jusercore/events/resendlink/ResendLinkUserAccountEvent.java
new file mode 100644 (file)
index 0000000..3f2505b
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.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 Haeder<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;
+       }
+
+}
diff --git a/src/org/mxchange/jusercore/events/resendlink/UserResendLinkAccountEvent.java b/src/org/mxchange/jusercore/events/resendlink/UserResendLinkAccountEvent.java
new file mode 100644 (file)
index 0000000..3b9b85e
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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.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 Haeder<roland@mxchange.org>
+ */
+public interface UserResendLinkAccountEvent extends Serializable {
+
+       /**
+        * Getter for user instance
+        * <p>
+        * @return User instance
+        */
+       User getResendLinkUser ();
+
+}