|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.util.xmlconfig.XMLConfiguration
public class XMLConfiguration
XML configuration class that configure a given object with an xml
configuration file.
Additional information will be searched on the namespace with the resource named easybeans-mapping.xml.
| Constructor Summary | |
|---|---|
XMLConfiguration(java.io.InputStream stream,
java.lang.String mappingFilename)
Build an xml configuration with the given xml configuration file. |
|
XMLConfiguration(java.lang.String mappingFilename)
Initialize class fields. |
|
XMLConfiguration(java.net.URL xmlConfigurationURL,
java.lang.String mappingFilename)
Build an xml configuration with the given xml configuration file. |
|
XMLConfiguration(java.net.URL xmlConfigurationURL,
java.lang.String mappingNS,
java.lang.String mappingFilename)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addConfigurationFile(java.net.URL xmlConfigurationFile)
Add an URL pointing to an XML configuration file that will be used sequentially to configure an instance. |
void |
addConfigurationSource(IConfigurationSource source)
Add a new IConfigurationSource wrapping an XML configuration content. |
void |
addConfigurationStream(java.lang.String name,
java.io.InputStream stream)
Add an InputStream that will be used sequentially to configure an instance. |
void |
configure(java.lang.Object object)
Configure the given object with the configuration that was analyzed. |
void |
configure(java.lang.Object object,
org.w3c.dom.Element element,
ClassMapping parentClassMapping)
Configure the given object by looking at the element (of the configuration). |
java.util.Map<java.lang.String,java.lang.Object> |
getContextualInstances()
|
IPropertyResolver |
getPropertyResolver()
|
boolean |
isElementMapping(java.lang.String name,
ClassMapping classMapping)
Is that the given name should be considered as an XML element (and read the value of this element). |
boolean |
isListElement(java.lang.String name,
ClassMapping classMapping)
Is that the given name should be used with a list. |
protected void |
setAttributes(org.w3c.dom.Element node,
java.lang.Object object,
ClassMapping classMapping)
Sets the attributes on the given object. |
void |
setContextualInstances(java.util.Map<java.lang.String,java.lang.Object> contextualInstances)
Set the contextual instances Map. |
void |
setPropertyResolver(IPropertyResolver propertyResolver)
Set the property resolver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated
public XMLConfiguration(java.net.URL xmlConfigurationURL,
java.lang.String mappingNS,
java.lang.String mappingFilename)
xmlConfigurationURL - the given xml configuration filemappingFilename - per-Package mapping file namemappingNS - the namespace of the mapping
public XMLConfiguration(java.net.URL xmlConfigurationURL,
java.lang.String mappingFilename)
xmlConfigurationURL - the given xml configuration filemappingFilename - per-Package mapping file name
public XMLConfiguration(java.io.InputStream stream,
java.lang.String mappingFilename)
stream - the given xml configuration filemappingFilename - per-Package mapping file namepublic XMLConfiguration(java.lang.String mappingFilename)
mappingFilename - per-Package mapping file name| Method Detail |
|---|
public void addConfigurationFile(java.net.URL xmlConfigurationFile)
xmlConfigurationFile - URL pointing to an XML configuration file
public void addConfigurationStream(java.lang.String name,
java.io.InputStream stream)
InputStream that will be used sequentially to configure an instance.
name - Stream's namestream - the InputStream wrapping an XML configurationpublic void addConfigurationSource(IConfigurationSource source)
IConfigurationSource wrapping an XML configuration content.
source - the configuration's source
public void configure(java.lang.Object object)
throws XMLConfigurationException
object - the object to configure.
XMLConfigurationException - if configuration fails
public boolean isElementMapping(java.lang.String name,
ClassMapping classMapping)
name - the given nameclassMapping - the mapping used to get the info
public boolean isListElement(java.lang.String name,
ClassMapping classMapping)
name - the given nameclassMapping - the mapping used to get the info
public void configure(java.lang.Object object,
org.w3c.dom.Element element,
ClassMapping parentClassMapping)
throws XMLConfigurationException
object - the given object to configure.element - the element that contains configuration.parentClassMapping - the parent class mapping
XMLConfigurationException - if configuration fails
protected void setAttributes(org.w3c.dom.Element node,
java.lang.Object object,
ClassMapping classMapping)
throws XMLConfigurationException
node - the XML element objectobject - the object to configureclassMapping - the mapping data
XMLConfigurationException - if the attributes cannot be setpublic IPropertyResolver getPropertyResolver()
public void setPropertyResolver(IPropertyResolver propertyResolver)
propertyResolver - the property resolverpublic java.util.Map<java.lang.String,java.lang.Object> getContextualInstances()
public void setContextualInstances(java.util.Map<java.lang.String,java.lang.Object> contextualInstances)
contextualInstances - the contextual instances Map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||