From: Roland Haeder Date: Thu, 15 Oct 2015 09:57:27 +0000 (+0200) Subject: Added event for user registration X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=24ae496375a1a966937112b8cc972db8719b0e9d;p=juser-core.git Added event for user registration Signed-off-by:Roland Häder --- 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 (); +}