X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Addressbook%2Fsrc%2Forg%2Fmxchange%2Faddressbook%2FBaseFrameworkSystem.java;h=b104090c5ba9f218fe1c7bd0f44a98097777af44;hb=8b901b209e8b4d330d8bc9ae2a78c121d1110c2e;hp=6a249ec7bfea18b76a06bb7508c018aea8c66cfd;hpb=27f135983830bf9fc71b909db6c0fb97c618fccc;p=jfinancials-swing.git
diff --git a/Addressbook/src/org/mxchange/addressbook/BaseFrameworkSystem.java b/Addressbook/src/org/mxchange/addressbook/BaseFrameworkSystem.java
index 6a249ec..b104090 100644
--- a/Addressbook/src/org/mxchange/addressbook/BaseFrameworkSystem.java
+++ b/Addressbook/src/org/mxchange/addressbook/BaseFrameworkSystem.java
@@ -1,149 +1,180 @@
-/*
- * Copyright (C) 2015 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.mxchange.addressbook;
-
-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.ManageableContact;
-
-/**
- * General class
- *
- * @author Roland Haeder
- */
-public class BaseFrameworkSystem implements FrameworkInterface {
- /**
- * Class' logger
- */
- private final Logger LOG;
-
- /**
- * Application instance
- */
- private Application application;
-
- /**
- * Client instance
- */
- private Client client;
-
- /**
- * Contact manager instance
- */
- private ManageableContact contactManager;
-
- /**
- * Name of used database table, handled over to backend
- */
- private String tableName;
-
- /**
- * Initialize object
- */
- {
- LOG = LogManager.getLogger(this);
- }
-
- /**
- * No instances can be created of this class
- */
- protected BaseFrameworkSystem () {
- }
-
- /**
- * Application instance
- *
- * @return the application
- */
- @Override
- public final Application getApplication () {
- return this.application;
- }
-
- /**
- * Client instance
- *
- * @return the client
- */
- @Override
- public final Client getClient () {
- return this.client;
- }
-
- /**
- * Contact manager instance
- * @return the contactManager
- */
- @Override
- public final ManageableContact getContactManager () {
- return this.contactManager;
- }
-
- /**
- * Contact manager instance
- * @param contactManager the contactManager to set
- */
- protected final void setContactManager (final ManageableContact contactManager) {
- this.contactManager = contactManager;
- }
-
- /**
- * Client instance
- * @param client the client to set
- */
- protected final void setClient (final Client client) {
- this.client = client;
- }
-
- /**
- * Application instance
- *
- * @param application the application to set
- */
- protected final void setApplication(final Application application) {
- this.application = application;
- }
-
- /**
- * Getter for logger
- *
- * @return Logger
- */
- protected final Logger getLogger () {
- return this.LOG;
- }
-
- /**
- * Name of used database table, handled over to backend
- *
- * @return the tableName
- */
- protected final String getTableName () {
- return this.tableName;
- }
-
- /**
- * Name of used database table, handled over to backend
- *
- * @param tableName the tableName to set
- */
- protected final void setTableName (final String tableName) {
- this.tableName = tableName;
- }
-}
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+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.ManageableContact;
+
+/**
+ * General class
+ *
+ * @author Roland Haeder
+ */
+public class BaseFrameworkSystem implements FrameworkInterface {
+
+ /**
+ * Class' logger
+ */
+ private final Logger LOG;
+
+ /**
+ * Application instance
+ */
+ private Application application;
+
+ /**
+ * Bundle instance
+ */
+ private final ResourceBundle bundle;
+
+ /**
+ * Client instance
+ */
+ private Client client;
+
+ /**
+ * Contact manager instance
+ */
+ private ManageableContact contactManager;
+
+ /**
+ * Name of used database table, handled over to backend
+ */
+ private String tableName;
+
+ /**
+ * Initialize object
+ */
+ {
+ LOG = LogManager.getLogger(this);
+ bundle = ResourceBundle.getBundle("org/mxchange/addressbook/localization/bundle"); // NOI18N
+ }
+
+ /**
+ * No instances can be created of this class
+ */
+ protected BaseFrameworkSystem () {
+ }
+
+ /**
+ * Application instance
+ *
+ * @return the application
+ */
+ @Override
+ public final Application getApplication () {
+ return this.application;
+ }
+
+ /**
+ * Client instance
+ *
+ * @return the client
+ */
+ @Override
+ public final Client getClient () {
+ return this.client;
+ }
+
+ /**
+ * Contact manager instance
+ *
+ * @return the contactManager
+ */
+ @Override
+ public final ManageableContact getContactManager () {
+ return this.contactManager;
+ }
+
+ /**
+ * Contact manager instance
+ *
+ * @param contactManager the contactManager to set
+ */
+ protected final void setContactManager (final ManageableContact contactManager) {
+ this.contactManager = contactManager;
+ }
+
+ /**
+ * Client instance
+ *
+ * @param client the client to set
+ */
+ protected final void setClient (final Client client) {
+ this.client = client;
+ }
+
+ /**
+ * Application instance
+ *
+ * @param application the application to set
+ */
+ protected final void setApplication (final Application application) {
+ this.application = application;
+ }
+
+ /**
+ * Getter for bundle instance
+ *
+ * @return Resource bundle
+ */
+ protected final ResourceBundle getBundle () {
+ return this.bundle;
+ }
+
+ /**
+ * Getter for logger
+ *
+ * @return Logger
+ */
+ protected final Logger getLogger () {
+ return this.LOG;
+ }
+
+ /**
+ * Name of used database table, handled over to backend
+ *
+ * @return the tableName
+ */
+ protected final String getTableName () {
+ return this.tableName;
+ }
+
+ /**
+ * Name of used database table, handled over to backend
+ *
+ * @param tableName the tableName to set
+ */
+ protected final void setTableName (final String tableName) {
+ this.tableName = tableName;
+ }
+
+ /**
+ * Getter for human-readable string from given key
+ *
+ * @param key Key to return
+ * @return Human-readable message
+ */
+ public final String getMessageStringFromKey (final String key) {
+ // Return message
+ return this.getBundle().getString(key);
+ }
+}