X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fmxchange%2Faddressbook%2Fbeans%2Fcontact%2FAddressbookAdminContactWebRequestController.java;h=4719ac8b1b1b45458591c7ad41e4998428ef4b23;hb=7abae57def5bdb50755032cd4679120960ef01f8;hp=6de461bafc6dc97bd2f2584c205eac98000d3f9f;hpb=40cf0f2db369bb62d6e860dc1a1bdff820afc776;p=addressbook-war.git diff --git a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestController.java b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestController.java index 6de461ba..4719ac8b 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestController.java +++ b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestController.java @@ -18,6 +18,7 @@ package org.mxchange.addressbook.beans.contact; import java.io.Serializable; import java.util.Date; +import java.util.List; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcountry.data.Country; @@ -30,6 +31,35 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; */ public interface AddressbookAdminContactWebRequestController extends Serializable { + /** + * Adds contact data to database and redirects on success. If the contact is + * already found, a proper exception is thrown. + *

+ * @return Redirect outcome + */ + String addContact (); + + /** + * Returns a list of all found contacts + *

+ * @return A list of all contacts. + */ + List allContacts (); + + /** + * Checks whether there are contacts. + *

+ * @return Whether contacts are there + */ + boolean hasContacts (); + + /** + * Creates an instance from contact data + *

+ * @return New contact instance + */ + Contact createContactInstance (); + /** * Copies given contact's data to this controller *

@@ -37,6 +67,13 @@ public interface AddressbookAdminContactWebRequestController extends Serializabl */ void copyContactToController (final Contact contact); + /** + * Edits cuirrently loaded contact's data in database. + *

+ * @return Redirect outcome + */ + String editContactData (); + /** * Getter for cellphone id *