import java.util.HashMap;
import java.util.Map;
import org.mxchange.addressbook.manager.contact.AddressbookContactManager;
+import org.mxchange.addressbook.manager.contact.ManageableAddressbookContact;
import org.mxchange.addressbook.menu.Menu;
import org.mxchange.jcore.client.BaseClient;
import org.mxchange.jcore.client.Client;
-import org.mxchange.jcore.manager.database.ManageableDatabase;
/**
* A general addressbook client
*
* @author Roland Haeder
*/
-public abstract class BaseAddressbookClient extends BaseClient {
+public abstract class BaseAddressbookClient extends BaseClient implements AddressbookClient {
/**
* Current menu choice
return this.currentMenu;
}
- /**
- * Current menu choice
- *
- * @param currentMenu the currentMenu to set
- */
+ @Override
public final void setCurrentMenu (final String currentMenu) {
this.currentMenu = currentMenu;
}
/**
* Initializes contact manager
+ *
* @throws java.sql.SQLException If any SQL error occurs
*/
protected void initContactManager () throws SQLException {
// Trace message
this.getLogger().trace("CALLED!"); //NOI18N
-
+
// Debug message
this.getLogger().debug("Initializing contact manager ..."); //NOI18N
-
+
// Init contact manager with console client
// TODO Static initial amount of contacts
- ManageableDatabase manager = new AddressbookContactManager((Client) this);
-
+ ManageableAddressbookContact manager = new AddressbookContactManager((Client) this);
+
// Set it here
this.setContactManager(manager);
-
+
// Debug message
this.getLogger().debug("Contact manager has been initialized."); //NOI18N
-
+
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
}
import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
import org.mxchange.jcore.contact.Contact;
import org.mxchange.jcore.contact.gender.Gender;
-import org.mxchange.jcore.manager.database.ManageableDatabase;
+import org.mxchange.jcore.manager.Manageable;
/**
*
* @author Roland Haeder
*/
-public interface ManageableAddressbookContact extends ManageableDatabase {
+public interface ManageableAddressbookContact extends Manageable {
/**
* Allows the user to enter own cellphone number.
*