Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 5476 invoked from network); 27 Sep 2007 05:37:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Sep 2007 05:37:18 -0000 Received: (qmail 18786 invoked by uid 500); 27 Sep 2007 05:37:07 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 18729 invoked by uid 500); 27 Sep 2007 05:37:07 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 18719 invoked by uid 99); 27 Sep 2007 05:37:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2007 22:37:07 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2007 05:39:34 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9648171403E for ; Wed, 26 Sep 2007 22:36:50 -0700 (PDT) Message-ID: <24840468.1190871410604.JavaMail.jira@brutus> Date: Wed, 26 Sep 2007 22:36:50 -0700 (PDT) From: "Bhupesh Naik (JIRA)" To: issues@commons.apache.org Subject: [jira] Issue Comment Edited: (VALIDATOR-237) Abstract Validation framework to Actions framework. In-Reply-To: <2198248.1190314836001.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VALIDATOR-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530484 ] bhupeshnaik edited comment on VALIDATOR-237 at 9/26/07 10:36 PM: ------------------------------------------------------------------ Hello, I have attached a sample project (of eclipse) that uses the action framework for validation and as well as transformation. I have also sent some source code that is relevant. Currently the action framework extends the validation framework classes; the idea is to have these as base classes above validation classes. Have a look at the xml files in \test.actionframework\src\config\ they have modified xml structure (generic to action framework) with no special validation specific tags. You will get an idea when you see the example. The attached is an eclipse project, you will have to add a variable in eclipse to point to \test.actionframework (Project Folder)\lib. This contains the jars it is referring to. The system jars are from our project and has lot more than what is relevant here; hence I have given source code of only the relevant stuff. Platform tested, Windows XP, Eclipse 3.3.0, JDK 1.5 With this action framework as base, I am working on creating the action executors that can be used in setting styles for UI controls. When you run the application, the console will display sax parser errors for the xml structure. Please ignore the same. The console will display the following data, it may get hide in the sax error. ---------- Apache Validator used as < Transformation > framework Ignoring missing bean descriptor - /config/elixir/common/bean-descriptor.xml Date Format Result: Source Value:24-09-2007, transformed value:24th Jan 2007 Substring Result : Source Value:FIRSTSECOND, transformed value:SECOND ----------- Transformation END ------------------------- ----------- Apache Validator used as < Validation > framework customer.firstname : Source Value:SteveNotNull, validation result:true customer.email : Source Value:steve@wrongemail, validation result:false ----------- Validation END ------------------------- Thanks & Regards, Bhupesh > Abstract Validation framework to Actions framework. > --------------------------------------------------- > > Key: VALIDATOR-237 > URL: https://issues.apache.org/jira/browse/VALIDATOR-237 > Project: Commons Validator > Issue Type: New Feature > Components: Framework > Affects Versions: 1.4 > Environment: All > Reporter: Bhupesh Naik > Priority: Minor > Attachments: test.actionframework.zip > > > 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 ---pass to--- > list of actions to be executed ----results in---> 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. > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.