--- /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.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 Haeder<roland@mxchange.org>
+ */
+public interface AdminLinkedUserEvent extends Serializable {
+
+ /**
+ * Getter for linked user instance
+ * <p>
+ * @return linked user instance
+ */
+ User getLinkedUser ();
+
+}
--- /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.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 Haeder<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;
+ }
+
+}