commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (VALIDATOR-247) Move CreditCardValidator to routines package and refactor
Date Sat, 03 Nov 2007 10:18:50 GMT

     [ https://issues.apache.org/jira/browse/VALIDATOR-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Niall Pemberton updated VALIDATOR-247:
--------------------------------------

    Attachment: CreditCardValidatorTest.java
                CreditCardValidator.java

I'm not sure whats happening with JSR 303 (I requested membership of the EG, but heard nothing
after I signed up to the JCP) - except that the JSR was accepted nothing else seems to have
happened. Anyway my impression was JSR 303 was more than just annotations and involved defining
a framework. My aim with the "routines" package was to clearly separate out "validation routines"
from the framework aspect of validator with the routines usable on their own outside of any
framework stuff. If JSR 303 happens and defines, for example, a credit card annotation then
there will need to be some "glue" which recognises when a bean property has been annotated
as a credit card and invokes our routines. I don't believe what were doing here would need
to change - what would need to change is implementing the "glue" (i.e. framework) which hooks
the annotation to our routine. If/when JSR 303 happens this may turn out to be rubbish and
as you say we may end up redoing this, but until JSR 303 becomes concrete its all just guesswork.

Anyway, I've started on tests - need to add a bit more / finish off - but I think theres enough
here to commit and I'll get back to it when I find some more cycles.

> Move CreditCardValidator to routines package and refactor
> ---------------------------------------------------------
>
>                 Key: VALIDATOR-247
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-247
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Routines
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>         Attachments: CreditCardValidator.java, CreditCardValidatorTest.java
>
>
> Having copied CreditCardValidator to routines, it now needs to be refactored to use CodeValidator/LuhnCheckDigit/etc.
It might also make sense to break CreditCardType out into a separate 1.4-style typesafe enum
so it can be easily converted to a real enum for Validator 2.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message