2 * Copyright (C) 2015 Roland Haeder
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.
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.
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/>.
17 package org.mxchange.jcore;
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;
26 * A general interface which should be always expanded
28 * @author Roland Haeder
30 public interface FrameworkInterface {
32 * File name (and path) for internalization bundle
34 public static final String I18N_BUNDLE_FILE = "org/mxchange/localization/bundle";
37 * Properties file name
39 public static final String PROPERTIES_CONFIG_FILE = "config.properties";
44 * @return Manager instance
46 public Manageable getManager ();
53 public Client getClient ();
60 public Logger getLogger ();
63 * Application instance
65 * @return the application
67 public Application getApplication ();
71 * @return the sessionId
73 public String getSessionId ();
77 * @param sessionId the sessionId to set
79 public void setSessionId (final String sessionId);
82 * Getter for human-readable string from given key
84 * @param key Key to return
85 * @return Human-readable message
87 public String getMessageStringFromKey (final String key);
90 * Logs given exception
92 * @param exception Exception to log
94 public void logException (final Throwable exception);
97 * Checks if given boolean field is available and set to same value
99 * @param columnName Column name to check
100 * @param bool Boolean value
101 * @return Whether all conditions are met
102 * @throws java.lang.NoSuchMethodException If called method was not found
103 * @throws java.lang.IllegalAccessException If the method cannot be accessed
104 * @throws java.lang.reflect.InvocationTargetException Any other problems?
106 public boolean isFieldValueEqual (final String columnName, final boolean bool) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException;