[hibernate-issues] [Hibernate-JIRA] Created: (BVAL-10) Turn ValidatorParser into a MetadataProvider

Emmanuel Bernard (JIRA) noreply at atlassian.com
Fri Sep 12 17:31:06 EDT 2008


Turn ValidatorParser into a MetadataProvider
--------------------------------------------

                 Key: BVAL-10
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-10
             Project: Bean Validation
          Issue Type: New Feature
          Components: ri-general
            Reporter: Emmanuel Bernard
            Assignee: Hardy Ferentschik


You should turn parser into something more like a MetadataProvider. 
I removed the getValidators() method from parser and moved it to ValidatorImpl. The parser should not be aware of ValidatorImpl, nor Validator for that matter.

The MetadataProvider will be an interface anybody can implement. We will do the annotation version as well as the XML version (and probably some kind of XML overriding annotation version) but one can imagine a Script / Groovy DSLed version, a Programmatic API version and so on.

I imagine a MetadataProvider instance can be passed during the building phase to the ValidatorFactory. The same instance would then be shared for all Validators (kind of make sense, you can't parse XML for every single ValdiatorImpl instantiation).

That woul mean the parser ode needs ot be reworked to be immutable (at least work in concurrent calls)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list