From 64188035785ab61b6eb5d549727bbcdec881b5e5 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 4 Sep 2015 19:21:27 +0200 Subject: [PATCH] =?utf8?q?More=20cleanups=20Signed-off-by:Roland=20H=C3=A4?= =?utf8?q?der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../client/BaseAddressbookClient.java | 23 ++++++++----------- .../contact/ManageableAddressbookContact.java | 4 ++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/org/mxchange/addressbook/client/BaseAddressbookClient.java b/src/org/mxchange/addressbook/client/BaseAddressbookClient.java index 3c5a8f61..35cbab99 100644 --- a/src/org/mxchange/addressbook/client/BaseAddressbookClient.java +++ b/src/org/mxchange/addressbook/client/BaseAddressbookClient.java @@ -21,17 +21,17 @@ import java.text.MessageFormat; 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 @@ -60,11 +60,7 @@ public abstract class BaseAddressbookClient extends BaseClient { return this.currentMenu; } - /** - * Current menu choice - * - * @param currentMenu the currentMenu to set - */ + @Override public final void setCurrentMenu (final String currentMenu) { this.currentMenu = currentMenu; } @@ -105,25 +101,26 @@ public abstract class BaseAddressbookClient extends BaseClient { /** * 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 } diff --git a/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java b/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java index dccb8af7..08474017 100644 --- a/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java +++ b/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java @@ -22,13 +22,13 @@ import java.sql.SQLException; 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. * -- 2.39.5