From: Roland Haeder Date: Fri, 4 Sep 2015 17:21:27 +0000 (+0200) Subject: More cleanups X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=64188035785ab61b6eb5d549727bbcdec881b5e5;p=jbonuscard-lib.git More cleanups Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/addressbook/client/BaseAddressbookClient.java b/src/org/mxchange/addressbook/client/BaseAddressbookClient.java index 3c5a8f6..35cbab9 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 dccb8af..0847401 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. *