]> git.mxchange.org Git - addressbook-war.git/blobdiff - src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestController.java
Continued with contacts:
[addressbook-war.git] / src / java / org / mxchange / addressbook / beans / contact / AddressbookAdminContactWebRequestController.java
index 6de461bafc6dc97bd2f2584c205eac98000d3f9f..4719ac8b1b1b45458591c7ad41e4998428ef4b23 100644 (file)
@@ -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.
+        * <p>
+        * @return Redirect outcome
+        */
+       String addContact ();
+
+       /**
+        * Returns a list of all found contacts
+        * <p>
+        * @return A list of all contacts.
+        */
+       List<Contact> allContacts ();
+
+       /**
+        * Checks whether there are contacts.
+        * <p>
+        * @return Whether contacts are there
+        */
+       boolean hasContacts ();
+
+       /**
+        * Creates an instance from contact data
+        * <p>
+        * @return New contact instance
+        */
+       Contact createContactInstance ();
+
        /**
         * Copies given contact's data to this controller
         * <p>
@@ -37,6 +67,13 @@ public interface AddressbookAdminContactWebRequestController extends Serializabl
         */
        void copyContactToController (final Contact contact);
 
+       /**
+        * Edits cuirrently loaded contact's data in database.
+        * <p>
+        * @return Redirect outcome
+        */
+       String editContactData ();
+
        /**
         * Getter for cellphone id
         * <p>