org.xwiki.properties.internal
Class DefaultBeanManager
java.lang.Object
org.xwiki.properties.internal.DefaultBeanManager
- All Implemented Interfaces:
- BeanManager
@Component
@Singleton
public class DefaultBeanManager
- extends Object
- implements BeanManager
Default implementation of BeanManager component.
- use hibernate-validator implementation of JSR 303
- add support for any Enum conversion. See
org.xwiki.properties.internal.converter.EnumConverter.
- add support for
Color conversion using "r,g,b" or "#xxxxxx" format. See
ColorConverter.
- Since:
- 2.0M2
- Version:
- $Id$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultBeanManager
public DefaultBeanManager()
getValidatorFactory
public javax.validation.ValidatorFactory getValidatorFactory()
- Returns:
- the factory to use to get new JSR 303 validators.
populate
public void populate(Object bean,
Map<String,?> values)
throws PropertyException
- Convert provided values and inject them in the provided java bean.
- Specified by:
populate in interface BeanManager
- Parameters:
bean - the java bean to populatevalues - the values to convert and inject in the java bean
- Throws:
PropertyException - error append during the populate- See Also:
BeanManager.populate(java.lang.Object, java.util.Map)
getBeanDescriptor
public BeanDescriptor getBeanDescriptor(Class<?> beanClass)
- Parse provided java bean and return a descriptor with all its public properties.
- Specified by:
getBeanDescriptor in interface BeanManager
- Parameters:
beanClass - the java bean class to parse.
- Returns:
- the descriptor of the bean class.
- See Also:
BeanManager.getBeanDescriptor(java.lang.Class)
Copyright © 2004-2011 XWiki. All Rights Reserved.