org.jbind.xml.facade
Class ConfigurationCode
java.lang.Object
org.jbind.xml.facade.XmlCode
org.jbind.xml.facade.ConfigurationCode
- All Implemented Interfaces:
- IConfigurationCode, IXmlCode
- Direct Known Subclasses:
- ApplicationCode
- public class ConfigurationCode
- extends XmlCode
- implements IConfigurationCode
Method Summary |
IConfiguration |
getConfiguration()
|
void |
setup()
Sets up the configuration by visiting all nodes in the XML configuration data.
|
void |
tearDown()
Tears down the configuration by visiting all node in the XML configuration data.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationCode
public ConfigurationCode(java.net.URL aUrl,
IDataContext aDataContext)
- Creates a configurer.
- Parameters:
aUrl
- (required).aDataContext
- (optional).
ConfigurationCode
public ConfigurationCode(org.xml.sax.InputSource anInputSource,
IDataContext aDataContext)
getConfiguration
public IConfiguration getConfiguration()
throws XmlException
- Specified by:
getConfiguration
in interface IConfigurationCode
- Throws:
XmlException
setup
public void setup()
throws XmlException
- Description copied from interface:
IConfigurationCode
- Sets up the configuration by visiting all nodes in the XML configuration data.
If a node implements the
ISetupAndTearDown
interface
then its setup
method is called during a visit.
Descendant nodes are setup before their ancestors.
The getNbSetupAndTearDownLevels
method of the XML configuration data determines how often the data is visited.
The visit is iterated starting at level 0.
- Specified by:
setup
in interface IConfigurationCode
- Throws:
XmlException
tearDown
public void tearDown()
throws XmlException
- Description copied from interface:
IConfigurationCode
- Tears down the configuration by visiting all node in the XML configuration data.
If a node implements the
ISetupAndTearDown
interface
then its setup
tear down method is called.
Ancestor nodes are teared down before their descendants.
The getNbSetupAndTearDownLevels
method of the XML configuration data determines how often the data is visited.
The visit is iterated starting at the number of levels - 1.
- Specified by:
tearDown
in interface IConfigurationCode
- Throws:
XmlException