From 24ae496375a1a966937112b8cc972db8719b0e9d Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 15 Oct 2015 11:57:27 +0200 Subject: [PATCH] =?utf8?q?Added=20event=20for=20user=20registration=20Sign?= =?utf8?q?ed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- nbproject/project.properties | 4 +- .../registration/RegisteredUserEvent.java | 56 +++++++++++++++++++ .../registration/UserRegisteredEvent.java | 35 ++++++++++++ 3 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 src/org/mxchange/jusercore/events/registration/RegisteredUserEvent.java create mode 100644 src/org/mxchange/jusercore/events/registration/UserRegisteredEvent.java diff --git a/nbproject/project.properties b/nbproject/project.properties index 11ab09b..8f9ee4d 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -42,8 +42,8 @@ javac.classpath=\ ${file.reference.jcore.jar}:\ ${file.reference.jcoreee.jar}:\ ${file.reference.jcontacts-core.jar}:\ - ${libs.javaee-api-7.0.classpath}:\ - ${file.reference.commons-codec-1.10.jar} + ${file.reference.commons-codec-1.10.jar}:\ + ${libs.javaee-api-7.0.classpath} # Space-separated list of extra javac options javac.compilerargs=-Xlint:unchecked -Xlint:deprecation javac.deprecation=true diff --git a/src/org/mxchange/jusercore/events/registration/RegisteredUserEvent.java b/src/org/mxchange/jusercore/events/registration/RegisteredUserEvent.java new file mode 100644 index 0000000..0ed99f6 --- /dev/null +++ b/src/org/mxchange/jusercore/events/registration/RegisteredUserEvent.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jusercore.events.registration; + +import org.mxchange.jusercore.model.user.User; + +/** + * An event, fireed if a new user has registered + *

+ * @author Roland Haeder + */ +public class RegisteredUserEvent implements UserRegisteredEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 186_956_974_127_691L; + + /** + * Newly registered user; + */ + private final User user; + + /** + * Constructor with newly registered user + *

+ * @param user Newly registered user + */ + public RegisteredUserEvent (final User user) { + this.user = user; + } + + /** + * Getter for user instance + *

+ * @return User instance + */ + @Override + public User getUser () { + return this.user; + } +} diff --git a/src/org/mxchange/jusercore/events/registration/UserRegisteredEvent.java b/src/org/mxchange/jusercore/events/registration/UserRegisteredEvent.java new file mode 100644 index 0000000..5c7adec --- /dev/null +++ b/src/org/mxchange/jusercore/events/registration/UserRegisteredEvent.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jusercore.events.registration; + +import java.io.Serializable; +import org.mxchange.jusercore.model.user.User; + +/** + * An event interface, fireed if a new user has registered + *

+ * @author Roland Haeder + */ +public interface UserRegisteredEvent extends Serializable { + + /** + * Getter for user instance + *

+ * @return User instance + */ + User getUser (); +} -- 2.39.5