-/*\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
- * @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
+/*
+ * 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.text.MessageFormat;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event being fired when the administrator has added a new user account
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public class AdminUserAddedEvent implements AdminAddedUserEvent {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+ /**
+ * Added user instance
+ */
+ private final User addedUser;
+
+ /**
+ * Constructor with added user instance
+ * @param addedUser Added user instance
+ */
+ public AdminUserAddedEvent (final User addedUser) {
+ // Is the user instance valid?
+ if (null == addedUser) {
+ // Throw NPE
+ throw new NullPointerException("addedUser is null"); //NOI18N
+ } else if (addedUser.getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("addedUser.userId is null"); //NOI18N
+ } else if (addedUser.getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("addedUser.userId={0} is invalid.", addedUser.getUserId())); //NOI18N
+ }
+
+ // Set it here
+ this.addedUser = addedUser;
+ }
+
+ @Override
+ public User getAddedUser () {
+ return this.addedUser;
+ }
+
+}