From 61bf1d7a018db0abff2122297f650a4e82461ad8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 17 Aug 2016 15:33:53 +0200 Subject: [PATCH] Continued a bit: - added new events for fax/land-line number unlinked from contact - renamed cellphone -> mobile - tpzo fixed --- .../unlinked/AdminFaxNumberUnlinkedEvent.java | 66 +++++++++++++++++++ .../unlinked/AdminUnlinkedFaxNumberEvent.java | 44 +++++++++++++ .../AdminLandLineNumberUnlinkedEvent.java | 66 +++++++++++++++++++ .../AdminUnlinkedLandLineNumberEvent.java | 44 +++++++++++++ .../AdminMobileNumberUnlinkedEvent.java | 20 +++--- .../AdminUnlinkedMobileNumberEvent.java | 8 +-- 6 files changed, 234 insertions(+), 14 deletions(-) create mode 100644 src/org/mxchange/jcontacts/events/fax/unlinked/AdminFaxNumberUnlinkedEvent.java create mode 100644 src/org/mxchange/jcontacts/events/fax/unlinked/AdminUnlinkedFaxNumberEvent.java create mode 100644 src/org/mxchange/jcontacts/events/landline/unlinked/AdminLandLineNumberUnlinkedEvent.java create mode 100644 src/org/mxchange/jcontacts/events/landline/unlinked/AdminUnlinkedLandLineNumberEvent.java diff --git a/src/org/mxchange/jcontacts/events/fax/unlinked/AdminFaxNumberUnlinkedEvent.java b/src/org/mxchange/jcontacts/events/fax/unlinked/AdminFaxNumberUnlinkedEvent.java new file mode 100644 index 0000000..327c963 --- /dev/null +++ b/src/org/mxchange/jcontacts/events/fax/unlinked/AdminFaxNumberUnlinkedEvent.java @@ -0,0 +1,66 @@ +/* + * 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.jcontacts.events.fax.unlinked; + +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; + +/** + * An event when a cell phone number has been unlinked + *

+ * @author Roland Haeder + */ +public class AdminFaxNumberUnlinkedEvent implements AdminUnlinkedFaxNumberEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 18_521_758_718_691_064L; + + /** + * Contact instance + */ + private final Contact contact; + + /** + * Unlinked fax number + */ + private final DialableFaxNumber unlinkedFaxNumber; + + /** + * Constructor with unlinked cell phone number + *

+ * @param contact Contact with linked cell phone instance + * @param unlinkedCellphoneNumber Unlinked cell phone number + */ + public AdminFaxNumberUnlinkedEvent (final Contact contact, final DialableFaxNumber unlinkedCellphoneNumber) { + // Set it here + this.contact = contact; + this.unlinkedFaxNumber = unlinkedCellphoneNumber; + } + + @Override + public Contact getContact () { + return this.contact; + } + + @Override + public DialableFaxNumber getUnlinkedFaxNumber () { + return this.unlinkedFaxNumber; + } + +} diff --git a/src/org/mxchange/jcontacts/events/fax/unlinked/AdminUnlinkedFaxNumberEvent.java b/src/org/mxchange/jcontacts/events/fax/unlinked/AdminUnlinkedFaxNumberEvent.java new file mode 100644 index 0000000..e8c044f --- /dev/null +++ b/src/org/mxchange/jcontacts/events/fax/unlinked/AdminUnlinkedFaxNumberEvent.java @@ -0,0 +1,44 @@ +/* + * 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.jcontacts.events.fax.unlinked; + +import java.io.Serializable; +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; + +/** + * An interface for an event when a fax number has been unlinked + *

+ * @author Roland Haeder + */ +public interface AdminUnlinkedFaxNumberEvent extends Serializable { + + /** + * Getter for updated fax numbers + *

+ * @return Updated fax numbers + */ + DialableFaxNumber getUnlinkedFaxNumber (); + + /** + * Getter for contact instance + *

+ * @return Contact instance + */ + Contact getContact (); + +} diff --git a/src/org/mxchange/jcontacts/events/landline/unlinked/AdminLandLineNumberUnlinkedEvent.java b/src/org/mxchange/jcontacts/events/landline/unlinked/AdminLandLineNumberUnlinkedEvent.java new file mode 100644 index 0000000..1873e1a --- /dev/null +++ b/src/org/mxchange/jcontacts/events/landline/unlinked/AdminLandLineNumberUnlinkedEvent.java @@ -0,0 +1,66 @@ +/* + * 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.jcontacts.events.landline.unlinked; + +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; + +/** + * An event when a land-line number has been unlinked + *

+ * @author Roland Haeder + */ +public class AdminLandLineNumberUnlinkedEvent implements AdminUnlinkedLandLineNumberEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 18_521_758_718_691_065L; + + /** + * Contact instance + */ + private final Contact contact; + + /** + * Unlinked land-line number + */ + private final DialableLandLineNumber unlinkedLandLineNumber; + + /** + * Constructor with unlinked land-line number + *

+ * @param contact Contact with linked land-line instance + * @param unlinkedLandLineNumber Unlinked land-line number + */ + public AdminLandLineNumberUnlinkedEvent (final Contact contact, final DialableLandLineNumber unlinkedLandLineNumber) { + // Set it here + this.contact = contact; + this.unlinkedLandLineNumber = unlinkedLandLineNumber; + } + + @Override + public Contact getContact () { + return this.contact; + } + + @Override + public DialableLandLineNumber getUnlinkedLandLineNumber () { + return this.unlinkedLandLineNumber; + } + +} diff --git a/src/org/mxchange/jcontacts/events/landline/unlinked/AdminUnlinkedLandLineNumberEvent.java b/src/org/mxchange/jcontacts/events/landline/unlinked/AdminUnlinkedLandLineNumberEvent.java new file mode 100644 index 0000000..002bfdd --- /dev/null +++ b/src/org/mxchange/jcontacts/events/landline/unlinked/AdminUnlinkedLandLineNumberEvent.java @@ -0,0 +1,44 @@ +/* + * 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.jcontacts.events.landline.unlinked; + +import java.io.Serializable; +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; + +/** + * An interface for an event when a land-line number has been unlinked + *

+ * @author Roland Haeder + */ +public interface AdminUnlinkedLandLineNumberEvent extends Serializable { + + /** + * Getter for updated land-line numbers + *

+ * @return Updated land-line numbers + */ + DialableLandLineNumber getUnlinkedLandLineNumber (); + + /** + * Getter for contact instance + *

+ * @return Contact instance + */ + Contact getContact (); + +} diff --git a/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminMobileNumberUnlinkedEvent.java b/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminMobileNumberUnlinkedEvent.java index a2ab5da..d6e5621 100644 --- a/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminMobileNumberUnlinkedEvent.java +++ b/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminMobileNumberUnlinkedEvent.java @@ -20,7 +20,7 @@ import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; /** - * An event when a cell phone number has been updated + * An event when a mobile number has been unlinked *

* @author Roland Haeder */ @@ -37,20 +37,20 @@ public class AdminMobileNumberUnlinkedEvent implements AdminUnlinkedMobileNumber private final Contact contact; /** - * Unlinked mobile provider instance + * Unlinked mobile number */ - private final DialableMobileNumber unlinkedCellphoneNumber; + private final DialableMobileNumber unlinkedMobileNumber; /** - * Constructor with unlinked cell phone number + * Constructor with unlinked mobile number *

- * @param contact Contact with linked cell phone instance - * @param unlinkedCellphoneNumber Unlinked cell phone number + * @param contact Contact with linked mobile instance + * @param unlinkedMobileNumber Unlinked mobile number */ - public AdminMobileNumberUnlinkedEvent (final Contact contact, final DialableMobileNumber unlinkedCellphoneNumber) { + public AdminMobileNumberUnlinkedEvent (final Contact contact, final DialableMobileNumber unlinkedMobileNumber) { // Set it here this.contact = contact; - this.unlinkedCellphoneNumber = unlinkedCellphoneNumber; + this.unlinkedMobileNumber = unlinkedMobileNumber; } @Override @@ -59,8 +59,8 @@ public class AdminMobileNumberUnlinkedEvent implements AdminUnlinkedMobileNumber } @Override - public DialableMobileNumber getUnlinkedCellphoneNumber () { - return this.unlinkedCellphoneNumber; + public DialableMobileNumber getUnlinkedMobileNumber () { + return this.unlinkedMobileNumber; } } diff --git a/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminUnlinkedMobileNumberEvent.java b/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminUnlinkedMobileNumberEvent.java index 4c12280..a84d702 100644 --- a/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminUnlinkedMobileNumberEvent.java +++ b/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminUnlinkedMobileNumberEvent.java @@ -21,18 +21,18 @@ import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; /** - * An interface for an event when a cell phone number has been updated + * An interface for an event when a mobile number has been unlinked *

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

- * @return Updated cell phone numbers + * @return Updated mobile numbers */ - DialableMobileNumber getUnlinkedCellphoneNumber (); + DialableMobileNumber getUnlinkedMobileNumber (); /** * Getter for contact instance -- 2.39.5