From 6c5926e7276c84705211916523d5447482e4b4f3 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 1 Sep 2015 08:28:31 +0200 Subject: [PATCH] =?utf8?q?Some=20changes=20for=20internationalization=20+?= =?utf8?q?=20jcore.jar=20updated=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/jcore.jar | Bin 120595 -> 120581 bytes .../mxchange/jsfcore/BaseServletSystem.java | 2 +- .../validator/BaseObjectValidator.java | 14 +- .../validator/string/BaseStringValidator.java | 190 +++++++++--------- .../validator/string/names/NameValidator.java | 92 ++++----- 5 files changed, 149 insertions(+), 149 deletions(-) diff --git a/lib/jcore.jar b/lib/jcore.jar index 9571e27b4e0c4f0608ca9c971502c557b5ec73aa..8b05d574954f3d02853e6d4a7108c1987006d686 100644 GIT binary patch delta 9582 zcmZ`f33wF6(p9yaoylf$0O3diIUpn7K5;y1J@6z2+9}(Jfkd z?;b9<7eEKd>72AIJk8aTo3<-l@^v~vHNT}vW5#1M)fQtr)jo->RQr5Lvbha4^Jk2Z z@8#554d=U(&B?EZRuy2zYiiV7M>Q4JPU@`MKd6&K)kd{~chObD-0JeG?>(-rsts{> zk6078%>> zg;lssdfRo}p`p)9}9W4rq8##^2HK zkc=PJ@kl6?RNzq!-_`Iv9gle-0gvnWzK$n^;sY<9#8aX{xx7xx>x_nHbv);VQTU-3 znqY;n`bfv~0{mFVPjvj$3+M5IZsvq04$<&i9l!I!?O37Xe+2Nojz4JlqmDm$p#Xo@ z@RGE@c%cw~mELdi`mY#rS;jU=?{|4!kJ;XMcrr8!*C~Q^rAQf!l2;9#YU)%=r)ZsO>r_Xlx@-c~W5yJtQ>;#LI@Q;yftTVb zL0*YoN}`7HY9y?ZHEOI=iWeSan@TBFr!<|Kh+aF{K1$aqL#L)XWwNuWnNC?6WqaW< z{8gvsUTQ%tb;=Q8t#oRwQ=2eqOSw9=3#0bzG`fvj>L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qQW^PZ~CywOqeV z;H;Qn)K@wBZWb@61AF54AijB1WS#)Jw>^qdN2`^i%_SU-Eg zEuoU*>7Q?24&h)DPm3BHzkS*y*?BC&ICRE}f=Mkq7hYvl@wBdi-e;~QVQRE7@w_E_ z-8q&$dwvzftMC6crW)!!&(OD@v!O=ipE1tJyI>K|72vfCCD?d$2?iSb&Rfa#h5)^_ z$OffXQx#ocQ2A05bbTqdG^U+LO>W-0N4jVKz`tpTC%cC78;zS6Fkd=k=BMdFCA_HO zsky^%7$#HsM=Q%Vpx0RRk)`VTkAx*_{NUHtV2F$sDS4)&;+I^mLd8>a^Mo0p7qP#T z+<2#J-B+xZc)He5Z*Qp|XYuDU#`mS1i$6SO1>+~N-hS|{j@xyl<``_jTLwDG; VZiD~)rm^wkB@A&N+Q*)Q{|7-_VUYj; diff --git a/src/org/mxchange/jsfcore/BaseServletSystem.java b/src/org/mxchange/jsfcore/BaseServletSystem.java index f8bdd74..b9c5295 100644 --- a/src/org/mxchange/jsfcore/BaseServletSystem.java +++ b/src/org/mxchange/jsfcore/BaseServletSystem.java @@ -36,7 +36,7 @@ public class BaseServletSystem extends BaseFrameworkSystem { // context shall not be null if (null == context) { // Abort here - throw new NullPointerException("context is null"); + throw new NullPointerException("context is null"); //NOI18N } // We need some properties that needs to be set diff --git a/src/org/mxchange/jsfcore/validator/BaseObjectValidator.java b/src/org/mxchange/jsfcore/validator/BaseObjectValidator.java index c0b5fe5..ad4ea8b 100644 --- a/src/org/mxchange/jsfcore/validator/BaseObjectValidator.java +++ b/src/org/mxchange/jsfcore/validator/BaseObjectValidator.java @@ -71,14 +71,14 @@ public abstract class BaseObjectValidator extends BaseFrameworkSystem implements */ 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))); + this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields))); //NOI18N // Set resource bundle this.initResourceBundle(context); // Init message and key FacesMessage facesMessage = null; - String errKey = "error.unknown_id"; + String errKey = "error.unknown_id"; //NOI18N // Get client id String clientId = component.getClientId(); @@ -88,7 +88,7 @@ public abstract class BaseObjectValidator extends BaseFrameworkSystem implements for (final String field : requiredFields) { // Get logger - this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId)); + this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId)); //NOI18N // Is it the same? if (clientId.endsWith(field)) { @@ -97,7 +97,7 @@ public abstract class BaseObjectValidator extends BaseFrameworkSystem implements // Is it null? if (null == value) { - errKey = String.format("error.%s.is_null", field); + errKey = String.format("error.%s.is_null", field); //NOI18N // Value it null facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey)); @@ -108,7 +108,7 @@ public abstract class BaseObjectValidator extends BaseFrameworkSystem implements } // Debug message - this.getLogger().debug("isValidField=" + isValidField); + this.getLogger().debug(MessageFormat.format("isValidField={0}", isValidField)); //NOI18N // Valid field? if (!isValidField) { @@ -117,7 +117,7 @@ public abstract class BaseObjectValidator extends BaseFrameworkSystem implements } // Debug message - this.getLogger().debug(MessageFormat.format("facesMessage={0}", facesMessage)); + this.getLogger().debug(MessageFormat.format("facesMessage={0}", facesMessage)); //NOI18N // Is it not null? if (null != facesMessage) { @@ -125,6 +125,6 @@ public abstract class BaseObjectValidator extends BaseFrameworkSystem implements } // Trace message - this.getLogger().trace("EXIT!"); + this.getLogger().trace("EXIT!"); //NOI18N } } diff --git a/src/org/mxchange/jsfcore/validator/string/BaseStringValidator.java b/src/org/mxchange/jsfcore/validator/string/BaseStringValidator.java index 6434cb9..43aa7c1 100644 --- a/src/org/mxchange/jsfcore/validator/string/BaseStringValidator.java +++ b/src/org/mxchange/jsfcore/validator/string/BaseStringValidator.java @@ -1,95 +1,95 @@ -/* - * Copyright (C) 2015 Roland Haeder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.mxchange.jsfcore.validator.string; - -import java.text.MessageFormat; -import java.util.Arrays; -import javax.faces.application.FacesMessage; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.validator.ValidatorException; -import org.mxchange.jsfcore.validator.BaseObjectValidator; - -/** - * A general string validation class. You normally want to inherit from this - * class for many form fields, e.g. surname, street name, city name and such. - * - * @author Roland Haeder - */ -public abstract class BaseStringValidator extends BaseObjectValidator { - - /** - * Pre-validation of value, e.g. not null - * - * @param context FacesContext instance - * @param component UIComponent instance - * @param value Value to check - * @param requiredFields Array of required field names (ending with) - * @throws ValidatorException If something more horrible went wrong - */ - @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))); - - // Pre-validate (e.g. on null) - super.preValidate(context, component, value, requiredFields); - - // Get client id and init message + key - String clientId = component.getClientId(); - FacesMessage facesMessage = null; - String errKey; - - // So far all fine! - for (final String field : requiredFields) { - // Debug message - this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId)); - - // Is it the same? - if (clientId.endsWith(field)) { - if (!(value instanceof String)) { - // Value is empty - errKey = String.format("error.%s.is_not_string", field); - - facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey)); - } - - // Cast to string - String str = (String) value; - - // Is it empty? - if (str.isEmpty()) { - // Value is empty - errKey = String.format("error.%s.is_empty", field); - - facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey)); - } - } - } - - // Debug message - this.getLogger().debug(MessageFormat.format("facesMessage={0}", facesMessage)); - - // Is it not null? - if (null != facesMessage) { - throw new ValidatorException(facesMessage); - } - - // Trace message - this.getLogger().trace("EXIT!"); - } -} +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jsfcore.validator.string; + +import java.text.MessageFormat; +import java.util.Arrays; +import javax.faces.application.FacesMessage; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.validator.ValidatorException; +import org.mxchange.jsfcore.validator.BaseObjectValidator; + +/** + * A general string validation class. You normally want to inherit from this + * class for many form fields, e.g. surname, street name, city name and such. + * + * @author Roland Haeder + */ +public abstract class BaseStringValidator extends BaseObjectValidator { + + /** + * Pre-validation of value, e.g. not null + * + * @param context FacesContext instance + * @param component UIComponent instance + * @param value Value to check + * @param requiredFields Array of required field names (ending with) + * @throws ValidatorException If something more horrible went wrong + */ + @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 + + // Pre-validate (e.g. on null) + super.preValidate(context, component, value, requiredFields); + + // Get client id and init message + key + String clientId = component.getClientId(); + FacesMessage facesMessage = null; + String errKey; + + // So far all fine! + for (final String field : requiredFields) { + // Debug message + this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId)); //NOI18N + + // Is it the same? + if (clientId.endsWith(field)) { + if (!(value instanceof String)) { + // Value is empty + errKey = String.format("error.%s.is_not_string", field); //NOI18N + + facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey)); + } + + // Cast to string + String str = (String) value; + + // Is it empty? + if (str.isEmpty()) { + // Value is empty + errKey = String.format("error.%s.is_empty", field); //NOI18N + + facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey)); + } + } + } + + // Debug message + this.getLogger().debug(MessageFormat.format("facesMessage={0}", facesMessage)); //NOI18N + + // Is it not null? + if (null != facesMessage) { + throw new ValidatorException(facesMessage); + } + + // Trace message + this.getLogger().trace("EXIT!"); //NOI18N + } +} diff --git a/src/org/mxchange/jsfcore/validator/string/names/NameValidator.java b/src/org/mxchange/jsfcore/validator/string/names/NameValidator.java index 45b4cf7..4186545 100644 --- a/src/org/mxchange/jsfcore/validator/string/names/NameValidator.java +++ b/src/org/mxchange/jsfcore/validator/string/names/NameValidator.java @@ -1,46 +1,46 @@ -/* - * Copyright (C) 2015 Roland Haeder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.mxchange.jsfcore.validator.string.names; - -import java.text.MessageFormat; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.validator.Validator; -import javax.faces.validator.ValidatorException; -import org.mxchange.jsfcore.validator.string.BaseStringValidator; - -/** - * A validation class for names, such as first name or family name. - * - * @author Roland Haeder - */ -public class NameValidator extends BaseStringValidator implements Validator { - @Override - public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { - // Trace message - this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2} - CALLED!", context, component, value)); - - // All accepted, required fields - String[] requiredFileds = {"firstName", "familyName"}; - - // Pre-validation (e.g. not null, not a string, empty string ...) - super.preValidate(context, component, value, requiredFileds); - - // Trace message - this.getLogger().trace("EXIT!"); - } -} +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jsfcore.validator.string.names; + +import java.text.MessageFormat; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.validator.Validator; +import javax.faces.validator.ValidatorException; +import org.mxchange.jsfcore.validator.string.BaseStringValidator; + +/** + * A validation class for names, such as first name or family name. + * + * @author Roland Haeder + */ +public class NameValidator extends BaseStringValidator implements Validator { + @Override + public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { + // Trace message + this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N + + // All accepted, required fields + String[] requiredFileds = {"firstName", "familyName"}; //NOI18N + + // Pre-validation (e.g. not null, not a string, empty string ...) + super.preValidate(context, component, value, requiredFileds); + + // Trace message + this.getLogger().trace("EXIT!"); //NOI18N + } +} -- 2.39.5