*/
private static FrameworkInterface selfInstance;
+ /**
+ * Getter for this application
+ * <p>
+ * @return Instance from this application
+ */
+ public static FrameworkInterface getInstance () {
+ // Return it
+ return selfInstance;
+ }
+
+ /**
+ * Checks if the bundle is initialized
+ * <p>
+ * @return Whether the bundle has been initialized
+ */
+ protected static boolean isBundledInitialized () {
+ // Check it
+ return (bundle instanceof ResourceBundle);
+ }
+
/**
* Application instance
*/
protected BaseFrameworkSystem () {
}
+ @Override
+ public Application getApplication () {
+ return this.application;
+ }
+
+ @Override
+ public Facade getFacade () {
+ return this.facade;
+ }
+
+ @Override
+ public String getMessageStringFromKey (final String key) {
+ // Return message
+ return this.getBundle().getString(key);
+ }
+
/**
- * Getter for this application
+ * Getter for bundle instance
* <p>
- * @return Instance from this application
+ * @return Resource bundle
*/
- public static FrameworkInterface getInstance () {
- // Return it
- return selfInstance;
+ protected ResourceBundle getBundle () {
+ return BaseFrameworkSystem.bundle;
}
- @Override
- public Application getApplication () {
- return this.application;
+ /**
+ * Setter for bundle instance
+ * <p>
+ * @param bundle the bundle to set
+ */
+ protected static void setBundle (final ResourceBundle bundle) {
+ BaseFrameworkSystem.bundle = bundle;
+ }
+
+ /**
+ * Manager instance
+ * <p>
+ * @param facade the facade instance to set
+ */
+ protected void setFacade (final Facade facade) {
+ this.facade = facade;
+ }
+
+ /**
+ * Application instance
+ * <p>
+ * @param application the application to set
+ */
+ protected void setApplication (final Application application) {
+ this.application = application;
}
@Override
return this.client;
}
+ /**
+ * Client instance
+ * <p>
+ * @param client the client to set
+ */
+ protected void setClient (final Client client) {
+ this.client = client;
+ }
+
/**
* Converts null to empty string or leaves original object untouched.
* <p>
return tokens;
}
- /**
- * Client instance
- * <p>
- * @param client the client to set
- */
- protected void setClient (final Client client) {
- this.client = client;
- }
-
- /**
- * Application instance
- * <p>
- * @param application the application to set
- */
- protected void setApplication (final Application application) {
- this.application = application;
- }
-
- @Override
- public Facade getFacade () {
- return this.facade;
- }
-
- /**
- * Manager instance
- * <p>
- * @param facade the facade instance to set
- */
- protected void setFacade (final Facade facade) {
- this.facade = facade;
- }
-
- @Override
- public String getMessageStringFromKey (final String key) {
- // Return message
- return this.getBundle().getString(key);
- }
-
- /**
- * Getter for bundle instance
- * <p>
- * @return Resource bundle
- */
- protected ResourceBundle getBundle () {
- return BaseFrameworkSystem.bundle;
- }
-
- /**
- * Setter for bundle instance
- * <p>
- * @param bundle the bundle to set
- */
- protected static void setBundle (final ResourceBundle bundle) {
- BaseFrameworkSystem.bundle = bundle;
- }
-
/**
* Initializes i18n bundles
*/
setBundle(ResourceBundle.getBundle(FrameworkInterface.I18N_BUNDLE_FILE)); // NOI18N
}
- /**
- * Checks if the bundle is initialized
- * <p>
- * @return Whether the bundle has been initialized
- */
- protected static boolean isBundledInitialized () {
- // Check it
- return (bundle instanceof ResourceBundle);
- }
}
/**
* File name (and path) for internalization bundle
*/
- public static final String I18N_BUNDLE_FILE = "org/mxchange/localization/bundle"; //NOI18N
+ String I18N_BUNDLE_FILE = "org/mxchange/localization/bundle"; //NOI18N
/**
* Application instance
* <p>
* @return the application
*/
- public Application getApplication ();
+ Application getApplication ();
/**
* Client instance
* <p>
* @return the client
*/
- public Client getClient ();
+ Client getClient ();
/**
* Getter for manager
* <p>
* @return Manager instance
*/
- public Facade getFacade ();
+ Facade getFacade ();
/**
* Getter for human-readable string from given key
* <p>
* @return Human-readable message
*/
- public String getMessageStringFromKey (final String key);
+ String getMessageStringFromKey (final String key);
}
/**
* Bootstraps the application
*/
- public void doBootstrap ();
+ void doBootstrap ();
/**
* Run the main loop
* @throws org.mxchange.jcore.exceptions.MenuInitializationException If the
* menu could not be initialized
*/
- public void doMainLoop () throws MenuInitializationException;
+ void doMainLoop () throws MenuInitializationException;
/**
* Shutdown the application
* @throws java.io.IOException If an IO error occurs
* @throws java.sql.SQLException If a SQL error occurs
*/
- public void doShutdown () throws IOException, SQLException;
+ void doShutdown () throws IOException, SQLException;
}
* @throws java.io.IOException If an IO error occurs
* @throws java.sql.SQLException If a SQL error occurs
*/
- public void doShutdown () throws IOException, SQLException;
+ void doShutdown () throws IOException, SQLException;
/**
* Enables isRunning attribute which singals that the client is running
*/
- public void enableIsRunning ();
+ void enableIsRunning ();
/**
* Inizializes this client
*/
- public void init ();
+ void init ();
/**
* Determines whether the client is still active by checking some conditions
* <p>
* @return Whether the client is still active
*/
- public boolean isRunning ();
+ boolean isRunning ();
/**
* Displays a message to the user
* <p>
* @param message Message to show to the user
*/
- public void outputMessage (final String message);
+ void outputMessage (final String message);
/**
* Shows introduction to user
*/
- public void showWelcome ();
+ void showWelcome ();
}