From 29afecb48f6525e42d03946e321501519ce86a3e Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 9 Oct 2015 20:59:20 +0200 Subject: [PATCH] Continued: - added jcoree.jar (for ...) - added validator for validating address book names - added dist.sh as this lib needs to be copied to the domain's lib folder --- dist.sh | 23 ++++++++ lib/jcoreee.jar | Bin 0 -> 17973 bytes nbproject/project.properties | 3 ++ .../names/AddressbookNameValidator.java | 51 ++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100755 dist.sh create mode 100644 lib/jcoreee.jar create mode 100644 src/org/mxchange/addressbook/validator/names/AddressbookNameValidator.java diff --git a/dist.sh b/dist.sh new file mode 100755 index 00000000..f48251e3 --- /dev/null +++ b/dist.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +NAME="${PWD##*/}" +DIST="dist/${NAME}.jar" +LIST=`find ../*/lib/${NAME}.jar` +LIST="${LIST} `find ../*/*-ejb/lib/${NAME}.jar`" +LIST="${LIST} ${HOME}/gf_domains/domain1/lib/" + +for target in ${LIST}; +do + if [ ! -f "${DIST}" ] + then + echo "$0: '${DIST}' not found." + elif [ -d "${target}" ] + then + cp -v "${DIST}" "${target}" + elif [ -f "${target}" ] + then + cp -v "${DIST}" "${target}" + else + echo "$0: Target '${target}' not found." + fi +done diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar new file mode 100644 index 0000000000000000000000000000000000000000..e68026604df58681f21d98b50b69a0add36f50a6 GIT binary patch literal 17973 zcmeHPdvH@{c0X5^bfv2+8x#!4BtaMhHh#z$Vn7ChZERw&dDviL@&H-BHX^d*NHQ^G zlO?-Jlk7Gv)9JQLnl{^XH|djZGF>RkBq7u3&d#j@&17~$ zf9JdR>T!Mb;1M$EU`Eo_)%Tt6b-r_czjMCJq5U;Zg~&tnudfX4rGh^%Ica3zNN@Yl zfx+-+KOs7lEBY@ey7Rr}pUt5-zn0;ZD>~A9U}$h)>`2GR;7BwXpVl(j_HiwpiKmj0 z(58+~ztWp5xYIiqjh)g$xQ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ange.addressbook.validator.names; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.validator.Validator; +import javax.faces.validator.ValidatorException; +import org.mxchange.jcoreee.validator.string.BaseStringValidator; + +/** + * A validation class for addressbook names, such as first name or family name. + *

+ * @author Roland Haeder + */ +public class AddressbookNameValidator extends BaseStringValidator implements Validator { + + /** + * Serial number + */ + private static final long serialVersionUID = 27_587_896_710_689_451L; + + @Override + public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { + // Trace message + //this.getLogger().logTrace(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N + + // All accepted, required fields + String[] requiredFileds = {"addressbookName"}; //NOI18N + + // Pre-validation (e.g. not null, not a string, empty string ...) + super.preValidate(context, component, value, requiredFileds); + + // Trace message + //this.getLogger().logTrace("validate: EXIT!"); //NOI18N + } +} -- 2.39.5