+++ /dev/null
-/*
- * Copyright (C) 2016 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.confirmation;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event, fired if a new confirmedUser has confirmed
- * <p>
- * @author Roland Häder<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;
- }
-
- @Override
- public User getConfirmedUser () {
- return this.confirmedUser;
- }
-
-}
--- /dev/null
+/*
+ * Copyright (C) 2016 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.confirmation;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event interface, fired if a new user has registered
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUserConfirmedAccountEvent extends Serializable {
+
+ /**
+ * Getter for user instance
+ * <p>
+ * @return User instance
+ */
+ User getConfirmedUser ();
+
+}
*/
package org.mxchange.jusercore.events.confirmation;
-import java.io.Serializable;
+import java.text.MessageFormat;
import org.mxchange.jusercore.model.user.User;
/**
- * An event interface, fired if a new user has registered
+ * An event, fired if a new confirmedUser has confirmed
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface UserConfirmedAccountEvent extends Serializable {
+public class UserConfirmedAccountEvent implements ObservableUserConfirmedAccountEvent {
/**
- * Getter for user instance
+ * 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>
- * @return User instance
+ * @param confirmedUser Newly confirmed confirmedUser
*/
- User getConfirmedUser ();
+ public UserConfirmedAccountEvent (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;
+ }
+
+ @Override
+ public User getConfirmedUser () {
+ return this.confirmedUser;
+ }
}
--- /dev/null
+/*
+ * Copyright (C) 2016 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.login;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events after the user has logged in
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUserLoggedInEvent extends Serializable {
+
+ /**
+ * Getter for user instance
+ * <p>
+ * @return User instance
+ */
+ User getLoggedInUser ();
+
+}
*/
package org.mxchange.jusercore.events.login;
-import java.io.Serializable;
+import java.text.MessageFormat;
import org.mxchange.jusercore.model.user.User;
/**
- * An interface for events after the user has logged in
+ * This event is fired when the loggedInUser has logged in
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface UserLoggedInEvent extends Serializable {
+public class UserLoggedInEvent implements ObservableUserLoggedInEvent {
/**
- * Getter for user instance
+ * Serial number
+ */
+ private static final long serialVersionUID = 163_294_958_817_560L;
+
+ /**
+ * User instance
+ */
+ private final User loggedInUser;
+
+ /**
+ * Constructor with updated user instance
* <p>
- * @return User instance
+ * @param loggedInUser Updated user instance
*/
- User getLoggedInUser ();
+ public UserLoggedInEvent (final User loggedInUser) {
+ // Is the logged-in user instance valid?
+ if (null == loggedInUser) {
+ // Throw NPE
+ throw new NullPointerException("loggedInUser is null"); //NOI18N
+ } else if (loggedInUser.getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("loggedInUser.userId is null"); //NOI18N
+ } else if (loggedInUser.getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("loggedInUser.userId={0} is invalid.", loggedInUser.getUserId())); //NOI18N
+ }
+
+ // Set loggedInUser
+ this.loggedInUser = loggedInUser;
+ }
+
+ @Override
+ public User getLoggedInUser () {
+ return this.loggedInUser;
+ }
}
+++ /dev/null
-/*
- * Copyright (C) 2016 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.login;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * This event is fired when the loggedInUser has logged in
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class UserLoginEvent implements UserLoggedInEvent {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 163_294_958_817_560L;
-
- /**
- * User instance
- */
- private final User loggedInUser;
-
- /**
- * Constructor with updated user instance
- * <p>
- * @param loggedInUser Updated user instance
- */
- public UserLoginEvent (final User loggedInUser) {
- // Is the logged-in user instance valid?
- if (null == loggedInUser) {
- // Throw NPE
- throw new NullPointerException("loggedInUser is null"); //NOI18N
- } else if (loggedInUser.getUserId() == null) {
- // Throw NPE again
- throw new NullPointerException("loggedInUser.userId is null"); //NOI18N
- } else if (loggedInUser.getUserId() < 1) {
- // Invalid id number
- throw new IllegalArgumentException(MessageFormat.format("loggedInUser.userId={0} is invalid.", loggedInUser.getUserId())); //NOI18N
- }
-
- // Set loggedInUser
- this.loggedInUser = loggedInUser;
- }
-
- @Override
- public User getLoggedInUser () {
- return this.loggedInUser;
- }
-
-}
--- /dev/null
+/*
+ * Copyright (C) 2016 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.logout;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events after the user has logged in
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUserLogoutEvent extends Serializable {
+
+ /**
+ * Getter for user instance
+ * <p>
+ * @return User instance
+ */
+ User getLoggedOutUser ();
+
+}
+++ /dev/null
-/*
- * Copyright (C) 2016 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.logout;
-
-import java.io.Serializable;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An interface for events after the user has logged in
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface ObserveableUserLogoutEvent extends Serializable {
-
- /**
- * Getter for user instance
- * <p>
- * @return User instance
- */
- User getLoggedOutUser ();
-
-}
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public class UserLogoutEvent implements ObserveableUserLogoutEvent {
+public class UserLogoutEvent implements ObservableUserLogoutEvent {
/**
* Serial number
--- /dev/null
+/*
+ * Copyright (C) 2016 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.registration;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An event interface, fired if a new user has registered
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUserRegisteredEvent extends Serializable {
+
+ /**
+ * Getter for user instance
+ * <p>
+ * @return User instance
+ */
+ User getRegisteredUser ();
+
+}
+++ /dev/null
-/*
- * Copyright (C) 2016 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.registration;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event, fired if a new registeredUser has registered
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class RegisteredUserEvent implements UserRegisteredEvent {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 186_956_974_127_691L;
-
- /**
- * Newly registered registeredUser;
- */
- private final User registeredUser;
-
- /**
- * Constructor with newly registered registeredUser
- * <p>
- * @param registeredUser Newly registered registeredUser
- */
- public RegisteredUserEvent (final User registeredUser) {
- // Is the registered user instance valid?
- if (null == registeredUser) {
- // Throw NPE
- throw new NullPointerException("registeredUser is null"); //NOI18N
- } else if (registeredUser.getUserId() == null) {
- // Throw NPE again
- throw new NullPointerException("registeredUser.userId is null"); //NOI18N
- } else if (registeredUser.getUserId() < 1) {
- // Invalid id number
- throw new IllegalArgumentException(MessageFormat.format("registeredUser.userId={0} is invalid.", registeredUser.getUserId())); //NOI18N
- }
-
- // Set it here
- this.registeredUser = registeredUser;
- }
-
- /**
- * Getter for registeredUser instance
- * <p>
- * @return User instance
- */
- @Override
- public User getRegisteredUser () {
- return this.registeredUser;
- }
-
-}
*/
package org.mxchange.jusercore.events.registration;
-import java.io.Serializable;
+import java.text.MessageFormat;
import org.mxchange.jusercore.model.user.User;
/**
- * An event interface, fired if a new user has registered
+ * An event, fired if a new registeredUser has registered
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface UserRegisteredEvent extends Serializable {
+public class UserRegisteredEvent implements ObservableUserRegisteredEvent {
/**
- * Getter for user instance
+ * Serial number
+ */
+ private static final long serialVersionUID = 186_956_974_127_691L;
+
+ /**
+ * Newly registered registeredUser;
+ */
+ private final User registeredUser;
+
+ /**
+ * Constructor with newly registered registeredUser
+ * <p>
+ * @param registeredUser Newly registered registeredUser
+ */
+ public UserRegisteredEvent (final User registeredUser) {
+ // Is the registered user instance valid?
+ if (null == registeredUser) {
+ // Throw NPE
+ throw new NullPointerException("registeredUser is null"); //NOI18N
+ } else if (registeredUser.getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("registeredUser.userId is null"); //NOI18N
+ } else if (registeredUser.getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("registeredUser.userId={0} is invalid.", registeredUser.getUserId())); //NOI18N
+ }
+
+ // Set it here
+ this.registeredUser = registeredUser;
+ }
+
+ /**
+ * Getter for registeredUser instance
* <p>
* @return User instance
*/
- User getRegisteredUser ();
+ @Override
+ public User getRegisteredUser () {
+ return this.registeredUser;
+ }
}
--- /dev/null
+/*
+ * Copyright (C) 2016 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.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 Häder<roland@mxchange.org>
+ */
+public interface ObservableUserResendLinkAccountEvent extends Serializable {
+
+ /**
+ * Getter for user instance
+ * <p>
+ * @return User instance
+ */
+ User getResendLinkUser ();
+
+}
+++ /dev/null
-/*
- * Copyright (C) 2016 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.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 Häder<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;
- }
-
-}
*/
package org.mxchange.jusercore.events.resendlink;
-import java.io.Serializable;
+import java.text.MessageFormat;
import org.mxchange.jusercore.model.user.User;
/**
- * An event interface, fired if a user has resend confirmation link
+ * An event, fired if a user has resend confirmation link
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface UserResendLinkAccountEvent extends Serializable {
+public class UserResendLinkAccountEvent implements ObservableUserResendLinkAccountEvent {
/**
- * Getter for user instance
+ * 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>
- * @return User instance
+ * @param resendLinkUser User resend confirmation link
*/
- User getResendLinkUser ();
+ public UserResendLinkAccountEvent (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;
+ }
}
*/\r
package org.mxchange.jusercore.events.user.add;\r
\r
-import java.io.Serializable;\r
+import java.text.MessageFormat;\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
+ * 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 interface AdminAddedUserEvent extends Serializable {\r
+public class AdminAddedUserEvent implements ObservableAdminAddedUserEvent {\r
\r
/**\r
- * Getter for added user instance\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
- * @return Added user instance\r
+ * @param addedUser Added user instance\r
*/\r
- User getAddedUser ();\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
+++ /dev/null
-/*\r
- * Copyright (C) 2016 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 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
- * <p>\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
--- /dev/null
+/*\r
+ * Copyright (C) 2016 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
*/\r
package org.mxchange.jusercore.events.user.delete;\r
\r
-import java.io.Serializable;\r
+import java.text.MessageFormat;\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
+ * 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 interface AdminDeletedUserEvent extends Serializable {\r
+public class AdminDeletedUserEvent implements ObservableAdminDeletedUserEvent {\r
\r
/**\r
- * Getter for deleted user instance\r
- * <p>\r
- * @return Deleted user instance\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
- User getDeletedUser ();\r
+ private final String userDeleteReason;\r
\r
/**\r
- * Getter for user delete reason\r
+ * Constructor with deleted user instance\r
* <p>\r
- * @return User delete reason\r
+ * @param deletedUser Deleted user instance\r
+ * @param userDeleteReason Delete reason\r
*/\r
- String getUserDeleteReason ();\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
+++ /dev/null
-/*\r
- * Copyright (C) 2016 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 AdminUserDeletedEvent implements AdminDeletedUserEvent {\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 AdminUserDeletedEvent (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
--- /dev/null
+/*\r
+ * Copyright (C) 2016 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
*/
package org.mxchange.jusercore.events.user.linked;
-import java.io.Serializable;
+import java.text.MessageFormat;
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.
+ * An event being fired when the administrator has linked a new user account
+ * with existing contact data.
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminLinkedUserEvent extends Serializable {
+public class AdminLinkedUserEvent implements ObservableAdminLinkedUserEvent {
/**
- * Getter for linked user instance
+ * 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>
- * @return linked user instance
+ * @param linkedUser Linked user instance
*/
- User getLinkedUser ();
+ public AdminLinkedUserEvent (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;
+ }
}
+++ /dev/null
-/*
- * Copyright (C) 2016 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.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 Häder<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;
- }
-
-}
--- /dev/null
+/*
+ * Copyright (C) 2016 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.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 Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminLinkedUserEvent extends Serializable {
+
+ /**
+ * Getter for linked user instance
+ * <p>
+ * @return linked user instance
+ */
+ User getLinkedUser ();
+
+}
*/
package org.mxchange.jusercore.events.user.locked;
-import java.io.Serializable;
+import java.text.MessageFormat;
import org.mxchange.jusercore.model.user.User;
/**
- * An interface for events being fired when an administrator locked a user
- * account.
+ * An event being fired when the administrator has locked a user account.
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminLockedUserEvent extends Serializable {
+public class AdminLockedUserEvent implements ObservableAdminLockedUserEvent {
/**
- * Getter for locked user instance
+ * Serial number
+ */
+ private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+ /**
+ * Locked user instance
+ */
+ private final User lockedUser;
+
+ /**
+ * Constructor with linked user instance
* <p>
- * @return locked user instance
+ * @param lockedUser Locked user instance
*/
- User getLockedUser ();
+ public AdminLockedUserEvent (final User lockedUser) {
+ // Is the user instance valid?
+ if (null == lockedUser) {
+ // Throw NPE
+ throw new NullPointerException("lockedUser is null"); //NOI18N
+ } else if (lockedUser.getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("lockedUser.userId is null"); //NOI18N
+ } else if (lockedUser.getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("lockedUser.userId={0} is invalid.", lockedUser.getUserId())); //NOI18N
+ }
+
+ // Set it here
+ this.lockedUser = lockedUser;
+ }
+
+ @Override
+ public User getLockedUser () {
+ return this.lockedUser;
+ }
}
+++ /dev/null
-/*
- * Copyright (C) 2016 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.locked;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event being fired when the administrator has locked a user account.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class AdminUserLockedEvent implements AdminLockedUserEvent {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 14_785_787_174_676_290L;
-
- /**
- * Locked user instance
- */
- private final User lockedUser;
-
- /**
- * Constructor with linked user instance
- * <p>
- * @param lockedUser Locked user instance
- */
- public AdminUserLockedEvent (final User lockedUser) {
- // Is the user instance valid?
- if (null == lockedUser) {
- // Throw NPE
- throw new NullPointerException("lockedUser is null"); //NOI18N
- } else if (lockedUser.getUserId() == null) {
- // Throw NPE again
- throw new NullPointerException("lockedUser.userId is null"); //NOI18N
- } else if (lockedUser.getUserId() < 1) {
- // Invalid id number
- throw new IllegalArgumentException(MessageFormat.format("lockedUser.userId={0} is invalid.", lockedUser.getUserId())); //NOI18N
- }
-
- // Set it here
- this.lockedUser = lockedUser;
- }
-
- @Override
- public User getLockedUser () {
- return this.lockedUser;
- }
-
-}
--- /dev/null
+/*
+ * Copyright (C) 2016 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.locked;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events being fired when an administrator locked a user
+ * account.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminLockedUserEvent extends Serializable {
+
+ /**
+ * Getter for locked user instance
+ * <p>
+ * @return locked user instance
+ */
+ User getLockedUser ();
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2016 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.password_change;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
+
+/**
+ * An interface for events being fired when a user updates personal data.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableUpdatedUserPasswordEvent extends Serializable {
+
+ /**
+ * Getter for password history entry
+ * <p>
+ * @return Password history entry
+ */
+ PasswordHistory getPasswordHistory ();
+
+}
*/
package org.mxchange.jusercore.events.user.password_change;
-import java.io.Serializable;
+import java.text.MessageFormat;
import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
/**
- * An interface for events being fired when a user updates personal data.
+ * An event being fired when the user has updated personal data
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface UpdatedUserPasswordEvent extends Serializable {
+public class UpdatedUserPasswordEvent implements ObservableUpdatedUserPasswordEvent {
/**
- * Getter for password history entry
+ * Serial number
+ */
+ private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+ /**
+ * Updated user instance
+ */
+ private final PasswordHistory passwordHistory;
+
+ /**
+ * Constructor with updated user instance
* <p>
- * @return Password history entry
+ * @param passwordHistory Updated user instance
*/
- PasswordHistory getPasswordHistory ();
+ public UpdatedUserPasswordEvent (final PasswordHistory passwordHistory) {
+ // Is the user instance valid?
+ if (null == passwordHistory) {
+ // Throw NPE
+ throw new NullPointerException("passwordHistory is null"); //NOI18N
+ } else if (passwordHistory.getUserPasswordHistoryUser() == null) {
+ // Throw NPE again
+ throw new NullPointerException("passwordHistory.userPasswordHistoryUser is null"); //NOI18N
+ } else if (passwordHistory.getUserPasswordHistoryUser().getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("passwordHistory.userPasswordHistoryUser.userId is null"); //NOI18N
+ } else if (passwordHistory.getUserPasswordHistoryUser().getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("passwordHistory.userPasswordHistoryUser.userId={0} is invalid.", passwordHistory.getUserPasswordHistoryUser().getUserId())); //NOI18N
+ }
+
+ // Set it here
+ this.passwordHistory = passwordHistory;
+ }
+
+ @Override
+ public PasswordHistory getPasswordHistory () {
+ return this.passwordHistory;
+ }
}
+++ /dev/null
-/*
- * Copyright (C) 2016 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.password_change;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
-
-/**
- * An event being fired when the user has updated personal data
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class UserUpdatedPasswordEvent implements UpdatedUserPasswordEvent {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 14_785_787_174_676_290L;
-
- /**
- * Updated user instance
- */
- private final PasswordHistory passwordHistory;
-
- /**
- * Constructor with updated user instance
- * <p>
- * @param passwordHistory Updated user instance
- */
- public UserUpdatedPasswordEvent (final PasswordHistory passwordHistory) {
- // Is the user instance valid?
- if (null == passwordHistory) {
- // Throw NPE
- throw new NullPointerException("passwordHistory is null"); //NOI18N
- } else if (passwordHistory.getUserPasswordHistoryUser() == null) {
- // Throw NPE again
- throw new NullPointerException("passwordHistory.userPasswordHistoryUser is null"); //NOI18N
- } else if (passwordHistory.getUserPasswordHistoryUser().getUserId() == null) {
- // Throw NPE again
- throw new NullPointerException("passwordHistory.userPasswordHistoryUser.userId is null"); //NOI18N
- } else if (passwordHistory.getUserPasswordHistoryUser().getUserId() < 1) {
- // Invalid id number
- throw new IllegalArgumentException(MessageFormat.format("passwordHistory.userPasswordHistoryUser.userId={0} is invalid.", passwordHistory.getUserPasswordHistoryUser().getUserId())); //NOI18N
- }
-
- // Set it here
- this.passwordHistory = passwordHistory;
- }
-
- @Override
- public PasswordHistory getPasswordHistory () {
- return this.passwordHistory;
- }
-
-}
*/
package org.mxchange.jusercore.events.user.unlocked;
-import java.io.Serializable;
+import java.text.MessageFormat;
import org.mxchange.jusercore.model.user.User;
/**
- * An interface for events being fired when an administrator unlocked a user
- * account.
+ * An event being fired when the administrator has unlocked a user account.
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminUnlockedUserEvent extends Serializable {
+public class AdminUnlockedUserEvent implements ObservableAdminUnlockedUserEvent {
/**
- * Getter for unlocked user instance
+ * Serial number
+ */
+ private static final long serialVersionUID = 14_785_787_174_676_290L;
+
+ /**
+ * Unlocked user instance
+ */
+ private final User unlockedUser;
+
+ /**
+ * Constructor with linked user instance
* <p>
- * @return Unlocked user instance
+ * @param unlockedUser Unlocked user instance
*/
- User getUnlockedUser ();
+ public AdminUnlockedUserEvent (final User unlockedUser) {
+ // Is the user instance valid?
+ if (null == unlockedUser) {
+ // Throw NPE
+ throw new NullPointerException("unlockedUser is null"); //NOI18N
+ } else if (unlockedUser.getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("unlockedUser.userId is null"); //NOI18N
+ } else if (unlockedUser.getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("unlockedUser.userId={0} is invalid.", unlockedUser.getUserId())); //NOI18N
+ }
+
+ // Set it here
+ this.unlockedUser = unlockedUser;
+ }
+
+ @Override
+ public User getUnlockedUser () {
+ return this.unlockedUser;
+ }
}
+++ /dev/null
-/*
- * Copyright (C) 2016 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.unlocked;
-
-import java.text.MessageFormat;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An event being fired when the administrator has unlocked a user account.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class AdminUserUnlockedEvent implements AdminUnlockedUserEvent {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 14_785_787_174_676_290L;
-
- /**
- * Unlocked user instance
- */
- private final User unlockedUser;
-
- /**
- * Constructor with linked user instance
- * <p>
- * @param unlockedUser Unlocked user instance
- */
- public AdminUserUnlockedEvent (final User unlockedUser) {
- // Is the user instance valid?
- if (null == unlockedUser) {
- // Throw NPE
- throw new NullPointerException("unlockedUser is null"); //NOI18N
- } else if (unlockedUser.getUserId() == null) {
- // Throw NPE again
- throw new NullPointerException("unlockedUser.userId is null"); //NOI18N
- } else if (unlockedUser.getUserId() < 1) {
- // Invalid id number
- throw new IllegalArgumentException(MessageFormat.format("unlockedUser.userId={0} is invalid.", unlockedUser.getUserId())); //NOI18N
- }
-
- // Set it here
- this.unlockedUser = unlockedUser;
- }
-
- @Override
- public User getUnlockedUser () {
- return this.unlockedUser;
- }
-
-}
--- /dev/null
+/*
+ * Copyright (C) 2016 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.unlocked;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for events being fired when an administrator unlocked a user
+ * account.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminUnlockedUserEvent extends Serializable {
+
+ /**
+ * Getter for unlocked user instance
+ * <p>
+ * @return Unlocked user instance
+ */
+ User getUnlockedUser ();
+
+}
*/\r
package org.mxchange.jusercore.events.user.update;\r
\r
-import java.io.Serializable;\r
+import java.text.MessageFormat;\r
import org.mxchange.jusercore.model.user.User;\r
\r
/**\r
- * An interface for events being fired when an administrator updated user data.\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 interface AdminUpdatedUserDataEvent extends Serializable {\r
+public class AdminUpdatedUserDataEvent implements ObservableAdminUpdatedUserDataEvent {\r
\r
/**\r
- * Getter for updated user instance\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
- * @return Added user instance\r
+ * @param updatedUser Updated user instance\r
*/\r
- User getUpdatedUser ();\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
+++ /dev/null
-/*\r
- * Copyright (C) 2016 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 AdminUserDataUpdatedEvent implements AdminUpdatedUserDataEvent {\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 AdminUserDataUpdatedEvent (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
--- /dev/null
+/*\r
+ * Copyright (C) 2016 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
--- /dev/null
+/*\r
+ * Copyright (C) 2016 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
*/\r
package org.mxchange.jusercore.events.user.update;\r
\r
-import java.io.Serializable;\r
+import java.text.MessageFormat;\r
import org.mxchange.jusercore.model.user.User;\r
\r
/**\r
- * An interface for events being fired when a user updates personal data.\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 interface UpdatedUserPersonalDataEvent extends Serializable {\r
+public class UpdatedUserPersonalDataEvent implements ObservableUpdatedUserPersonalDataEvent {\r
\r
/**\r
- * Getter for updated user instance\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
- * @return Added user instance\r
+ * @param updatedUser Updated user instance\r
*/\r
- User getUpdatedUser ();\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
+++ /dev/null
-/*\r
- * Copyright (C) 2016 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 UserUpdatedPersonalDataEvent implements UpdatedUserPersonalDataEvent {\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 UserUpdatedPersonalDataEvent (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