org.xwiki.properties.internal
Class DefaultBeanManager

java.lang.Object
  extended by org.xwiki.properties.internal.DefaultBeanManager
All Implemented Interfaces:
BeanManager

@Component
@Singleton
public class DefaultBeanManager
extends java.lang.Object
implements BeanManager

Default implementation of BeanManager component.

Since:
2.0M2
Version:
$Id$

Constructor Summary
DefaultBeanManager()
           
 
Method Summary
 BeanDescriptor getBeanDescriptor(java.lang.Class<?> beanClass)
          Parse provided java bean and return a descriptor with all its public properties.
 javax.validation.ValidatorFactory getValidatorFactory()
           
 void populate(java.lang.Object bean, java.util.Map<java.lang.String,?> values)
          Convert provided values and inject them in the provided java bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBeanManager

public DefaultBeanManager()
Method Detail

getValidatorFactory

public javax.validation.ValidatorFactory getValidatorFactory()
Returns:
the factory to use to get new JSR 303 validators.

populate

public void populate(java.lang.Object bean,
                     java.util.Map<java.lang.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 populate
values - 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(java.lang.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.