--- /dev/null
+/*
+ * 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.confirmation;
+
+import java.text.MessageFormat;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event, fireed if a new confirmedUser has confirmed
+ * <p>
+ * @author Roland Haeder<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;
+ }
+
+ /**
+ * Getter for confirmedUser instance
+ * <p>
+ * @return User instance
+ */
+ @Override
+ public User getConfirmedUser () {
+ return this.confirmedUser;
+ }
+
+}
--- /dev/null
+/*
+ * 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.confirmation;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event interface, fireed if a new user has registered
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface UserConfirmedAccountEvent extends Serializable {
+
+ /**
+ * Getter for user instance
+ * <p>
+ * @return User instance
+ */
+ User getConfirmedUser ();
+
+}