[hibernate-issues] [Hibernate-JIRA] Resolved: (BVAL-36) Validation of method parameters and returned values

Emmanuel Bernard (JIRA) noreply at atlassian.com
Sun Mar 15 10:33:38 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard resolved BVAL-36.
----------------------------------

    Resolution: Fixed

> Validation of method parameters and returned values
> ---------------------------------------------------
>
>                 Key: BVAL-36
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-36
>             Project: Bean Validation
>          Issue Type: New Feature
>          Components: spec-general
>            Reporter: Emmanuel Bernard
>            Assignee: Emmanuel Bernard
>             Fix For: 1.0 public draft
>
>
> The goal is to expose the necessary APIs to validate method parameters and returned type. This API can typically be used by an interceptor framework.
> Validator {
>     List<IC> validateParameters(Method, Object[] parameterValues);
>     List<IC> validateParameter(Method, Object parameterValue, int parameterIndex);
>     List<IC> validateReturnedValue(Method, Object returnedValue);
>     List<IC> validateParameters(Constructor, Object[] parameterValues);
>     List<IC> validateParameter(Constructor, Object parameterValue, int parameterIndex);
> }
> Metadata
> Validator {
>     BeanDescriptor getConstraintsForBean()
>     PropertyDescriptor getConstraintsForProperty(String propertyName);
>     MethodDescriptor getConstraintsForMethod(Method);
>     MethodDescriptor getConstraintsForConstructor(Constructor);
>     String[] getValidatedProperties();
>     Method[] getValidatedMethods();
>     Constructor[] getValidatedConstructors();
> }
> ElementDescriptor {
>     ElementType getElementType();
>     Class getType();
>     List<ConstraintDescriptor> getConstraintDescriptors();
> }
> PropertyDescriptor extends ElementDescriptor {
>     boolean isCascaded();
>     String getPropertyPath();
> }
> ParameterDescriptor extends ElementDescriptor {
>     boolean isCascaded();
>     int getIndex();
> }
> BeanDescriptor extends ElementDescriptor {
> }
> MethodDescriptor extends ElementDescriptor {
>     List<ParameterDescriptor> getParameterDescriptors(); //index aligned
>     boolean isCascaded();
> }
> ConstructorDescriptor extends ElementDescriptor {
>     List<ParameterDescriptor> getParameterDescriptors(); //index aligned
> }
> How to read parameter annotations
> Class<?> parameterTypes = method.getParameterTypes()
> Annotation[][] parameterAnnotations = method.getParameterAnnotations()

-- 
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