org.apache.bval.xml
Class XMLMetaBeanFactory

java.lang.Object
  extended by org.apache.bval.xml.XMLMetaBeanFactory
All Implemented Interfaces:
MetaBeanFactory

public class XMLMetaBeanFactory
extends Object
implements MetaBeanFactory

Description: Create or enrich MetaBeans from apache beanInfos xml


Nested Class Summary
static interface XMLMetaBeanFactory.Visitor
           
static class XMLMetaBeanFactory.XMLResult
           
 
Constructor Summary
XMLMetaBeanFactory()
           
 
Method Summary
 void addLoader(XMLMetaBeanLoader loader)
           
 void buildMetaBean(MetaBean metaBean)
          Initialize the specified MetaBean.
protected  MetaProperty enrichElement(MetaBean meta, XMLMetaElement xmlProp, XMLMetaBeanFactory.XMLResult result)
           
 void enrichMetaBean(MetaBean meta, XMLMetaBeanFactory.XMLResult result)
           
protected  void enrichValidations(FeaturesCapable prop, XMLFeaturesCapable xmlProp, XMLMetaBeanFactory.XMLResult result, boolean addStandard)
           
protected  XMLMetaBeanFactory.XMLResult findXMLBeanMeta(String beanId)
          find a bean by the bean-id (=bean.name)
 Collection<XMLMetaBeanLoader> getLoaders()
          XMLMetaBeanLoader are used to know "locations" where to get BeanInfos from.
 StandardValidation getStandardValidation()
           
 void handleLoadException(Object loader, IOException e)
           
 void setStandardValidation(StandardValidation standardValidation)
          customize the implementation of standardValidation for this builder.
 void visitXMLBeanMeta(String beanId, XMLMetaBeanFactory.Visitor visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLMetaBeanFactory

public XMLMetaBeanFactory()
Method Detail

buildMetaBean

public void buildMetaBean(MetaBean metaBean)
                   throws Exception
Description copied from interface: MetaBeanFactory
Initialize the specified MetaBean.

Specified by:
buildMetaBean in interface MetaBeanFactory
Throws:
Exception

getLoaders

public Collection<XMLMetaBeanLoader> getLoaders()
XMLMetaBeanLoader are used to know "locations" where to get BeanInfos from.


addLoader

public void addLoader(XMLMetaBeanLoader loader)

getStandardValidation

public StandardValidation getStandardValidation()

setStandardValidation

public void setStandardValidation(StandardValidation standardValidation)
customize the implementation of standardValidation for this builder.


enrichMetaBean

public void enrichMetaBean(MetaBean meta,
                           XMLMetaBeanFactory.XMLResult result)
                    throws Exception
Throws:
Exception

enrichValidations

protected void enrichValidations(FeaturesCapable prop,
                                 XMLFeaturesCapable xmlProp,
                                 XMLMetaBeanFactory.XMLResult result,
                                 boolean addStandard)
                          throws Exception
Throws:
Exception

enrichElement

protected MetaProperty enrichElement(MetaBean meta,
                                     XMLMetaElement xmlProp,
                                     XMLMetaBeanFactory.XMLResult result)
                              throws Exception
Throws:
Exception

visitXMLBeanMeta

public void visitXMLBeanMeta(String beanId,
                             XMLMetaBeanFactory.Visitor visitor)
                      throws Exception
Throws:
Exception

findXMLBeanMeta

protected XMLMetaBeanFactory.XMLResult findXMLBeanMeta(String beanId)
find a bean by the bean-id (=bean.name)

Returns:
null or the bean found from the first loader that has it.

handleLoadException

public void handleLoadException(Object loader,
                                IOException e)


Copyright © 2010-2012 Apache Software Foundation. All Rights Reserved.