]> git.mxchange.org Git - jfinancials-swing.git/blob - Addressbook/src/org/mxchange/addressbook/BaseFrameworkSystem.java
Added initial Swing frame class (Netbeans) and moved method initContactManager()...
[jfinancials-swing.git] / Addressbook / src / org / mxchange / addressbook / BaseFrameworkSystem.java
1 /*\r
2  * Copyright (C) 2015 Roland Haeder\r
3  *\r
4  * This program is free software: you can redistribute it and/or modify\r
5  * it under the terms of the GNU General Public License as published by\r
6  * the Free Software Foundation, either version 3 of the License, or\r
7  * (at your option) any later version.\r
8  *\r
9  * This program is distributed in the hope that it will be useful,\r
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
12  * GNU General Public License for more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License\r
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
16  */\r
17 package org.mxchange.addressbook;\r
18 \r
19 import org.apache.logging.log4j.LogManager;\r
20 import org.apache.logging.log4j.Logger;\r
21 import org.mxchange.addressbook.application.Application;\r
22 import org.mxchange.addressbook.client.Client;\r
23 import org.mxchange.addressbook.manager.contact.ManageableContact;\r
24 \r
25 /**\r
26  * General class\r
27  *\r
28  * @author Roland Haeder\r
29  */\r
30 public class BaseFrameworkSystem implements FrameworkInterface {\r
31     /**\r
32      * Class' logger\r
33      */\r
34     private final Logger LOG;\r
35 \r
36     /**\r
37      * Application instance\r
38      */\r
39     private Application application;\r
40 \r
41     /**\r
42      * Client instance\r
43      */\r
44     private Client client;\r
45 \r
46     /**\r
47      * Contact manager instance\r
48      */\r
49     private ManageableContact contactManager;\r
50 \r
51     /**\r
52      * Name of used database table, handled over to backend\r
53      */\r
54     private String tableName;\r
55 \r
56     /**\r
57      * Initialize object\r
58      */\r
59     {\r
60         LOG = LogManager.getLogger(this);\r
61     }\r
62 \r
63     /**\r
64      * No instances can be created of this class\r
65      */\r
66     protected BaseFrameworkSystem () {\r
67     }\r
68 \r
69     /**\r
70      * Application instance\r
71      * \r
72      * @return the application\r
73      */\r
74     @Override\r
75     public final Application getApplication () {\r
76         return this.application;\r
77     }\r
78 \r
79     /**\r
80      * Client instance\r
81      * \r
82      * @return the client\r
83      */\r
84     @Override\r
85     public final Client getClient () {\r
86         return this.client;\r
87     }\r
88 \r
89     /**\r
90      * Contact manager instance\r
91      * @return the contactManager\r
92      */\r
93     @Override\r
94     public final ManageableContact getContactManager () {\r
95         return this.contactManager;\r
96     }\r
97 \r
98     /**\r
99      * Contact manager instance\r
100      * @param contactManager the contactManager to set\r
101      */\r
102     protected final void setContactManager (final ManageableContact contactManager) {\r
103         this.contactManager = contactManager;\r
104     }\r
105 \r
106     /**\r
107      * Client instance\r
108      * @param client the client to set\r
109      */\r
110     protected final void setClient (final Client client) {\r
111         this.client = client;\r
112     }\r
113 \r
114     /**\r
115      * Application instance\r
116      *\r
117      * @param application the application to set\r
118      */\r
119     protected final void setApplication(final Application application) {\r
120         this.application = application;\r
121     }\r
122 \r
123     /**\r
124      * Getter for logger\r
125      *\r
126      * @return Logger\r
127      */\r
128     protected final Logger getLogger () {\r
129         return this.LOG;\r
130     }\r
131 \r
132     /**\r
133      * Name of used database table, handled over to backend\r
134      * \r
135      * @return the tableName\r
136      */\r
137     protected final String getTableName () {\r
138         return this.tableName;\r
139     }\r
140 \r
141     /**\r
142      * Name of used database table, handled over to backend\r
143      * \r
144      * @param tableName the tableName to set\r
145      */\r
146     protected final void setTableName (final String tableName) {\r
147         this.tableName = tableName;\r
148     }\r
149 }\r