From 4c5d05fe49d4cf1a041fc7d404dd94858f030d21 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 13 Apr 2016 17:37:39 +0200 Subject: [PATCH] added event when an administrator has added a new mobile provider --- .../events/AdminAddedMobileProviderEvent.java | 35 ++++++++++++ .../events/AdminMobileProviderAddedEvent.java | 53 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 src/org/mxchange/jphone/events/AdminAddedMobileProviderEvent.java create mode 100644 src/org/mxchange/jphone/events/AdminMobileProviderAddedEvent.java diff --git a/src/org/mxchange/jphone/events/AdminAddedMobileProviderEvent.java b/src/org/mxchange/jphone/events/AdminAddedMobileProviderEvent.java new file mode 100644 index 0000000..7ded986 --- /dev/null +++ b/src/org/mxchange/jphone/events/AdminAddedMobileProviderEvent.java @@ -0,0 +1,35 @@ +/* + * 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; + +import java.io.Serializable; +import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; + +/** + * An interface for an event when a new mobile provider has been added. + *

+ * @author Roland Haeder + */ +public interface AdminAddedMobileProviderEvent extends Serializable { + + /** + * Getter for added mobile provider + *

+ * @return Added mobile provider + */ + MobileProvider getAddedMobileProvider (); +} diff --git a/src/org/mxchange/jphone/events/AdminMobileProviderAddedEvent.java b/src/org/mxchange/jphone/events/AdminMobileProviderAddedEvent.java new file mode 100644 index 0000000..a795736 --- /dev/null +++ b/src/org/mxchange/jphone/events/AdminMobileProviderAddedEvent.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; + +import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; + +/** + * An event when a new mobile provider has been added + *

+ * @author Roland Haeder + */ +public class AdminMobileProviderAddedEvent implements AdminAddedMobileProviderEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 18_521_758_718_691_064L; + + /** + * Added mobile provider instance + */ + private final MobileProvider addedMobileProvider; + + /** + * Constructor with added mobile provider instance + *

+ * @param addedMobileProvider Added mobile provider instance + */ + public AdminMobileProviderAddedEvent (final MobileProvider addedMobileProvider) { + // Set it here + this.addedMobileProvider = addedMobileProvider; + } + + @Override + public MobileProvider getAddedMobileProvider () { + return this.addedMobileProvider; + } + +} -- 2.39.5