From 52d5a12b3b6149339baf735b92c70c09c3fb5339 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 30 Jul 2017 22:13:02 +0200 Subject: [PATCH] Continued a bit: - added events for when a user name or password should be cleared. Much better style than directly clearing it. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../password/ClearUserPasswordEvent.java | 37 +++++++++++++++++++ .../ObservableClearUserPasswordEvent.java | 28 ++++++++++++++ .../clear/username/ClearUserNameEvent.java | 37 +++++++++++++++++++ .../ObservableClearUserNameEvent.java | 28 ++++++++++++++ 4 files changed, 130 insertions(+) create mode 100644 src/org/mxchange/jusercore/events/user/clear/password/ClearUserPasswordEvent.java create mode 100644 src/org/mxchange/jusercore/events/user/clear/password/ObservableClearUserPasswordEvent.java create mode 100644 src/org/mxchange/jusercore/events/user/clear/username/ClearUserNameEvent.java create mode 100644 src/org/mxchange/jusercore/events/user/clear/username/ObservableClearUserNameEvent.java diff --git a/src/org/mxchange/jusercore/events/user/clear/password/ClearUserPasswordEvent.java b/src/org/mxchange/jusercore/events/user/clear/password/ClearUserPasswordEvent.java new file mode 100644 index 0000000..55cb87c --- /dev/null +++ b/src/org/mxchange/jusercore/events/user/clear/password/ClearUserPasswordEvent.java @@ -0,0 +1,37 @@ +/* + * 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 . + */ +package org.mxchange.jusercore.events.user.clear.password; + +/** + * An event being fired when a user password should be cleared + *

+ * @author Roland Häder + */ +public class ClearUserPasswordEvent implements ObservableClearUserPasswordEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 14_785_787_174_676_291L; + + /** + * Default constructor + */ + public ClearUserPasswordEvent () { + } + +} diff --git a/src/org/mxchange/jusercore/events/user/clear/password/ObservableClearUserPasswordEvent.java b/src/org/mxchange/jusercore/events/user/clear/password/ObservableClearUserPasswordEvent.java new file mode 100644 index 0000000..1a7b8d6 --- /dev/null +++ b/src/org/mxchange/jusercore/events/user/clear/password/ObservableClearUserPasswordEvent.java @@ -0,0 +1,28 @@ +/* + * 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 . + */ +package org.mxchange.jusercore.events.user.clear.password; + +import java.io.Serializable; + +/** + * An interface for events being fired when user password should be cleared. + *

+ * @author Roland Häder + */ +public interface ObservableClearUserPasswordEvent extends Serializable { + +} diff --git a/src/org/mxchange/jusercore/events/user/clear/username/ClearUserNameEvent.java b/src/org/mxchange/jusercore/events/user/clear/username/ClearUserNameEvent.java new file mode 100644 index 0000000..007cb6a --- /dev/null +++ b/src/org/mxchange/jusercore/events/user/clear/username/ClearUserNameEvent.java @@ -0,0 +1,37 @@ +/* + * 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 . + */ +package org.mxchange.jusercore.events.user.clear.username; + +/** + * An event being fired when a user name should be cleared. + *

+ * @author Roland Häder + */ +public class ClearUserNameEvent implements ObservableClearUserNameEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 14_785_787_174_676_291L; + + /** + * Default constructor + */ + public ClearUserNameEvent () { + } + +} diff --git a/src/org/mxchange/jusercore/events/user/clear/username/ObservableClearUserNameEvent.java b/src/org/mxchange/jusercore/events/user/clear/username/ObservableClearUserNameEvent.java new file mode 100644 index 0000000..9c941b1 --- /dev/null +++ b/src/org/mxchange/jusercore/events/user/clear/username/ObservableClearUserNameEvent.java @@ -0,0 +1,28 @@ +/* + * 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 . + */ +package org.mxchange.jusercore.events.user.clear.username; + +import java.io.Serializable; + +/** + * An interface for events being fired when a user name should be cleared. + *

+ * @author Roland Häder + */ +public interface ObservableClearUserNameEvent extends Serializable { + +} -- 2.39.5