-/*\r
- * Copyright (C) 2016, 2017 Roland Häder\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 Häder<roland@mxchange.org>\r
- */\r
-public class AdminAddedUserEvent implements ObservableAdminAddedUserEvent {\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 AdminAddedUserEvent (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, 2017 Roland Häder
+ *
+ * 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.add;
+
+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 Häder<roland@mxchange.org>
+ */
+public class AdminAddedUserEvent implements ObservableAdminAddedUserEvent {
+
+ /**
+ * 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
+ * <p>
+ * @param addedUser Added user instance
+ */
+ public AdminAddedUserEvent (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;
+ }
+
+}
-/*\r
- * Copyright (C) 2016, 2017 Roland Häder\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 Häder<roland@mxchange.org>\r
- */\r
-public interface ObservableAdminAddedUserEvent extends Serializable {\r
-\r
- /**\r
- * Getter for added user instance\r
- * <p>\r
- * @return Added user instance\r
- */\r
- User getAddedUser ();\r
-\r
-}\r
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.add;
+
+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 Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminAddedUserEvent extends Serializable {
+
+ /**
+ * Getter for added user instance
+ * <p>
+ * @return Added user instance
+ */
+ User getAddedUser ();
+
+}
-/*\r
- * Copyright (C) 2016, 2017 Roland Häder\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.delete;\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 deleted a user account\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-public class AdminDeletedUserEvent implements ObservableAdminDeletedUserEvent {\r
-\r
- /**\r
- * Serial number\r
- */\r
- private static final long serialVersionUID = 14_785_787_174_676_290L;\r
-\r
- /**\r
- * Deleted user instance\r
- */\r
- private final User deletedUser;\r
-\r
- /**\r
- * Delete reason\r
- */\r
- private final String userDeleteReason;\r
-\r
- /**\r
- * Constructor with deleted user instance\r
- * <p>\r
- * @param deletedUser Deleted user instance\r
- * @param userDeleteReason Delete reason\r
- */\r
- public AdminDeletedUserEvent (final User deletedUser, final String userDeleteReason) {\r
- // Is the user instance valid?\r
- if (null == deletedUser) {\r
- // Throw NPE\r
- throw new NullPointerException("deletedUser is null"); //NOI18N\r
- } else if (deletedUser.getUserId() == null) {\r
- // Throw NPE again\r
- throw new NullPointerException("deletedUser.userId is null"); //NOI18N\r
- } else if (deletedUser.getUserId() < 1) {\r
- // Invalid id number\r
- throw new IllegalArgumentException(MessageFormat.format("deletedUser.userId={0} is invalid.", deletedUser.getUserId())); //NOI18N\r
- }\r
-\r
- // Set it here\r
- this.deletedUser = deletedUser;\r
- this.userDeleteReason = userDeleteReason;\r
- }\r
-\r
- @Override\r
- public User getDeletedUser () {\r
- return this.deletedUser;\r
- }\r
-\r
- @Override\r
- public String getUserDeleteReason () {\r
- return this.userDeleteReason;\r
- }\r
-\r
-}\r
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.delete;
+
+import java.text.MessageFormat;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event being fired when the administrator has deleted a user account
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class AdminDeletedUserEvent implements ObservableAdminDeletedUserEvent {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+ /**
+ * Deleted user instance
+ */
+ private final User deletedUser;
+
+ /**
+ * Delete reason
+ */
+ private final String userDeleteReason;
+
+ /**
+ * Constructor with deleted user instance
+ * <p>
+ * @param deletedUser Deleted user instance
+ * @param userDeleteReason Delete reason
+ */
+ public AdminDeletedUserEvent (final User deletedUser, final String userDeleteReason) {
+ // Is the user instance valid?
+ if (null == deletedUser) {
+ // Throw NPE
+ throw new NullPointerException("deletedUser is null"); //NOI18N
+ } else if (deletedUser.getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("deletedUser.userId is null"); //NOI18N
+ } else if (deletedUser.getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("deletedUser.userId={0} is invalid.", deletedUser.getUserId())); //NOI18N
+ }
+
+ // Set it here
+ this.deletedUser = deletedUser;
+ this.userDeleteReason = userDeleteReason;
+ }
+
+ @Override
+ public User getDeletedUser () {
+ return this.deletedUser;
+ }
+
+ @Override
+ public String getUserDeleteReason () {
+ return this.userDeleteReason;
+ }
+
+}
-/*\r
- * Copyright (C) 2016, 2017 Roland Häder\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.delete;\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 Häder<roland@mxchange.org>\r
- */\r
-public interface ObservableAdminDeletedUserEvent extends Serializable {\r
-\r
- /**\r
- * Getter for deleted user instance\r
- * <p>\r
- * @return Deleted user instance\r
- */\r
- User getDeletedUser ();\r
-\r
- /**\r
- * Getter for user delete reason\r
- * <p>\r
- * @return User delete reason\r
- */\r
- String getUserDeleteReason ();\r
-\r
-}\r
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.delete;
+
+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 Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminDeletedUserEvent extends Serializable {
+
+ /**
+ * Getter for deleted user instance
+ * <p>
+ * @return Deleted user instance
+ */
+ User getDeletedUser ();
+
+ /**
+ * Getter for user delete reason
+ * <p>
+ * @return User delete reason
+ */
+ String getUserDeleteReason ();
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2017 Roland Häder
+ *
+ * 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.helper.created;
+
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event being fired when a bean helper has successfully created a user
+ * instance. This may happen when a user profile was called.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class HelperCreatedUserEvent implements ObservableHelperCreatedUserEvent {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 24_138_056_876_716_451L;
+
+ /**
+ * User instance being created
+ */
+ private final User createdUser;
+
+ /**
+ * Constructor with user instance
+ * <p>
+ * @param createdUser User instance being created by helper
+ */
+ public HelperCreatedUserEvent (final User createdUser) {
+ // Set user instance
+ this.createdUser = createdUser;
+ }
+
+ @Override
+ public User getCreatedUser () {
+ return this.createdUser;
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2017 Roland Haeder<roland@mxchange.org>
+ *
+ * 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.helper.created;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for observable events being fired when a user instance was
+ * successfully created in a bean helper.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface ObservableHelperCreatedUserEvent extends Serializable {
+
+ /**
+ * Getter for created user instance
+ * <p>
+ * @return Created user instance
+ */
+ User getCreatedUser ();
+
+}
-/*\r
- * Copyright (C) 2016, 2017 Roland Häder\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 Häder<roland@mxchange.org>\r
- */\r
-public class AdminUpdatedUserDataEvent implements ObservableAdminUpdatedUserDataEvent {\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 AdminUpdatedUserDataEvent (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
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.update;
+
+import java.text.MessageFormat;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event being fired when the administrator has updated user data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class AdminUpdatedUserDataEvent implements ObservableAdminUpdatedUserDataEvent {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+ /**
+ * Updated user instance
+ */
+ private final User updatedUser;
+
+ /**
+ * Constructor with updated user instance
+ * <p>
+ * @param updatedUser Updated user instance
+ */
+ public AdminUpdatedUserDataEvent (final User updatedUser) {
+ // Is the user instance valid?
+ if (null == updatedUser) {
+ // Throw NPE
+ throw new NullPointerException("updatedUser is null"); //NOI18N
+ } else if (updatedUser.getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("updatedUser.userId is null"); //NOI18N
+ } else if (updatedUser.getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("updatedUser.userId={0} is invalid.", updatedUser.getUserId())); //NOI18N
+ }
+
+ // Set it here
+ this.updatedUser = updatedUser;
+ }
+
+ @Override
+ public User getUpdatedUser () {
+ return this.updatedUser;
+ }
+
+}
-/*\r
- * Copyright (C) 2016, 2017 Roland Häder\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 Häder<roland@mxchange.org>\r
- */\r
-public interface ObservableAdminUpdatedUserDataEvent extends Serializable {\r
-\r
- /**\r
- * Getter for updated user instance\r
- * <p>\r
- * @return Added user instance\r
- */\r
- User getUpdatedUser ();\r
-\r
-}\r
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.update;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events being fired when an administrator updated user data.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminUpdatedUserDataEvent extends Serializable {
+
+ /**
+ * Getter for updated user instance
+ * <p>
+ * @return Added user instance
+ */
+ User getUpdatedUser ();
+
+}
-/*\r
- * Copyright (C) 2016, 2017 Roland Häder\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 a user updates personal data.\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-public interface ObservableUpdatedUserPersonalDataEvent extends Serializable {\r
-\r
- /**\r
- * Getter for updated user instance\r
- * <p>\r
- * @return Added user instance\r
- */\r
- User getUpdatedUser ();\r
-\r
-}\r
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.update;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events being fired when a user updates personal data.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUpdatedUserPersonalDataEvent extends Serializable {
+
+ /**
+ * Getter for updated user instance
+ * <p>
+ * @return Updated user instance
+ */
+ User getUpdatedUser ();
+
+}
-/*\r
- * Copyright (C) 2016, 2017 Roland Häder\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 user has updated personal data\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-public class UpdatedUserPersonalDataEvent implements ObservableUpdatedUserPersonalDataEvent {\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 UpdatedUserPersonalDataEvent (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
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.update;
+
+import java.text.MessageFormat;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event being fired when the user has updated personal data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class UpdatedUserPersonalDataEvent implements ObservableUpdatedUserPersonalDataEvent {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+ /**
+ * Updated user instance
+ */
+ private final User updatedUser;
+
+ /**
+ * Constructor with updated user instance
+ * <p>
+ * @param updatedUser Updated user instance
+ */
+ public UpdatedUserPersonalDataEvent (final User updatedUser) {
+ // Is the user instance valid?
+ if (null == updatedUser) {
+ // Throw NPE
+ throw new NullPointerException("updatedUser is null"); //NOI18N
+ } else if (updatedUser.getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("updatedUser.userId is null"); //NOI18N
+ } else if (updatedUser.getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("updatedUser.userId={0} is invalid.", updatedUser.getUserId())); //NOI18N
+ }
+
+ // Set it here
+ this.updatedUser = updatedUser;
+ }
+
+ @Override
+ public User getUpdatedUser () {
+ return this.updatedUser;
+ }
+
+}