From: Roland Häder Date: Wed, 19 Apr 2017 22:59:51 +0000 (+0200) Subject: renamed for better names (Observable hints interface) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d0e8f86ee9c81ad1a3c201ee860ff0378a4c3887;p=jcontacts-core.git renamed for better names (Observable hints interface) Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontacts/events/contact/add/AdminAddedContactEvent.java b/src/org/mxchange/jcontacts/events/contact/add/AdminAddedContactEvent.java index 6cfd6a2..6c13613 100644 --- a/src/org/mxchange/jcontacts/events/contact/add/AdminAddedContactEvent.java +++ b/src/org/mxchange/jcontacts/events/contact/add/AdminAddedContactEvent.java @@ -1,37 +1,66 @@ -/* - * Copyright (C) 2016 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.jcontacts.events.contact.add; - -import java.io.Serializable; -import org.mxchange.jcontacts.contact.Contact; - -/** - * An interface for events being fired when an administrator added new contact - * data. - *

- * @author Roland Häder - */ -public interface AdminAddedContactEvent extends Serializable { - - /** - * Getter for added contact instance - *

- * @return Added contact instance - */ - Contact getAddedContact (); - -} +/* + * Copyright (C) 2016 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.jcontacts.events.contact.add; + +import java.text.MessageFormat; +import org.mxchange.jcontacts.contact.Contact; + +/** + * An event being fired when the administrator has added a new user account + *

+ * @author Roland Häder + */ +public class AdminAddedContactEvent implements ObservableAdminAddedContactEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 14_785_787_174_676_290L; + + /** + * Added contact instance + */ + private final Contact addedContact; + + /** + * Constructor with added contact instance + *

+ * @param addedContact Added contact instance + */ + public AdminAddedContactEvent (final Contact addedContact) { + // Is the contact instance valid? + if (null == addedContact) { + // Throw NPE + throw new NullPointerException("addedContact is null"); //NOI18N + } else if (addedContact.getContactId() == null) { + // Throw NPE again + throw new NullPointerException("addedContact.contactId is null"); //NOI18N + } else if (addedContact.getContactId() < 1) { + // Invalid id number + throw new IllegalArgumentException(MessageFormat.format("addedContact.contactId={0} is invalid.", addedContact.getContactId())); //NOI18N + } + + // Set it here + this.addedContact = addedContact; + } + + @Override + public Contact getAddedContact () { + return this.addedContact; + } + +} diff --git a/src/org/mxchange/jcontacts/events/contact/add/AdminContactAddedEvent.java b/src/org/mxchange/jcontacts/events/contact/add/AdminContactAddedEvent.java deleted file mode 100644 index cdb1bee..0000000 --- a/src/org/mxchange/jcontacts/events/contact/add/AdminContactAddedEvent.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2016 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.jcontacts.events.contact.add; - -import java.text.MessageFormat; -import org.mxchange.jcontacts.contact.Contact; - -/** - * An event being fired when the administrator has added a new user account - *

- * @author Roland Häder - */ -public class AdminContactAddedEvent implements AdminAddedContactEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 14_785_787_174_676_290L; - - /** - * Added contact instance - */ - private final Contact addedContact; - - /** - * Constructor with added contact instance - *

- * @param addedContact Added contact instance - */ - public AdminContactAddedEvent (final Contact addedContact) { - // Is the contact instance valid? - if (null == addedContact) { - // Throw NPE - throw new NullPointerException("addedContact is null"); //NOI18N - } else if (addedContact.getContactId() == null) { - // Throw NPE again - throw new NullPointerException("addedContact.contactId is null"); //NOI18N - } else if (addedContact.getContactId() < 1) { - // Invalid id number - throw new IllegalArgumentException(MessageFormat.format("addedContact.contactId={0} is invalid.", addedContact.getContactId())); //NOI18N - } - - // Set it here - this.addedContact = addedContact; - } - - @Override - public Contact getAddedContact () { - return this.addedContact; - } - -} diff --git a/src/org/mxchange/jcontacts/events/contact/add/ObservableAdminAddedContactEvent.java b/src/org/mxchange/jcontacts/events/contact/add/ObservableAdminAddedContactEvent.java new file mode 100644 index 0000000..aef84a0 --- /dev/null +++ b/src/org/mxchange/jcontacts/events/contact/add/ObservableAdminAddedContactEvent.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2016 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.jcontacts.events.contact.add; + +import java.io.Serializable; +import org.mxchange.jcontacts.contact.Contact; + +/** + * An interface for events being fired when an administrator added new contact + * data. + *

+ * @author Roland Häder + */ +public interface ObservableAdminAddedContactEvent extends Serializable { + + /** + * Getter for added contact instance + *

+ * @return Added contact instance + */ + Contact getAddedContact (); + +} diff --git a/src/org/mxchange/jcontacts/events/contact/deleted/AdminContactDeletedEvent.java b/src/org/mxchange/jcontacts/events/contact/deleted/AdminContactDeletedEvent.java deleted file mode 100644 index 9aa144c..0000000 --- a/src/org/mxchange/jcontacts/events/contact/deleted/AdminContactDeletedEvent.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2016 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.jcontacts.events.contact.deleted; - -import java.text.MessageFormat; -import org.mxchange.jcontacts.contact.Contact; - -/** - * An event being fired when the administrator has deleted a contact - *

- * @author Roland Häder - */ -public class AdminContactDeletedEvent implements AdminDeletedContactEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 14_785_787_174_676_290L; - - /** - * Deleted contact instance - */ - private final Contact deletedContact; - - /** - * Constructor with deleted contact instance - *

- * @param deletedContact Deleted contact instance - */ - public AdminContactDeletedEvent (final Contact deletedContact) { - // Is the contact instance valid? - if (null == deletedContact) { - // Throw NPE - throw new NullPointerException("deletedContact is null"); //NOI18N - } else if (deletedContact.getContactId() == null) { - // Throw NPE again - throw new NullPointerException("deletedContact.contactId is null"); //NOI18N - } else if (deletedContact.getContactId() < 1) { - // Invalid id number - throw new IllegalArgumentException(MessageFormat.format("deletedContact.contactId={0} is invalid.", deletedContact.getContactId())); //NOI18N - } - - // Set it here - this.deletedContact = deletedContact; - } - - @Override - public Contact getDeletedContact () { - return this.deletedContact; - } - -} diff --git a/src/org/mxchange/jcontacts/events/contact/deleted/AdminDeletedContactEvent.java b/src/org/mxchange/jcontacts/events/contact/deleted/AdminDeletedContactEvent.java index c97fb7a..e5100a6 100644 --- a/src/org/mxchange/jcontacts/events/contact/deleted/AdminDeletedContactEvent.java +++ b/src/org/mxchange/jcontacts/events/contact/deleted/AdminDeletedContactEvent.java @@ -16,21 +16,51 @@ */ package org.mxchange.jcontacts.events.contact.deleted; -import java.io.Serializable; +import java.text.MessageFormat; import org.mxchange.jcontacts.contact.Contact; /** - * An interface for events being fired when an administrator deleted a contact. + * An event being fired when the administrator has deleted a contact *

* @author Roland Häder */ -public interface AdminDeletedContactEvent extends Serializable { +public class AdminDeletedContactEvent implements ObservableAdminDeletedContactEvent { /** - * Getter for deleted contact instance + * Serial number + */ + private static final long serialVersionUID = 14_785_787_174_676_290L; + + /** + * Deleted contact instance + */ + private final Contact deletedContact; + + /** + * Constructor with deleted contact instance *

- * @return Deleted contact instance + * @param deletedContact Deleted contact instance */ - Contact getDeletedContact (); + public AdminDeletedContactEvent (final Contact deletedContact) { + // Is the contact instance valid? + if (null == deletedContact) { + // Throw NPE + throw new NullPointerException("deletedContact is null"); //NOI18N + } else if (deletedContact.getContactId() == null) { + // Throw NPE again + throw new NullPointerException("deletedContact.contactId is null"); //NOI18N + } else if (deletedContact.getContactId() < 1) { + // Invalid id number + throw new IllegalArgumentException(MessageFormat.format("deletedContact.contactId={0} is invalid.", deletedContact.getContactId())); //NOI18N + } + + // Set it here + this.deletedContact = deletedContact; + } + + @Override + public Contact getDeletedContact () { + return this.deletedContact; + } } diff --git a/src/org/mxchange/jcontacts/events/contact/deleted/ObservableAdminDeletedContactEvent.java b/src/org/mxchange/jcontacts/events/contact/deleted/ObservableAdminDeletedContactEvent.java new file mode 100644 index 0000000..39f08d8 --- /dev/null +++ b/src/org/mxchange/jcontacts/events/contact/deleted/ObservableAdminDeletedContactEvent.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2016 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.jcontacts.events.contact.deleted; + +import java.io.Serializable; +import org.mxchange.jcontacts.contact.Contact; + +/** + * An interface for events being fired when an administrator deleted a contact. + *

+ * @author Roland Häder + */ +public interface ObservableAdminDeletedContactEvent extends Serializable { + + /** + * Getter for deleted contact instance + *

+ * @return Deleted contact instance + */ + Contact getDeletedContact (); + +} diff --git a/src/org/mxchange/jcontacts/events/contact/update/AdminContactUpdatedEvent.java b/src/org/mxchange/jcontacts/events/contact/update/AdminContactUpdatedEvent.java deleted file mode 100644 index b67129c..0000000 --- a/src/org/mxchange/jcontacts/events/contact/update/AdminContactUpdatedEvent.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2016 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.jcontacts.events.contact.update; - -import java.text.MessageFormat; -import org.mxchange.jcontacts.contact.Contact; - -/** - * An event being fired when the administrator has updated a new user account - *

- * @author Roland Häder - */ -public class AdminContactUpdatedEvent implements AdminUpdatedContactEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 185_381_945_234_802L; - - /** - * Updated contact instance - */ - private final Contact updatedContact; - - /** - * Constructor with updated contact instance - *

- * @param updatedContact Updated contact instance - */ - public AdminContactUpdatedEvent (final Contact updatedContact) { - // Is the contact instance valid? - if (null == updatedContact) { - // Throw NPE - throw new NullPointerException("updatedContact is null"); //NOI18N - } else if (updatedContact.getContactId() == null) { - // Throw NPE again - throw new NullPointerException("updatedContact.contactId is null"); //NOI18N - } else if (updatedContact.getContactId() < 1) { - // Invalid id number - throw new IllegalArgumentException(MessageFormat.format("updatedContact.contactId={0} is invalid.", updatedContact.getContactId())); //NOI18N - } - - // Set it here - this.updatedContact = updatedContact; - } - - @Override - public Contact getUpdatedContact () { - return this.updatedContact; - } - -} diff --git a/src/org/mxchange/jcontacts/events/contact/update/AdminUpdatedContactEvent.java b/src/org/mxchange/jcontacts/events/contact/update/AdminUpdatedContactEvent.java index 4df5eaf..8bc716d 100644 --- a/src/org/mxchange/jcontacts/events/contact/update/AdminUpdatedContactEvent.java +++ b/src/org/mxchange/jcontacts/events/contact/update/AdminUpdatedContactEvent.java @@ -16,22 +16,51 @@ */ package org.mxchange.jcontacts.events.contact.update; -import java.io.Serializable; +import java.text.MessageFormat; import org.mxchange.jcontacts.contact.Contact; /** - * An interface for events being fired when an administrator updated a new user - * account. + * An event being fired when the administrator has updated a new user account *

* @author Roland Häder */ -public interface AdminUpdatedContactEvent extends Serializable { +public class AdminUpdatedContactEvent implements ObservableAdminUpdatedContactEvent { /** - * Getter for updated contact instance + * Serial number + */ + private static final long serialVersionUID = 185_381_945_234_802L; + + /** + * Updated contact instance + */ + private final Contact updatedContact; + + /** + * Constructor with updated contact instance *

- * @return Updated contact instance + * @param updatedContact Updated contact instance */ - Contact getUpdatedContact (); + public AdminUpdatedContactEvent (final Contact updatedContact) { + // Is the contact instance valid? + if (null == updatedContact) { + // Throw NPE + throw new NullPointerException("updatedContact is null"); //NOI18N + } else if (updatedContact.getContactId() == null) { + // Throw NPE again + throw new NullPointerException("updatedContact.contactId is null"); //NOI18N + } else if (updatedContact.getContactId() < 1) { + // Invalid id number + throw new IllegalArgumentException(MessageFormat.format("updatedContact.contactId={0} is invalid.", updatedContact.getContactId())); //NOI18N + } + + // Set it here + this.updatedContact = updatedContact; + } + + @Override + public Contact getUpdatedContact () { + return this.updatedContact; + } } diff --git a/src/org/mxchange/jcontacts/events/contact/update/ObservableAdminUpdatedContactEvent.java b/src/org/mxchange/jcontacts/events/contact/update/ObservableAdminUpdatedContactEvent.java new file mode 100644 index 0000000..9acd3ce --- /dev/null +++ b/src/org/mxchange/jcontacts/events/contact/update/ObservableAdminUpdatedContactEvent.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2016 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.jcontacts.events.contact.update; + +import java.io.Serializable; +import org.mxchange.jcontacts.contact.Contact; + +/** + * An interface for events being fired when an administrator updated a new user + * account. + *

+ * @author Roland Häder + */ +public interface ObservableAdminUpdatedContactEvent extends Serializable { + + /** + * Getter for updated contact instance + *

+ * @return Updated contact instance + */ + Contact getUpdatedContact (); + +} diff --git a/src/org/mxchange/jcontacts/events/fax/linked/AdminFaxNumberLinkedEvent.java b/src/org/mxchange/jcontacts/events/fax/linked/AdminFaxNumberLinkedEvent.java deleted file mode 100644 index 4964e99..0000000 --- a/src/org/mxchange/jcontacts/events/fax/linked/AdminFaxNumberLinkedEvent.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2016 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.jcontacts.events.fax.linked; - -import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; - -/** - * An event when a fax number has been linked with a contact - *

- * @author Roland Häder - */ -public class AdminFaxNumberLinkedEvent implements AdminLinkedFaxNumberEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 18_521_758_718_691_064L; - - /** - * Contact instance - */ - private final Contact contact; - - /** - * Linked fax number - */ - private final DialableFaxNumber linkedFaxNumber; - - /** - * Constructor with unlinked fax number - *

- * @param contact Contact with linked fax instance - * @param linkedFaxNumber Unlinked fax number - */ - public AdminFaxNumberLinkedEvent (final Contact contact, final DialableFaxNumber linkedFaxNumber) { - // Set it here - this.contact = contact; - this.linkedFaxNumber = linkedFaxNumber; - } - - @Override - public Contact getContact () { - return this.contact; - } - - @Override - public DialableFaxNumber getLinkedFaxNumber () { - return this.linkedFaxNumber; - } - -} diff --git a/src/org/mxchange/jcontacts/events/fax/linked/AdminLinkedFaxNumberEvent.java b/src/org/mxchange/jcontacts/events/fax/linked/AdminLinkedFaxNumberEvent.java index 2f94393..3925fc6 100644 --- a/src/org/mxchange/jcontacts/events/fax/linked/AdminLinkedFaxNumberEvent.java +++ b/src/org/mxchange/jcontacts/events/fax/linked/AdminLinkedFaxNumberEvent.java @@ -16,29 +16,51 @@ */ package org.mxchange.jcontacts.events.fax.linked; -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 linked with a contact + * An event when a fax number has been linked with a contact *

* @author Roland Häder */ -public interface AdminLinkedFaxNumberEvent extends Serializable { +public class AdminLinkedFaxNumberEvent implements ObservableAdminLinkedFaxNumberEvent { /** - * Getter for linked fax numbers - *

- * @return Linked fax numbers + * Serial number */ - DialableFaxNumber getLinkedFaxNumber (); + private static final long serialVersionUID = 18_521_758_718_691_064L; /** - * Getter for contact instance + * Contact instance + */ + private final Contact contact; + + /** + * Linked fax number + */ + private final DialableFaxNumber linkedFaxNumber; + + /** + * Constructor with unlinked fax number *

- * @return Contact instance + * @param contact Contact with linked fax instance + * @param linkedFaxNumber Unlinked fax number */ - Contact getContact (); + public AdminLinkedFaxNumberEvent (final Contact contact, final DialableFaxNumber linkedFaxNumber) { + // Set it here + this.contact = contact; + this.linkedFaxNumber = linkedFaxNumber; + } + + @Override + public Contact getContact () { + return this.contact; + } + + @Override + public DialableFaxNumber getLinkedFaxNumber () { + return this.linkedFaxNumber; + } } diff --git a/src/org/mxchange/jcontacts/events/fax/linked/ObservableAdminLinkedFaxNumberEvent.java b/src/org/mxchange/jcontacts/events/fax/linked/ObservableAdminLinkedFaxNumberEvent.java new file mode 100644 index 0000000..099be66 --- /dev/null +++ b/src/org/mxchange/jcontacts/events/fax/linked/ObservableAdminLinkedFaxNumberEvent.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2016 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.jcontacts.events.fax.linked; + +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 linked with a contact + *

+ * @author Roland Häder + */ +public interface ObservableAdminLinkedFaxNumberEvent extends Serializable { + + /** + * Getter for linked fax numbers + *

+ * @return Linked fax numbers + */ + DialableFaxNumber getLinkedFaxNumber (); + + /** + * Getter for contact instance + *

+ * @return Contact instance + */ + Contact getContact (); + +} diff --git a/src/org/mxchange/jcontacts/events/fax/unlinked/AdminFaxNumberUnlinkedEvent.java b/src/org/mxchange/jcontacts/events/fax/unlinked/AdminFaxNumberUnlinkedEvent.java deleted file mode 100644 index 333282c..0000000 --- a/src/org/mxchange/jcontacts/events/fax/unlinked/AdminFaxNumberUnlinkedEvent.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2016 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.jcontacts.events.fax.unlinked; - -import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; - -/** - * An event when a fax number has been unlinked - *

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

- * @param contact Contact with linked fax instance - * @param unlinkedFaxNumber Unlinked fax number - */ - public AdminFaxNumberUnlinkedEvent (final Contact contact, final DialableFaxNumber unlinkedFaxNumber) { - // Set it here - this.contact = contact; - this.unlinkedFaxNumber = unlinkedFaxNumber; - } - - @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 index 2825730..5ee91d5 100644 --- a/src/org/mxchange/jcontacts/events/fax/unlinked/AdminUnlinkedFaxNumberEvent.java +++ b/src/org/mxchange/jcontacts/events/fax/unlinked/AdminUnlinkedFaxNumberEvent.java @@ -16,29 +16,51 @@ */ 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 + * An event when a fax number has been unlinked *

* @author Roland Häder */ -public interface AdminUnlinkedFaxNumberEvent extends Serializable { +public class AdminUnlinkedFaxNumberEvent implements ObservableAdminUnlinkedFaxNumberEvent { /** - * Getter for unlinked fax numbers - *

- * @return Unlinked fax numbers + * Serial number */ - DialableFaxNumber getUnlinkedFaxNumber (); + private static final long serialVersionUID = 18_521_758_718_691_064L; /** - * Getter for contact instance + * Contact instance + */ + private final Contact contact; + + /** + * Unlinked fax number + */ + private final DialableFaxNumber unlinkedFaxNumber; + + /** + * Constructor with unlinked fax number *

- * @return Contact instance + * @param contact Contact with linked fax instance + * @param unlinkedFaxNumber Unlinked fax number */ - Contact getContact (); + public AdminUnlinkedFaxNumberEvent (final Contact contact, final DialableFaxNumber unlinkedFaxNumber) { + // Set it here + this.contact = contact; + this.unlinkedFaxNumber = unlinkedFaxNumber; + } + + @Override + public Contact getContact () { + return this.contact; + } + + @Override + public DialableFaxNumber getUnlinkedFaxNumber () { + return this.unlinkedFaxNumber; + } } diff --git a/src/org/mxchange/jcontacts/events/fax/unlinked/ObservableAdminUnlinkedFaxNumberEvent.java b/src/org/mxchange/jcontacts/events/fax/unlinked/ObservableAdminUnlinkedFaxNumberEvent.java new file mode 100644 index 0000000..b5bffd1 --- /dev/null +++ b/src/org/mxchange/jcontacts/events/fax/unlinked/ObservableAdminUnlinkedFaxNumberEvent.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2016 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.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 Häder + */ +public interface ObservableAdminUnlinkedFaxNumberEvent extends Serializable { + + /** + * Getter for unlinked fax numbers + *

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

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

- * @author Roland Häder - */ -public class AdminLandLineNumberLinkedEvent implements AdminLinkedLandLineNumberEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 18_521_758_718_691_065L; - - /** - * Contact instance - */ - private final Contact contact; - - /** - * Linked land-line number - */ - private final DialableLandLineNumber linkedLandLineNumber; - - /** - * Constructor with unlinked land-line number - *

- * @param contact Contact with linked land-line instance - * @param linkedLandLineNumber Linked land-line number - */ - public AdminLandLineNumberLinkedEvent (final Contact contact, final DialableLandLineNumber linkedLandLineNumber) { - // Set it here - this.contact = contact; - this.linkedLandLineNumber = linkedLandLineNumber; - } - - @Override - public Contact getContact () { - return this.contact; - } - - @Override - public DialableLandLineNumber getLinkedLandLineNumber () { - return this.linkedLandLineNumber; - } - -} diff --git a/src/org/mxchange/jcontacts/events/landline/linked/AdminLinkedLandLineNumberEvent.java b/src/org/mxchange/jcontacts/events/landline/linked/AdminLinkedLandLineNumberEvent.java index 696d9d8..4eb41fe 100644 --- a/src/org/mxchange/jcontacts/events/landline/linked/AdminLinkedLandLineNumberEvent.java +++ b/src/org/mxchange/jcontacts/events/landline/linked/AdminLinkedLandLineNumberEvent.java @@ -16,30 +16,51 @@ */ package org.mxchange.jcontacts.events.landline.linked; -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 linked with a - * contact + * An event when a land-line number has been linked with a contact *

* @author Roland Häder */ -public interface AdminLinkedLandLineNumberEvent extends Serializable { +public class AdminLinkedLandLineNumberEvent implements ObservableAdminLinkedLandLineNumberEvent { /** - * Getter for linked land-line numbers - *

- * @return Linked land-line numbers + * Serial number */ - DialableLandLineNumber getLinkedLandLineNumber (); + private static final long serialVersionUID = 18_521_758_718_691_065L; /** - * Getter for contact instance + * Contact instance + */ + private final Contact contact; + + /** + * Linked land-line number + */ + private final DialableLandLineNumber linkedLandLineNumber; + + /** + * Constructor with unlinked land-line number *

- * @return Contact instance + * @param contact Contact with linked land-line instance + * @param linkedLandLineNumber Linked land-line number */ - Contact getContact (); + public AdminLinkedLandLineNumberEvent (final Contact contact, final DialableLandLineNumber linkedLandLineNumber) { + // Set it here + this.contact = contact; + this.linkedLandLineNumber = linkedLandLineNumber; + } + + @Override + public Contact getContact () { + return this.contact; + } + + @Override + public DialableLandLineNumber getLinkedLandLineNumber () { + return this.linkedLandLineNumber; + } } diff --git a/src/org/mxchange/jcontacts/events/landline/linked/ObservableAdminLinkedLandLineNumberEvent.java b/src/org/mxchange/jcontacts/events/landline/linked/ObservableAdminLinkedLandLineNumberEvent.java new file mode 100644 index 0000000..5632c35 --- /dev/null +++ b/src/org/mxchange/jcontacts/events/landline/linked/ObservableAdminLinkedLandLineNumberEvent.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2016 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.jcontacts.events.landline.linked; + +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 linked with a + * contact + *

+ * @author Roland Häder + */ +public interface ObservableAdminLinkedLandLineNumberEvent extends Serializable { + + /** + * Getter for linked land-line numbers + *

+ * @return Linked land-line numbers + */ + DialableLandLineNumber getLinkedLandLineNumber (); + + /** + * 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 deleted file mode 100644 index 03bc4b7..0000000 --- a/src/org/mxchange/jcontacts/events/landline/unlinked/AdminLandLineNumberUnlinkedEvent.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2016 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.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 Häder - */ -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 index 99af644..1cfb512 100644 --- a/src/org/mxchange/jcontacts/events/landline/unlinked/AdminUnlinkedLandLineNumberEvent.java +++ b/src/org/mxchange/jcontacts/events/landline/unlinked/AdminUnlinkedLandLineNumberEvent.java @@ -16,29 +16,51 @@ */ 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 + * An event when a land-line number has been unlinked *

* @author Roland Häder */ -public interface AdminUnlinkedLandLineNumberEvent extends Serializable { +public class AdminUnlinkedLandLineNumberEvent implements ObservableAdminUnlinkedLandLineNumberEvent { /** - * Getter for unlinked land-line numbers - *

- * @return Unlinked land-line numbers + * Serial number */ - DialableLandLineNumber getUnlinkedLandLineNumber (); + private static final long serialVersionUID = 18_521_758_718_691_065L; /** - * Getter for contact instance + * Contact instance + */ + private final Contact contact; + + /** + * Unlinked land-line number + */ + private final DialableLandLineNumber unlinkedLandLineNumber; + + /** + * Constructor with unlinked land-line number *

- * @return Contact instance + * @param contact Contact with linked land-line instance + * @param unlinkedLandLineNumber Unlinked land-line number */ - Contact getContact (); + public AdminUnlinkedLandLineNumberEvent (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/ObservableAdminUnlinkedLandLineNumberEvent.java b/src/org/mxchange/jcontacts/events/landline/unlinked/ObservableAdminUnlinkedLandLineNumberEvent.java new file mode 100644 index 0000000..b54a415 --- /dev/null +++ b/src/org/mxchange/jcontacts/events/landline/unlinked/ObservableAdminUnlinkedLandLineNumberEvent.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2016 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.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 Häder + */ +public interface ObservableAdminUnlinkedLandLineNumberEvent extends Serializable { + + /** + * Getter for unlinked land-line numbers + *

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

+ * @return Contact instance + */ + Contact getContact (); + +} diff --git a/src/org/mxchange/jcontacts/events/mobile/linked/AdminLinkedMobileNumberEvent.java b/src/org/mxchange/jcontacts/events/mobile/linked/AdminLinkedMobileNumberEvent.java index fec436b..46e64a4 100644 --- a/src/org/mxchange/jcontacts/events/mobile/linked/AdminLinkedMobileNumberEvent.java +++ b/src/org/mxchange/jcontacts/events/mobile/linked/AdminLinkedMobileNumberEvent.java @@ -16,29 +16,51 @@ */ package org.mxchange.jcontacts.events.mobile.linked; -import java.io.Serializable; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; /** - * An interface for an event when a mobile number has been linked with a contact + * An event when a mobile number has been linked with a contact *

* @author Roland Häder */ -public interface AdminLinkedMobileNumberEvent extends Serializable { +public class AdminLinkedMobileNumberEvent implements ObservableAdminLinkedMobileNumberEvent { /** - * Getter for linked mobile numbers - *

- * @return Linked mobile numbers + * Serial number */ - DialableMobileNumber getLinkedMobileNumber (); + private static final long serialVersionUID = 18_521_758_718_691_064L; /** - * Getter for contact instance + * Contact instance + */ + private final Contact contact; + + /** + * Unlinked mobile number + */ + private final DialableMobileNumber linkedMobileNumber; + + /** + * Constructor with unlinked mobile number *

- * @return Contact instance + * @param contact Contact with linked mobile instance + * @param linkedMobileNumber Linked mobile number */ - Contact getContact (); + public AdminLinkedMobileNumberEvent (final Contact contact, final DialableMobileNumber linkedMobileNumber) { + // Set it here + this.contact = contact; + this.linkedMobileNumber = linkedMobileNumber; + } + + @Override + public Contact getContact () { + return this.contact; + } + + @Override + public DialableMobileNumber getLinkedMobileNumber () { + return this.linkedMobileNumber; + } } diff --git a/src/org/mxchange/jcontacts/events/mobile/linked/AdminMobileNumberLinkedEvent.java b/src/org/mxchange/jcontacts/events/mobile/linked/AdminMobileNumberLinkedEvent.java deleted file mode 100644 index f5bbd39..0000000 --- a/src/org/mxchange/jcontacts/events/mobile/linked/AdminMobileNumberLinkedEvent.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2016 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.jcontacts.events.mobile.linked; - -import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; - -/** - * An event when a mobile number has been linked with a contact - *

- * @author Roland Häder - */ -public class AdminMobileNumberLinkedEvent implements AdminLinkedMobileNumberEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 18_521_758_718_691_064L; - - /** - * Contact instance - */ - private final Contact contact; - - /** - * Unlinked mobile number - */ - private final DialableMobileNumber linkedMobileNumber; - - /** - * Constructor with unlinked mobile number - *

- * @param contact Contact with linked mobile instance - * @param linkedMobileNumber Linked mobile number - */ - public AdminMobileNumberLinkedEvent (final Contact contact, final DialableMobileNumber linkedMobileNumber) { - // Set it here - this.contact = contact; - this.linkedMobileNumber = linkedMobileNumber; - } - - @Override - public Contact getContact () { - return this.contact; - } - - @Override - public DialableMobileNumber getLinkedMobileNumber () { - return this.linkedMobileNumber; - } - -} diff --git a/src/org/mxchange/jcontacts/events/mobile/linked/ObservableAdminLinkedMobileNumberEvent.java b/src/org/mxchange/jcontacts/events/mobile/linked/ObservableAdminLinkedMobileNumberEvent.java new file mode 100644 index 0000000..2d9b6f1 --- /dev/null +++ b/src/org/mxchange/jcontacts/events/mobile/linked/ObservableAdminLinkedMobileNumberEvent.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2016 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.jcontacts.events.mobile.linked; + +import java.io.Serializable; +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; + +/** + * An interface for an event when a mobile number has been linked with a contact + *

+ * @author Roland Häder + */ +public interface ObservableAdminLinkedMobileNumberEvent extends Serializable { + + /** + * Getter for linked mobile numbers + *

+ * @return Linked mobile numbers + */ + DialableMobileNumber getLinkedMobileNumber (); + + /** + * 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 deleted file mode 100644 index 1206039..0000000 --- a/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminMobileNumberUnlinkedEvent.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2016 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.jcontacts.events.mobile.unlinked; - -import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; - -/** - * An event when a mobile number has been unlinked - *

- * @author Roland Häder - */ -public class AdminMobileNumberUnlinkedEvent implements AdminUnlinkedMobileNumberEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 18_521_758_718_691_064L; - - /** - * Contact instance - */ - private final Contact contact; - - /** - * Unlinked mobile number - */ - private final DialableMobileNumber unlinkedMobileNumber; - - /** - * Constructor with unlinked mobile number - *

- * @param contact Contact with linked mobile instance - * @param unlinkedMobileNumber Unlinked mobile number - */ - public AdminMobileNumberUnlinkedEvent (final Contact contact, final DialableMobileNumber unlinkedMobileNumber) { - // Set it here - this.contact = contact; - this.unlinkedMobileNumber = unlinkedMobileNumber; - } - - @Override - public Contact getContact () { - return this.contact; - } - - @Override - 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 a8f7a3e..628fb6a 100644 --- a/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminUnlinkedMobileNumberEvent.java +++ b/src/org/mxchange/jcontacts/events/mobile/unlinked/AdminUnlinkedMobileNumberEvent.java @@ -16,29 +16,51 @@ */ package org.mxchange.jcontacts.events.mobile.unlinked; -import java.io.Serializable; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; /** - * An interface for an event when a mobile number has been unlinked + * An event when a mobile number has been unlinked *

* @author Roland Häder */ -public interface AdminUnlinkedMobileNumberEvent extends Serializable { +public class AdminUnlinkedMobileNumberEvent implements ObservableAdminUnlinkedMobileNumberEvent { /** - * Getter for unlinked mobile numbers - *

- * @return Unlinked mobile numbers + * Serial number */ - DialableMobileNumber getUnlinkedMobileNumber (); + private static final long serialVersionUID = 18_521_758_718_691_064L; /** - * Getter for contact instance + * Contact instance + */ + private final Contact contact; + + /** + * Unlinked mobile number + */ + private final DialableMobileNumber unlinkedMobileNumber; + + /** + * Constructor with unlinked mobile number *

- * @return Contact instance + * @param contact Contact with linked mobile instance + * @param unlinkedMobileNumber Unlinked mobile number */ - Contact getContact (); + public AdminUnlinkedMobileNumberEvent (final Contact contact, final DialableMobileNumber unlinkedMobileNumber) { + // Set it here + this.contact = contact; + this.unlinkedMobileNumber = unlinkedMobileNumber; + } + + @Override + public Contact getContact () { + return this.contact; + } + + @Override + public DialableMobileNumber getUnlinkedMobileNumber () { + return this.unlinkedMobileNumber; + } } diff --git a/src/org/mxchange/jcontacts/events/mobile/unlinked/ObservableAdminUnlinkedMobileNumberEvent.java b/src/org/mxchange/jcontacts/events/mobile/unlinked/ObservableAdminUnlinkedMobileNumberEvent.java new file mode 100644 index 0000000..01dbb92 --- /dev/null +++ b/src/org/mxchange/jcontacts/events/mobile/unlinked/ObservableAdminUnlinkedMobileNumberEvent.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2016 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.jcontacts.events.mobile.unlinked; + +import java.io.Serializable; +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; + +/** + * An interface for an event when a mobile number has been unlinked + *

+ * @author Roland Häder + */ +public interface ObservableAdminUnlinkedMobileNumberEvent extends Serializable { + + /** + * Getter for unlinked mobile numbers + *

+ * @return Unlinked mobile numbers + */ + DialableMobileNumber getUnlinkedMobileNumber (); + + /** + * Getter for contact instance + *

+ * @return Contact instance + */ + Contact getContact (); + +}