-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-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.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface AdminAddedContactEvent extends Serializable {
-
- /**
- * Getter for added contact instance
- * <p>
- * @return Added contact instance
- */
- Contact getAddedContact ();
-
-}
+/*\r
+ * Copyright (C) 2016 Roland Häder\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+package org.mxchange.jcontacts.events.contact.add;\r
+\r
+import java.text.MessageFormat;\r
+import org.mxchange.jcontacts.contact.Contact;\r
+\r
+/**\r
+ * An event being fired when the administrator has added a new user account\r
+ * <p>\r
+ * @author Roland Häder<roland@mxchange.org>\r
+ */\r
+public class AdminAddedContactEvent implements ObservableAdminAddedContactEvent {\r
+\r
+ /**\r
+ * Serial number\r
+ */\r
+ private static final long serialVersionUID = 14_785_787_174_676_290L;\r
+\r
+ /**\r
+ * Added contact instance\r
+ */\r
+ private final Contact addedContact;\r
+\r
+ /**\r
+ * Constructor with added contact instance\r
+ * <p>\r
+ * @param addedContact Added contact instance\r
+ */\r
+ public AdminAddedContactEvent (final Contact addedContact) {\r
+ // Is the contact instance valid?\r
+ if (null == addedContact) {\r
+ // Throw NPE\r
+ throw new NullPointerException("addedContact is null"); //NOI18N\r
+ } else if (addedContact.getContactId() == null) {\r
+ // Throw NPE again\r
+ throw new NullPointerException("addedContact.contactId is null"); //NOI18N\r
+ } else if (addedContact.getContactId() < 1) {\r
+ // Invalid id number\r
+ throw new IllegalArgumentException(MessageFormat.format("addedContact.contactId={0} is invalid.", addedContact.getContactId())); //NOI18N\r
+ }\r
+\r
+ // Set it here\r
+ this.addedContact = addedContact;\r
+ }\r
+\r
+ @Override\r
+ public Contact getAddedContact () {\r
+ return this.addedContact;\r
+ }\r
+\r
+}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2016 Roland Häder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.jcontacts.events.contact.add;\r
-\r
-import java.text.MessageFormat;\r
-import org.mxchange.jcontacts.contact.Contact;\r
-\r
-/**\r
- * An event being fired when the administrator has added a new user account\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-public class AdminContactAddedEvent implements AdminAddedContactEvent {\r
-\r
- /**\r
- * Serial number\r
- */\r
- private static final long serialVersionUID = 14_785_787_174_676_290L;\r
-\r
- /**\r
- * Added contact instance\r
- */\r
- private final Contact addedContact;\r
-\r
- /**\r
- * Constructor with added contact instance\r
- * <p>\r
- * @param addedContact Added contact instance\r
- */\r
- public AdminContactAddedEvent (final Contact addedContact) {\r
- // Is the contact instance valid?\r
- if (null == addedContact) {\r
- // Throw NPE\r
- throw new NullPointerException("addedContact is null"); //NOI18N\r
- } else if (addedContact.getContactId() == null) {\r
- // Throw NPE again\r
- throw new NullPointerException("addedContact.contactId is null"); //NOI18N\r
- } else if (addedContact.getContactId() < 1) {\r
- // Invalid id number\r
- throw new IllegalArgumentException(MessageFormat.format("addedContact.contactId={0} is invalid.", addedContact.getContactId())); //NOI18N\r
- }\r
-\r
- // Set it here\r
- this.addedContact = addedContact;\r
- }\r
-\r
- @Override\r
- public Contact getAddedContact () {\r
- return this.addedContact;\r
- }\r
-\r
-}\r
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminAddedContactEvent extends Serializable {
+
+ /**
+ * Getter for added contact instance
+ * <p>
+ * @return Added contact instance
+ */
+ Contact getAddedContact ();
+
+}
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-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
- * <p>
- * @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;
- }
-
-}
*/
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
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-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
* <p>
- * @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;
+ }
}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminDeletedContactEvent extends Serializable {
+
+ /**
+ * Getter for deleted contact instance
+ * <p>
+ * @return Deleted contact instance
+ */
+ Contact getDeletedContact ();
+
+}
+++ /dev/null
-/*\r
- * Copyright (C) 2016 Roland Häder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.jcontacts.events.contact.update;\r
-\r
-import java.text.MessageFormat;\r
-import org.mxchange.jcontacts.contact.Contact;\r
-\r
-/**\r
- * An event being fired when the administrator has updated a new user account\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-public class AdminContactUpdatedEvent implements AdminUpdatedContactEvent {\r
-\r
- /**\r
- * Serial number\r
- */\r
- private static final long serialVersionUID = 185_381_945_234_802L;\r
-\r
- /**\r
- * Updated contact instance\r
- */\r
- private final Contact updatedContact;\r
-\r
- /**\r
- * Constructor with updated contact instance\r
- * <p>\r
- * @param updatedContact Updated contact instance\r
- */\r
- public AdminContactUpdatedEvent (final Contact updatedContact) {\r
- // Is the contact instance valid?\r
- if (null == updatedContact) {\r
- // Throw NPE\r
- throw new NullPointerException("updatedContact is null"); //NOI18N\r
- } else if (updatedContact.getContactId() == null) {\r
- // Throw NPE again\r
- throw new NullPointerException("updatedContact.contactId is null"); //NOI18N\r
- } else if (updatedContact.getContactId() < 1) {\r
- // Invalid id number\r
- throw new IllegalArgumentException(MessageFormat.format("updatedContact.contactId={0} is invalid.", updatedContact.getContactId())); //NOI18N\r
- }\r
-\r
- // Set it here\r
- this.updatedContact = updatedContact;\r
- }\r
-\r
- @Override\r
- public Contact getUpdatedContact () {\r
- return this.updatedContact;\r
- }\r
-\r
-}\r
*/\r
package org.mxchange.jcontacts.events.contact.update;\r
\r
-import java.io.Serializable;\r
+import java.text.MessageFormat;\r
import org.mxchange.jcontacts.contact.Contact;\r
\r
/**\r
- * An interface for events being fired when an administrator updated a new user\r
- * account.\r
+ * An event being fired when the administrator has updated a new user account\r
* <p>\r
* @author Roland Häder<roland@mxchange.org>\r
*/\r
-public interface AdminUpdatedContactEvent extends Serializable {\r
+public class AdminUpdatedContactEvent implements ObservableAdminUpdatedContactEvent {\r
\r
/**\r
- * Getter for updated contact instance\r
+ * Serial number\r
+ */\r
+ private static final long serialVersionUID = 185_381_945_234_802L;\r
+\r
+ /**\r
+ * Updated contact instance\r
+ */\r
+ private final Contact updatedContact;\r
+\r
+ /**\r
+ * Constructor with updated contact instance\r
* <p>\r
- * @return Updated contact instance\r
+ * @param updatedContact Updated contact instance\r
*/\r
- Contact getUpdatedContact ();\r
+ public AdminUpdatedContactEvent (final Contact updatedContact) {\r
+ // Is the contact instance valid?\r
+ if (null == updatedContact) {\r
+ // Throw NPE\r
+ throw new NullPointerException("updatedContact is null"); //NOI18N\r
+ } else if (updatedContact.getContactId() == null) {\r
+ // Throw NPE again\r
+ throw new NullPointerException("updatedContact.contactId is null"); //NOI18N\r
+ } else if (updatedContact.getContactId() < 1) {\r
+ // Invalid id number\r
+ throw new IllegalArgumentException(MessageFormat.format("updatedContact.contactId={0} is invalid.", updatedContact.getContactId())); //NOI18N\r
+ }\r
+\r
+ // Set it here\r
+ this.updatedContact = updatedContact;\r
+ }\r
+\r
+ @Override\r
+ public Contact getUpdatedContact () {\r
+ return this.updatedContact;\r
+ }\r
\r
}\r
--- /dev/null
+/*\r
+ * Copyright (C) 2016 Roland Häder\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+package org.mxchange.jcontacts.events.contact.update;\r
+\r
+import java.io.Serializable;\r
+import org.mxchange.jcontacts.contact.Contact;\r
+\r
+/**\r
+ * An interface for events being fired when an administrator updated a new user\r
+ * account.\r
+ * <p>\r
+ * @author Roland Häder<roland@mxchange.org>\r
+ */\r
+public interface ObservableAdminUpdatedContactEvent extends Serializable {\r
+\r
+ /**\r
+ * Getter for updated contact instance\r
+ * <p>\r
+ * @return Updated contact instance\r
+ */\r
+ Contact getUpdatedContact ();\r
+\r
+}\r
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-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
- * <p>
- * @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;
- }
-
-}
*/
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
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminLinkedFaxNumberEvent extends Serializable {
+public class AdminLinkedFaxNumberEvent implements ObservableAdminLinkedFaxNumberEvent {
/**
- * Getter for linked fax numbers
- * <p>
- * @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
* <p>
- * @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;
+ }
}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminLinkedFaxNumberEvent extends Serializable {
+
+ /**
+ * Getter for linked fax numbers
+ * <p>
+ * @return Linked fax numbers
+ */
+ DialableFaxNumber getLinkedFaxNumber ();
+
+ /**
+ * Getter for contact instance
+ * <p>
+ * @return Contact instance
+ */
+ Contact getContact ();
+
+}
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-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
- * <p>
- * @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;
- }
-
-}
*/
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
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminUnlinkedFaxNumberEvent extends Serializable {
+public class AdminUnlinkedFaxNumberEvent implements ObservableAdminUnlinkedFaxNumberEvent {
/**
- * Getter for unlinked fax numbers
- * <p>
- * @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
* <p>
- * @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;
+ }
}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminUnlinkedFaxNumberEvent extends Serializable {
+
+ /**
+ * Getter for unlinked fax numbers
+ * <p>
+ * @return Unlinked fax numbers
+ */
+ DialableFaxNumber getUnlinkedFaxNumber ();
+
+ /**
+ * Getter for contact instance
+ * <p>
+ * @return Contact instance
+ */
+ Contact getContact ();
+
+}
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-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
- * <p>
- * @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;
- }
-
-}
*/
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
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminLinkedLandLineNumberEvent extends Serializable {
+public class AdminLinkedLandLineNumberEvent implements ObservableAdminLinkedLandLineNumberEvent {
/**
- * Getter for linked land-line numbers
- * <p>
- * @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
* <p>
- * @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;
+ }
}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminLinkedLandLineNumberEvent extends Serializable {
+
+ /**
+ * Getter for linked land-line numbers
+ * <p>
+ * @return Linked land-line numbers
+ */
+ DialableLandLineNumber getLinkedLandLineNumber ();
+
+ /**
+ * Getter for contact instance
+ * <p>
+ * @return Contact instance
+ */
+ Contact getContact ();
+
+}
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-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
- * <p>
- * @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;
- }
-
-}
*/
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
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminUnlinkedLandLineNumberEvent extends Serializable {
+public class AdminUnlinkedLandLineNumberEvent implements ObservableAdminUnlinkedLandLineNumberEvent {
/**
- * Getter for unlinked land-line numbers
- * <p>
- * @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
* <p>
- * @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;
+ }
}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminUnlinkedLandLineNumberEvent extends Serializable {
+
+ /**
+ * Getter for unlinked land-line numbers
+ * <p>
+ * @return Unlinked land-line numbers
+ */
+ DialableLandLineNumber getUnlinkedLandLineNumber ();
+
+ /**
+ * Getter for contact instance
+ * <p>
+ * @return Contact instance
+ */
+ Contact getContact ();
+
+}
*/
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
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminLinkedMobileNumberEvent extends Serializable {
+public class AdminLinkedMobileNumberEvent implements ObservableAdminLinkedMobileNumberEvent {
/**
- * Getter for linked mobile numbers
- * <p>
- * @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
* <p>
- * @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;
+ }
}
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-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
- * <p>
- * @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;
- }
-
-}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminLinkedMobileNumberEvent extends Serializable {
+
+ /**
+ * Getter for linked mobile numbers
+ * <p>
+ * @return Linked mobile numbers
+ */
+ DialableMobileNumber getLinkedMobileNumber ();
+
+ /**
+ * Getter for contact instance
+ * <p>
+ * @return Contact instance
+ */
+ Contact getContact ();
+
+}
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-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
- * <p>
- * @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;
- }
-
-}
*/
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
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminUnlinkedMobileNumberEvent extends Serializable {
+public class AdminUnlinkedMobileNumberEvent implements ObservableAdminUnlinkedMobileNumberEvent {
/**
- * Getter for unlinked mobile numbers
- * <p>
- * @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
* <p>
- * @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;
+ }
}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminUnlinkedMobileNumberEvent extends Serializable {
+
+ /**
+ * Getter for unlinked mobile numbers
+ * <p>
+ * @return Unlinked mobile numbers
+ */
+ DialableMobileNumber getUnlinkedMobileNumber ();
+
+ /**
+ * Getter for contact instance
+ * <p>
+ * @return Contact instance
+ */
+ Contact getContact ();
+
+}