]> git.mxchange.org Git - jcore-utils.git/blobdiff - src/org/mxchange/jcoreee/validator/string/BaseStringValidator.java
More cleanup
[jcore-utils.git] / src / org / mxchange / jcoreee / validator / string / BaseStringValidator.java
index c7316a2f69df5a2c7f96e228dba9f2235c31878c..83dc8a6ccd8ae163c62e0365b725fdee70699c45 100644 (file)
@@ -22,6 +22,7 @@ import javax.faces.application.FacesMessage;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.validator.ValidatorException;
+import org.mxchange.jcoree.BaseEeSystem;
 import org.mxchange.jcoreee.validator.BaseObjectValidator;
 
 /**
@@ -35,7 +36,7 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
        @Override
        protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields) throws ValidatorException {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields))); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields))); //NOI18N
 
                // Pre-validate (e.g. on null)
                super.preValidate(context, component, value, requiredFields);
@@ -48,7 +49,7 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
                // So far all fine, no check if the field is fine
                for (final String field : requiredFields) {
                        // Debug message
-                       this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId)); //NOI18N
+                       this.getLogger().logDebug(MessageFormat.format("field={0},clientId={1}", field, clientId)); //NOI18N
 
                        // Is it the same?
                        if (clientId.endsWith(field)) {
@@ -57,7 +58,7 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
                                        // Value is empty
                                        errKey = String.format("error.%s.is_not_string", field); //NOI18N
 
-                                       facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey));
+                                       facesMessage = new FacesMessage(BaseEeSystem.getMessageStringFromKey(errKey));
                                }
 
                                // Cast to string
@@ -68,13 +69,13 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
                                        // Value is empty
                                        errKey = String.format("error.%s.is_empty", field); //NOI18N
 
-                                       facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey));
+                                       facesMessage = new FacesMessage(BaseEeSystem.getMessageStringFromKey(errKey));
                                }
                        }
                }
 
                // Debug message
-               this.getLogger().debug(MessageFormat.format("facesMessage={0}", facesMessage)); //NOI18N
+               this.getLogger().logDebug(MessageFormat.format("facesMessage={0}", facesMessage)); //NOI18N
 
                // Is it not null?
                if (null != facesMessage) {
@@ -82,6 +83,6 @@ public abstract class BaseStringValidator extends BaseObjectValidator {
                }
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 }