From 0ca3e5dd5ebc7bf1e145b7346594607593601200 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 30 Jul 2017 21:51:05 +0200 Subject: [PATCH] Added more events: - when a fax, land-line or mobile number has been created by a bean helper MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../created/HelperCreatedFaxNumberEvent.java | 58 +++++++++++++++++++ ...ObservableHelperCreatedFaxNumberEvent.java | 44 ++++++++++++++ .../HelperCreatedLandLineNumberEvent.java | 58 +++++++++++++++++++ ...vableHelperCreatedLandLineNumberEvent.java | 44 ++++++++++++++ .../HelperCreatedMobileNumberEvent.java | 58 +++++++++++++++++++ ...ervableHelperCreatedMobileNumberEvent.java | 44 ++++++++++++++ 6 files changed, 306 insertions(+) create mode 100644 src/org/mxchange/jphone/events/helper/fax/created/HelperCreatedFaxNumberEvent.java create mode 100644 src/org/mxchange/jphone/events/helper/fax/created/ObservableHelperCreatedFaxNumberEvent.java create mode 100644 src/org/mxchange/jphone/events/helper/landline/created/HelperCreatedLandLineNumberEvent.java create mode 100644 src/org/mxchange/jphone/events/helper/landline/created/ObservableHelperCreatedLandLineNumberEvent.java create mode 100644 src/org/mxchange/jphone/events/helper/mobile/created/HelperCreatedMobileNumberEvent.java create mode 100644 src/org/mxchange/jphone/events/helper/mobile/created/ObservableHelperCreatedMobileNumberEvent.java diff --git a/src/org/mxchange/jphone/events/helper/fax/created/HelperCreatedFaxNumberEvent.java b/src/org/mxchange/jphone/events/helper/fax/created/HelperCreatedFaxNumberEvent.java new file mode 100644 index 0000000..2ee48f9 --- /dev/null +++ b/src/org/mxchange/jphone/events/helper/fax/created/HelperCreatedFaxNumberEvent.java @@ -0,0 +1,58 @@ +/* + * 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.jphone.events.helper.fax.created; + +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; + +/** + * An event being fired when a bean helper has successfully created a fax number + * instance. + *

+ * @author Roland Haeder + */ +public class HelperCreatedFaxNumberEvent implements ObservableHelperCreatedFaxNumberEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 50_498_269_827_581L; + + /** + * Fax number + */ + private DialableFaxNumber faxNumber; + + /** + * Constructor with fax number instance + *

+ * @param faxNumber Fax number instance + */ + public HelperCreatedFaxNumberEvent (final DialableFaxNumber faxNumber) { + this.faxNumber = faxNumber; + } + + @Override + public DialableFaxNumber getFaxNumber () { + return this.faxNumber; + } + + @Override + public void setFaxNumber (final DialableFaxNumber faxNumber) { + this.faxNumber = faxNumber; + } + +} diff --git a/src/org/mxchange/jphone/events/helper/fax/created/ObservableHelperCreatedFaxNumberEvent.java b/src/org/mxchange/jphone/events/helper/fax/created/ObservableHelperCreatedFaxNumberEvent.java new file mode 100644 index 0000000..e28a4d1 --- /dev/null +++ b/src/org/mxchange/jphone/events/helper/fax/created/ObservableHelperCreatedFaxNumberEvent.java @@ -0,0 +1,44 @@ +/* + * 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.jphone.events.helper.fax.created; + +import java.io.Serializable; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; + +/** + * An interface for observable events when a bean helper has successfully + * created a fax number instance. + *

+ * @author Roland Häder + */ +public interface ObservableHelperCreatedFaxNumberEvent extends Serializable { + + /** + * Getter for fax number + *

+ * @return Fax number + */ + DialableFaxNumber getFaxNumber (); + + /** + * Setter for fax number + *

+ * @param faxNumber Fax number + */ + void setFaxNumber (final DialableFaxNumber faxNumber); + +} diff --git a/src/org/mxchange/jphone/events/helper/landline/created/HelperCreatedLandLineNumberEvent.java b/src/org/mxchange/jphone/events/helper/landline/created/HelperCreatedLandLineNumberEvent.java new file mode 100644 index 0000000..0aef4e7 --- /dev/null +++ b/src/org/mxchange/jphone/events/helper/landline/created/HelperCreatedLandLineNumberEvent.java @@ -0,0 +1,58 @@ +/* + * 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.jphone.events.helper.landline.created; + +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; + +/** + * An event being fired when a bean helper has successfully created a fax number + * instance. + *

+ * @author Roland Haeder + */ +public class HelperCreatedLandLineNumberEvent implements ObservableHelperCreatedLandLineNumberEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 50_498_269_827_582L; + + /** + * Land-line number + */ + private DialableLandLineNumber landLineNumber; + + /** + * Constructor with fax number instance + *

+ * @param landLineNumber Land-line number instance + */ + public HelperCreatedLandLineNumberEvent (final DialableLandLineNumber landLineNumber) { + this.landLineNumber = landLineNumber; + } + + @Override + public DialableLandLineNumber getLandLineNumber () { + return this.landLineNumber; + } + + @Override + public void setLandLineNumber (final DialableLandLineNumber landLineNumber) { + this.landLineNumber = landLineNumber; + } + +} diff --git a/src/org/mxchange/jphone/events/helper/landline/created/ObservableHelperCreatedLandLineNumberEvent.java b/src/org/mxchange/jphone/events/helper/landline/created/ObservableHelperCreatedLandLineNumberEvent.java new file mode 100644 index 0000000..56f2e60 --- /dev/null +++ b/src/org/mxchange/jphone/events/helper/landline/created/ObservableHelperCreatedLandLineNumberEvent.java @@ -0,0 +1,44 @@ +/* + * 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.jphone.events.helper.landline.created; + +import java.io.Serializable; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; + +/** + * An interface for observable events when a bean helper has successfully + * created a land-line number instance. + *

+ * @author Roland Häder + */ +public interface ObservableHelperCreatedLandLineNumberEvent extends Serializable { + + /** + * Getter for landLine number + *

+ * @return Land-line number + */ + DialableLandLineNumber getLandLineNumber (); + + /** + * Setter for landLine number + *

+ * @param landLineNumber Land-line number + */ + void setLandLineNumber (final DialableLandLineNumber landLineNumber); + +} diff --git a/src/org/mxchange/jphone/events/helper/mobile/created/HelperCreatedMobileNumberEvent.java b/src/org/mxchange/jphone/events/helper/mobile/created/HelperCreatedMobileNumberEvent.java new file mode 100644 index 0000000..efec208 --- /dev/null +++ b/src/org/mxchange/jphone/events/helper/mobile/created/HelperCreatedMobileNumberEvent.java @@ -0,0 +1,58 @@ +/* + * 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.jphone.events.helper.mobile.created; + +import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; + +/** + * An event being fired when a bean helper has successfully created a fax number + * instance. + *

+ * @author Roland Haeder + */ +public class HelperCreatedMobileNumberEvent implements ObservableHelperCreatedMobileNumberEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 50_498_269_827_583L; + + /** + * Mobile number + */ + private DialableMobileNumber mobileNumber; + + /** + * Constructor with fax number instance + *

+ * @param mobileNumber Mobile number instance + */ + public HelperCreatedMobileNumberEvent (final DialableMobileNumber mobileNumber) { + this.mobileNumber = mobileNumber; + } + + @Override + public DialableMobileNumber getMobileNumber () { + return this.mobileNumber; + } + + @Override + public void setMobileNumber (final DialableMobileNumber mobileNumber) { + this.mobileNumber = mobileNumber; + } + +} diff --git a/src/org/mxchange/jphone/events/helper/mobile/created/ObservableHelperCreatedMobileNumberEvent.java b/src/org/mxchange/jphone/events/helper/mobile/created/ObservableHelperCreatedMobileNumberEvent.java new file mode 100644 index 0000000..559dd14 --- /dev/null +++ b/src/org/mxchange/jphone/events/helper/mobile/created/ObservableHelperCreatedMobileNumberEvent.java @@ -0,0 +1,44 @@ +/* + * 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.jphone.events.helper.mobile.created; + +import java.io.Serializable; +import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; + +/** + * An interface for observable events when a bean helper has successfully + * created a mobile number instance. + *

+ * @author Roland Häder + */ +public interface ObservableHelperCreatedMobileNumberEvent extends Serializable { + + /** + * Getter for mobile number + *

+ * @return Mobile number + */ + DialableMobileNumber getMobileNumber (); + + /** + * Setter for mobile number + *

+ * @param mobileNumber Mobile number + */ + void setMobileNumber (final DialableMobileNumber mobileNumber); + +} -- 2.39.5