|
From: <sam...@ma...> - 2004-03-04 10:57:43
|
Quoting Keith Donald <kd...@cs...>: > Another benefit of those abstractions is they make it easier for the > validator be used in other contexts. For example, maybe I want a > ValidationInterceptor which can take any bean, look up its validator, and > invoke the validation methods -- maybe as part of a command framework. Or > maybe I want to wrap a domain object in a AOP proxy that invokes a > BeanValidator when set() methods are called. Maybe I want validation rules > to come from another source other than attributes metadata. That's easier > to do with the domain abstractions around than with the metadata stuff all > coupled in with your validation processing logic... The notion of being able to define a set of validator rules for a specific command, then have a ValidatorInterceptor look them up is exactly what I need. At present I'm trying to streamline the command declaration process in the (rcp) command framework, and I really want to avoid having to have a proxy declaration for each command. sam http://www.magpiebrain.com/ |