]> git.mxchange.org Git - jcore.git/blob - src/org/mxchange/jcore/FrameworkInterface.java
Also this came from old TDGP times
[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 java.lang.reflect.InvocationTargetException;
20 import org.apache.logging.log4j.Logger;
21 import org.mxchange.jcore.application.Application;
22 import org.mxchange.jcore.client.Client;
23 import org.mxchange.jcore.manager.Manageable;
24
25 /**
26  * A general interface which should be always expanded
27  *
28  * @author Roland Haeder
29  */
30 public interface FrameworkInterface {
31         /**
32          * File name (and path) for internalization bundle
33          */
34         public static final String I18N_BUNDLE_FILE = "org/mxchange/localization/bundle";
35
36         /**
37          * Getter for manager
38          *
39          * @return Manager instance
40          */
41         public Manageable getManager ();
42
43         /**
44          * Client instance
45          *
46          * @return the client
47          */
48         public Client getClient ();
49
50         /**
51          * Getter for logger
52          *
53          * @return Logger
54          */
55         public Logger getLogger ();
56
57         /**
58          * Application instance
59          *
60          * @return the application
61          */
62         public Application getApplication ();
63
64         /**
65          * Getter for human-readable string from given key
66          *
67          * @param key Key to return
68          * @return Human-readable message
69          */
70         public String getMessageStringFromKey (final String key);
71
72         /**
73          * Logs given exception
74          *
75          * @param exception Exception to log
76          */
77         public void logException (final Throwable exception);
78
79         /**
80          * Checks if given boolean field is available and set to same value
81          *
82          * @param columnName Column name to check
83          * @param bool Boolean value
84          * @return Whether all conditions are met
85          * @throws java.lang.NoSuchMethodException If called method was not found
86          * @throws java.lang.IllegalAccessException If the method cannot be accessed
87          * @throws java.lang.reflect.InvocationTargetException Any other problems?
88          */
89         public boolean isFieldValueEqual (final String columnName, final boolean bool) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException;
90 }