JSRs 303 and 330 in ActionApache Bean Validation & Google Guice GuiceCon, March 19th, 2011 Simone Tripodi email@example.com http://people.apache.org/~simonetripodi
Apache Bean Validation✗ Bean Validation Specifcation (JSR303)implementation;✗ Efort undergoing incubation at the ASF;✗ TCK compliant;✗ Works on JavaSE 5 or later;✗ Donated to the ASF from Agimatec GmbH;✗ Released under ASL 2.0 License.
Apache Bean Validation & Google Guice✗ Bootstrap Apache Bean Validation using GoogleGuice;✗ Obtain javax.validation.ConstraintValidatorinstances using the Google Guice Injector, to easilysupport the DI;✗ Require for javax.validation.* componentsinjection;✗ Intercept methods and validate method arguments.
Methods arguments validation●the org.apache.bval.guice.ValidationModule comes withan AOP interceptor automatically initialized;●Based on @org.apache.bval.guice.Validate methodannotation ● Class<?> groups(): the groups have to be validated, empty by default; ● boolean validateReturnedValue(): the returned object of intercepted method has to be validated, false by default; ● Class<? Extends Throwable> rethrowExceptionAs(): the exception re-thrown if a validation occurs, javax.validation.ConstraintViolationException by default; ● String exceptionMessage(): a custom error message when throwing a custom exception.