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;
}
Aggregations