*/
package org.mxchange.jcoreee;
+import java.io.Serializable;
import java.util.ResourceBundle;
/**
*
- * @author Roland Haeder
+ * @author Roland Haeder<roland@mxchange.org>
*/
-public class BaseEeSystem {
+public class BaseEeSystem implements Serializable {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 48_475_834_783_473_187L;
+
/**
* Bundle instance
*/
- private ResourceBundle bundle;
+ private final ResourceBundle bundle;
+
+ /**
+ * Protectd constructor
+ */
+ protected BaseEeSystem () {
+ // Load resource bundle
+ this.bundle = ResourceBundle.getBundle("org/mxchange/localization/bundle");
+ }
/**
* Getter for message from given key
* @return Message
*/
protected String getMessageStringFromKey (final String key) {
+ // Is the bundle loaded?
+ if (this.getBundle() == null) {
+ // Abort here
+ throw new NullPointerException("bundle is null"); //NOI18N
+ }
+
// Return message
return this.getBundle().getString(key);
}
*
* @return Bundle instance
*/
- private ResourceBundle getBundle () {
+ protected ResourceBundle getBundle () {
return this.bundle;
}
}