-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Feedback on Constraint composition + bootstrapping
PostPosted: Fri Oct 31, 2008 1:15 pm 
Newbie

Joined: Thu Apr 03, 2008 4:27 am
Posts: 10
some feedback for http://in.relation.to/Bloggers/Constrai ... tionJSR303

I implemented this at http://code.google.com/p/agimatec-validation/, while the reference implementation does not yet support it.

Some questions/missing information for the spec. to clarify:

1. In case of @ReportAsSingleInvalidConstraint
Can validation of the constraint stop when some composed constraint reports invalidity?
How should the composed constraint error report look like? Do the error reports from the nested constraints NOT appear to the invoker or will interface InvalidConstraint need extension to return the getComposedInvalidConstraints()?

2. according to method Validator.validateValue() + validateProperty()
It seems (also when looking into the reference implementation), that there is no reliable way to determine the constraints for a property, especially when a complex property path (author.addresses[3].country) is given as "propertyName". Maybe you will have to think about this more...? (or I did not understand it, sorry then.)

3. Method ConstraintDescriptor.getConstraintImplementation() disappeared from the spec. It seems that it would be neccessary (for the implementation as well as for the metadata API)...


Bootstrapping:
----------------

The part of the spec describing what should be configurable in the META-INF/validation.xml file is not clear to me. Does it configure the ValidationFactory or the ValidationBuilder (or both)?

In which situation is the stream used?

Method ValidatorBuilderImplementor.getConfigurationStream() - is this required to be public or just called inside a specific implementation of a provider, so that it can be deleted from the interface?


To clarify the use of the bootstrapping-API, it would be helpful to have another example showing the preferred way to create 2 validators for the same object, but with different locales on their MessageResolvers. This would show, if two factories are needed (when the MessageResolver could be configurated at the ValidationBuilder) or if a single factory (with vendor-specific APIs) can do it.
By the way: the spec does not clarify whether ValidationBuilder.build() can be called multiple times on the same instance.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.