Hello,
We have been using apache commons validator extensively; we have found that a common pattern can be identified in the way the apache commons validator work. Apache Commons validator can be ABSTRACTED to a common framework called ACTIONS framework. The Actions framework will act in similar manner as validation framework but will be independent of the way in which actions are execute on the value. Abstraction points. 1) Validation can be treated as any action 2) The value to be validated is treated as source value 3) The return value true/false can be treated as a target value 4) Source Value -> list of actions to be executed -> Target Value We have already done this in our enterprise product, we use apache validation framework even for transforming values in our custom ETL framework. I am attaching a sample XML file containing the modified tag names. Once the apache validator is abstracted as actions framework one can use the same to not only validate the source value but to transform the value or even in describing and modifying styles of controls in UI and much more. The advantage here is we use the same digester , loading of elements, extending forms and stuff, this code remains common. I am not sure who decides on taking the enhancements for apache on board, I believe this gives a good framework for solving multiple problems. Thanks & Regards, Bhupesh Naik | Architect | Core Elixir Mastek Ltd., IT5, SDF VII, SEEPZ, Andheri (E), Mumbai - 400096, Inida. Board: 56952222 Extn: 1431 | Mobile: +91 9819718331 MASTEK LTD. "Making a valuable difference" Mastek in NASSCOM's 'India Top 20' Software Service Exporters List. In the US, we're called MAJESCOMASTEK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN" "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd"> <actionlist> <actionset> <action-executor name="global"> <target property="dataCdType" depends="addOne,addOne"> <arg0 key="dataCdType.text" /> <var> <var-name>maxlength</var-name> <var-value>6</var-value> </var> <var> <var-name>mask</var-name> <var-value>^[a-zA-Z0-9 , &']*$</var-value> </var> </target> <target property="sysDateType" depends="formatDate"> <var> <var-name>sourceDatePattern</var-name> <var-value>dd-mm-yyyy</var-value> </var> <var> <var-name>targetDatePattern</var-name> <var-value>dd'th' MMM yyyy</var-value> </var> <var> <var-name>datePatternStrict</var-name> <var-value>false</var-value> </var> </target> <target property="countryLookup" depends="lookupMap"> <var> <var-name>mapsetname</var-name> <var-value>CountryMap</var-value> </var> </target> <target property="substring" depends="getSubstring"> <var> <var-name>beginIndex</var-name> <var-value>2</var-value> </var> <var> <var-name>endIndex</var-name> <var-value>5</var-value> </var> </target> <target property="default" depends="getDefaultValue"> <var> <var-name>defaultValue</var-name> <var-value>ABC</var-value> </var> </target> <target property="constant" depends="getConstantValue"> <var> <var-name>constantValue</var-name> <var-value>123</var-value> </var> </target> <target property="sampleObjectTransform" depends="transformObject"> <arg0 key="registrationDtFrom.text" /> <var> <var-name>transformers</var-name> <var-value>com.mastek.elixir.system.eis.etl.handler.fsa.common.transformer.FSATransformer</var-value> </var> <!-- <var> <var-name>transformerInvoker</var-name> <var-value>com.mastek.elixir.system.common.action.SequenceTransformerInvoker</var-value> </var> --> <var> <var-name>transformerMethodList</var-name> <var-value>sampleTransform</var-value> </var> </target> </action-executor> </actionset> </actionlist>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]