From 3e66e458afaf0778c1d99a9b645a276e658ae179 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 9 Aug 2016 15:49:40 +0200 Subject: [PATCH] Continued a bit: - moved added mobile provider into proper package - added event for updated cell phone number --- .../AdminCellphoneNumberUpdatedEvent.java | 53 +++++++++++++++++++ .../AdminUpdatedCellphoneNumberEvent.java | 36 +++++++++++++ .../added}/AdminAddedMobileProviderEvent.java | 2 +- .../added}/AdminMobileProviderAddedEvent.java | 2 +- 4 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 src/org/mxchange/jphone/events/cellphone/updated/AdminCellphoneNumberUpdatedEvent.java create mode 100644 src/org/mxchange/jphone/events/cellphone/updated/AdminUpdatedCellphoneNumberEvent.java rename src/org/mxchange/jphone/events/{ => mobileprovider/added}/AdminAddedMobileProviderEvent.java (95%) rename src/org/mxchange/jphone/events/{ => mobileprovider/added}/AdminMobileProviderAddedEvent.java (96%) diff --git a/src/org/mxchange/jphone/events/cellphone/updated/AdminCellphoneNumberUpdatedEvent.java b/src/org/mxchange/jphone/events/cellphone/updated/AdminCellphoneNumberUpdatedEvent.java new file mode 100644 index 0000000..e336c57 --- /dev/null +++ b/src/org/mxchange/jphone/events/cellphone/updated/AdminCellphoneNumberUpdatedEvent.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2016 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.jphone.events.cellphone.updated; + +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; + +/** + * An event when a cell phone number has been updated + *

+ * @author Roland Haeder + */ +public class AdminCellphoneNumberUpdatedEvent implements AdminUpdatedCellphoneNumberEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 18_521_758_718_691_064L; + + /** + * Added mobile provider instance + */ + private final DialableCellphoneNumber updatedCellphoneNumber; + + /** + * Constructor with updated cell phone number + *

+ * @param updatedCellphoneNumber Updated cell phone number + */ + public AdminCellphoneNumberUpdatedEvent (final DialableCellphoneNumber updatedCellphoneNumber) { + // Set it here + this.updatedCellphoneNumber = updatedCellphoneNumber; + } + + @Override + public DialableCellphoneNumber getUpdatedCellphoneNumber () { + return this.updatedCellphoneNumber; + } + +} diff --git a/src/org/mxchange/jphone/events/cellphone/updated/AdminUpdatedCellphoneNumberEvent.java b/src/org/mxchange/jphone/events/cellphone/updated/AdminUpdatedCellphoneNumberEvent.java new file mode 100644 index 0000000..43a4ddc --- /dev/null +++ b/src/org/mxchange/jphone/events/cellphone/updated/AdminUpdatedCellphoneNumberEvent.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2016 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.jphone.events.cellphone.updated; + +import java.io.Serializable; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; + +/** + * An interface for an event when a cell phone number has been updated + *

+ * @author Roland Haeder + */ +public interface AdminUpdatedCellphoneNumberEvent extends Serializable { + + /** + * Getter for updated cell phone numbers + *

+ * @return Updated cell phone numbers + */ + DialableCellphoneNumber getUpdatedCellphoneNumber (); + +} diff --git a/src/org/mxchange/jphone/events/AdminAddedMobileProviderEvent.java b/src/org/mxchange/jphone/events/mobileprovider/added/AdminAddedMobileProviderEvent.java similarity index 95% rename from src/org/mxchange/jphone/events/AdminAddedMobileProviderEvent.java rename to src/org/mxchange/jphone/events/mobileprovider/added/AdminAddedMobileProviderEvent.java index 760f64d..c3776d7 100644 --- a/src/org/mxchange/jphone/events/AdminAddedMobileProviderEvent.java +++ b/src/org/mxchange/jphone/events/mobileprovider/added/AdminAddedMobileProviderEvent.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.mxchange.jphone.events; +package org.mxchange.jphone.events.mobileprovider.added; import java.io.Serializable; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; diff --git a/src/org/mxchange/jphone/events/AdminMobileProviderAddedEvent.java b/src/org/mxchange/jphone/events/mobileprovider/added/AdminMobileProviderAddedEvent.java similarity index 96% rename from src/org/mxchange/jphone/events/AdminMobileProviderAddedEvent.java rename to src/org/mxchange/jphone/events/mobileprovider/added/AdminMobileProviderAddedEvent.java index 97bd5e9..bf8854a 100644 --- a/src/org/mxchange/jphone/events/AdminMobileProviderAddedEvent.java +++ b/src/org/mxchange/jphone/events/mobileprovider/added/AdminMobileProviderAddedEvent.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.mxchange.jphone.events; +package org.mxchange.jphone.events.mobileprovider.added; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; -- 2.39.5