]> git.mxchange.org Git - jcoreee.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Tue, 29 Sep 2015 09:33:02 +0000 (11:33 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 29 Sep 2015 09:33:02 +0000 (11:33 +0200)
- renamed method to getMessageFromKey() as this is better
- made getter private as getMessageFromKey() should be used
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcoreee/BaseEeSystem.java
src/org/mxchange/jcoreee/validator/BaseObjectValidator.java
src/org/mxchange/jcoreee/validator/bool/BaseBooleanValidator.java
src/org/mxchange/jcoreee/validator/number/BaseLongValidator.java
src/org/mxchange/jcoreee/validator/string/BaseStringValidator.java

index d31d94de761c09b1763a654f6eec8212568ec6ec..357b1b7b63815368cdbc6a72053ada8d3583d2ce 100644 (file)
@@ -50,7 +50,7 @@ public abstract class BaseEeSystem implements Serializable {
         * <p>
         * @return Bundle instance
         */
-       protected ResourceBundle getBundle () {
+       private ResourceBundle getBundle () {
                return this.bundle;
        }
 
@@ -60,7 +60,7 @@ public abstract class BaseEeSystem implements Serializable {
         * @param key Key to get message from
         * @return Message
         */
-       protected String getMessageStringFromKey (final String key) {
+       protected String getMessageFromKey (final String key) {
                // Is the bundle loaded?
                if (this.getBundle() == null) {
                        // Abort here
index ce9143e0e420c108afa92d69cbfc79ce708fc745..a8bd8fcab8cc22a622bfd47e990be4631b9be13a 100644 (file)
@@ -93,7 +93,7 @@ public abstract class BaseObjectValidator extends BaseEeSystem implements Valida
                                        errKey = String.format("ERROR_%s_IS_NULL", field.toUpperCase()); //NOI18N
 
                                        // Value it null
-                                       facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey));
+                                       facesMessage = new FacesMessage(this.getMessageFromKey(errKey));
                                }
 
                                // Abort here
@@ -106,7 +106,7 @@ public abstract class BaseObjectValidator extends BaseEeSystem implements Valida
                // Valid field?
                if (!isValidField) {
                        // Invalid field
-                       facesMessage = new FacesMessage(MessageFormat.format(this.getMessageStringFromKey(errKey), clientId));
+                       facesMessage = new FacesMessage(MessageFormat.format(this.getMessageFromKey(errKey), clientId));
                }
 
                // Debug message
index a8ce93d501e525c5fba949e869dba41bb179ceb2..a7a9083c2fcf379e8ee8cd222b96c983f3093cea 100644 (file)
@@ -62,7 +62,7 @@ public abstract class BaseBooleanValidator extends BaseObjectValidator implement
                                // Compare value's type
                                if (!(value instanceof Boolean)) {
                                        // Generate message
-                                       requiredMessage = this.getMessageStringFromKey(String.format("ERROR_%s_IS_NOT_BOOLEAN", field.toUpperCase()));
+                                       requiredMessage = this.getMessageFromKey(String.format("ERROR_%s_IS_NOT_BOOLEAN", field.toUpperCase()));
 
                                        // Value is not right type
                                        facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, requiredMessage, requiredMessage); //NOI18N
index 5603402e4a0ed15ded6446f2d8b4e08c4916b348..8d543aaebe4adc31e144a3f85c0127c14c472308 100644 (file)
@@ -58,7 +58,7 @@ public abstract class BaseLongValidator extends BaseObjectValidator implements V
                                // Compare value's type
                                if (!(value instanceof Long)) {
                                        // Generate message
-                                       requiredMessage = this.getMessageStringFromKey(String.format("ERROR_%s_IS_NOT_LONG", field.toUpperCase()));
+                                       requiredMessage = this.getMessageFromKey(String.format("ERROR_%s_IS_NOT_LONG", field.toUpperCase()));
 
                                        // Value is not right type
                                        facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, requiredMessage, requiredMessage); //NOI18N
@@ -71,7 +71,7 @@ public abstract class BaseLongValidator extends BaseObjectValidator implements V
                                // Is the number below zero?
                                if (num < 0) {
                                        // Generate message
-                                       requiredMessage = this.getMessageStringFromKey(String.format("ERROR_%s_IS_BELOW_ZERO", field.toUpperCase()));
+                                       requiredMessage = this.getMessageFromKey(String.format("ERROR_%s_IS_BELOW_ZERO", field.toUpperCase()));
 
                                        // Abort processing here
                                        facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, requiredMessage, requiredMessage);
index cae887c271ec2ed13f1ad1515f13385ac1f58339..5fc45350a93197ca3243ceb277bfc2b17fa6a264 100644 (file)
@@ -60,7 +60,7 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
                                        // Value is empty
                                        errKey = String.format("ERROR_%s_IS_NOT_STRING", field.toUpperCase()); //NOI18N
 
-                                       facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey));
+                                       facesMessage = new FacesMessage(this.getMessageFromKey(errKey));
                                }
 
                                // Cast to string
@@ -71,7 +71,7 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
                                        // Value is empty
                                        errKey = String.format("ERROR_%s_IS_EMPTY", field.toUpperCase()); //NOI18N
 
-                                       facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey));
+                                       facesMessage = new FacesMessage(this.getMessageFromKey(errKey));
                                }
                        }
                }