From: Roland Häder Date: Sat, 5 Aug 2017 18:21:51 +0000 (+0200) Subject: renamed event classes/interfaces as these events are generic enough X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a979dcdbc46660a2ad13eb0c3b43ae8dc05f26cb;p=juser-core.git renamed event classes/interfaces as these events are generic enough Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jusercore/events/user/created/CreatedUserEvent.java b/src/org/mxchange/jusercore/events/user/created/CreatedUserEvent.java new file mode 100644 index 0000000..207ec64 --- /dev/null +++ b/src/org/mxchange/jusercore/events/user/created/CreatedUserEvent.java @@ -0,0 +1,54 @@ +/* + * 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 . + */ +package org.mxchange.jusercore.events.user.created; + +import org.mxchange.jusercore.model.user.User; + +/** + * An event being fired when a user instance was successfully created. This may + * happen when a user profile was called. + *

+ * @author Roland Häder + */ +public class CreatedUserEvent implements ObservableCreatedUserEvent { + + /** + * 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 + *

+ * @param createdUser User instance being created by helper + */ + public CreatedUserEvent (final User createdUser) { + // Set user instance + this.createdUser = createdUser; + } + + @Override + public User getCreatedUser () { + return this.createdUser; + } + +} diff --git a/src/org/mxchange/jusercore/events/user/created/ObservableCreatedUserEvent.java b/src/org/mxchange/jusercore/events/user/created/ObservableCreatedUserEvent.java new file mode 100644 index 0000000..86444d8 --- /dev/null +++ b/src/org/mxchange/jusercore/events/user/created/ObservableCreatedUserEvent.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2017 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.user.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. + *

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

+ * @return Created user instance + */ + User getCreatedUser (); + +} diff --git a/src/org/mxchange/jusercore/events/user/helper/created/HelperCreatedUserEvent.java b/src/org/mxchange/jusercore/events/user/helper/created/HelperCreatedUserEvent.java deleted file mode 100644 index dfd037e..0000000 --- a/src/org/mxchange/jusercore/events/user/helper/created/HelperCreatedUserEvent.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 . - */ -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. - *

- * @author Roland Häder - */ -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 - *

- * @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; - } - -} diff --git a/src/org/mxchange/jusercore/events/user/helper/created/ObservableHelperCreatedUserEvent.java b/src/org/mxchange/jusercore/events/user/helper/created/ObservableHelperCreatedUserEvent.java deleted file mode 100644 index a9990f8..0000000 --- a/src/org/mxchange/jusercore/events/user/helper/created/ObservableHelperCreatedUserEvent.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2017 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.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. - *

- * @author Roland Haeder - */ -public interface ObservableHelperCreatedUserEvent extends Serializable { - - /** - * Getter for created user instance - *

- * @return Created user instance - */ - User getCreatedUser (); - -}