X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Addressbook%2Fsrc%2Forg%2Fmxchange%2Faddressbook%2FBaseFrameworkSystem.java;h=e34fe66653fe414a4a6a47261663de483bb2e6e2;hb=00c8762778cdc63923406bb356f3c922326a8030;hp=d922a491926f56345c892fa7696e0ba8d19a9c88;hpb=e92fd10e2b96699c4421caf64d1db53cfd5e3524;p=jaddressbook-lib.git diff --git a/Addressbook/src/org/mxchange/addressbook/BaseFrameworkSystem.java b/Addressbook/src/org/mxchange/addressbook/BaseFrameworkSystem.java index d922a491..e34fe666 100644 --- a/Addressbook/src/org/mxchange/addressbook/BaseFrameworkSystem.java +++ b/Addressbook/src/org/mxchange/addressbook/BaseFrameworkSystem.java @@ -16,11 +16,11 @@ */ package org.mxchange.addressbook; +import java.util.ResourceBundle; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.mxchange.addressbook.application.Application; import org.mxchange.addressbook.client.Client; -import org.mxchange.addressbook.manager.contact.ContactManager; import org.mxchange.addressbook.manager.contact.ManageableContact; /** @@ -54,11 +54,17 @@ public class BaseFrameworkSystem implements FrameworkInterface { */ private String tableName; + /** + * Bundle instance + */ + private final ResourceBundle bundle; + /** * Initialize object */ { LOG = LogManager.getLogger(this); + bundle = ResourceBundle.getBundle("org/mxchange/addressbook/localization/bundle"); // NOI18N } /** @@ -73,7 +79,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { * @return the application */ @Override - public Application getApplication () { + public final Application getApplication () { return this.application; } @@ -83,7 +89,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { * @return the client */ @Override - public Client getClient () { + public final Client getClient () { return this.client; } @@ -92,7 +98,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { * @return the contactManager */ @Override - public ManageableContact getContactManager () { + public final ManageableContact getContactManager () { return this.contactManager; } @@ -100,7 +106,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { * Contact manager instance * @param contactManager the contactManager to set */ - protected void setContactManager (final ManageableContact contactManager) { + protected final void setContactManager (final ManageableContact contactManager) { this.contactManager = contactManager; } @@ -108,7 +114,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { * Client instance * @param client the client to set */ - protected void setClient (final Client client) { + protected final void setClient (final Client client) { this.client = client; } @@ -117,7 +123,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { * * @param application the application to set */ - protected void setApplication(final Application application) { + protected final void setApplication(final Application application) { this.application = application; } @@ -126,7 +132,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { * * @return Logger */ - protected Logger getLogger () { + protected final Logger getLogger () { return this.LOG; } @@ -135,7 +141,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { * * @return the tableName */ - protected String getTableName () { + protected final String getTableName () { return this.tableName; } @@ -144,27 +150,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { * * @param tableName the tableName to set */ - protected void setTableName (final String tableName) { + protected final void setTableName (final String tableName) { this.tableName = tableName; } - - /** - * Initializes contact manager - * - * @param client Client instance - */ - protected void initContactManager (final Client client) { - // Debug message - this.getLogger().debug("Initializing contact manager ..."); - - // Init contact manager with console client - // @TODO Static initial amount of contacts - ManageableContact manager = new ContactManager (100, client); - - // Set it here - this.setContactManager(manager); - - // Debug message - this.getLogger().debug("Contact manager has been initialized."); - } }