]> git.mxchange.org Git - jcore.git/blob - src/org/mxchange/jcore/FrameworkInterface.java
Added doShutdown()
[jcore.git] / src / org / mxchange / jcore / FrameworkInterface.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jcore;
18
19 import org.apache.logging.log4j.Logger;
20 import org.mxchange.jcore.application.Application;
21 import org.mxchange.jcore.client.Client;
22 import org.mxchange.jcore.manager.Manageable;
23
24 /**
25  * A general interface which should be always expanded
26  *
27  * @author Roland Haeder
28  */
29 public interface FrameworkInterface {
30         /**
31          * File name (and path) for internalization bundle
32          */
33         public static final String I18N_BUNDLE_FILE = "org/mxchange/localization/bundle";
34
35         /*
36          * Properties file name
37          */
38         public static final String PROPERTIES_CONFIG_FILE = "config.properties";
39
40         /**
41          * Getter for manager
42          *
43          * @return Manager instance
44          */
45         public Manageable getManager ();
46
47         /**
48          * Client instance
49          *
50          * @return the client
51          */
52         public Client getClient ();
53
54         /**
55          * Getter for logger
56          *
57          * @return Logger
58          */
59         public Logger getLogger ();
60
61         /**
62          * Application instance
63          *
64          * @return the application
65          */
66         public Application getApplication ();
67
68         /**
69          * Getter for human-readable string from given key
70          *
71          * @param key Key to return
72          * @return Human-readable message
73          */
74         public String getMessageStringFromKey (final String key);
75
76         /**
77          * Logs given exception
78          *
79          * @param exception Exception to log
80          */
81         public void logException (final Throwable exception);
82
83         /**
84          * Checks if given boolean field is available and set to same value
85          *
86          * @param columnName Column name to check
87          * @param bool Boolean value
88          * @return Whether all conditions are met
89          */
90         public boolean isValueEqual (final String columnName, final boolean bool);
91
92         /**
93          * Some "getter for a value from given column name. This name will be
94          * translated into a method name and then this method is called.
95          *
96          * @param columnName Column name
97          * @return Value from field
98          * @throws IllegalArgumentException Some implementations may throw this
99          */
100         public Object getValueFromColumn (final String columnName) throws IllegalArgumentException;
101 }