Search in sources :

Example 1 with IBeanValidator

use of org.jowidgets.cap.common.api.validation.IBeanValidator in project jo-client-platform by jo-source.

the class BeanProxyImplTest method createValidators.

@SuppressWarnings({ "rawtypes", "unchecked" })
private static <BEAN_TYPE> List<IBeanPropertyValidator<BEAN_TYPE>> createValidators(final IBeanDtoDescriptor descriptor, final Collection<IAttribute<Object>> attributes) {
    final List<IBeanPropertyValidator<BEAN_TYPE>> result = new LinkedList<IBeanPropertyValidator<BEAN_TYPE>>();
    result.add(new AttributesBeanPropertyValidator<BEAN_TYPE>(attributes));
    for (final IBeanValidator beanValidator : descriptor.getValidators()) {
        result.add(new BeanPropertyValidatorAdapter<BEAN_TYPE>(beanValidator));
    }
    return result;
}
Also used : IBeanValidator(org.jowidgets.cap.common.api.validation.IBeanValidator) IBeanPropertyValidator(org.jowidgets.cap.ui.api.bean.IBeanPropertyValidator) LinkedList(java.util.LinkedList)

Aggregations

LinkedList (java.util.LinkedList)1 IBeanValidator (org.jowidgets.cap.common.api.validation.IBeanValidator)1 IBeanPropertyValidator (org.jowidgets.cap.ui.api.bean.IBeanPropertyValidator)1