com.objectwave.configuration.xml
Class XmlBootstrap

java.lang.Object
  |
  +--com.objectwave.configuration.xml.XmlBootstrap

public class XmlBootstrap
extends java.lang.Object

The core feature of this class is the ability to lookup an XML document for the XmlConfigurationService.

Version:
$Id: XmlBootstrap.java,v 1.1 2002/08/12 20:14:57 dave_hoag Exp $
Author:
dhoag
See Also:
locateXmlMap(com.objectwave.configuration.PropertySource, java.lang.String)

Constructor Summary
XmlBootstrap()
          Constructor for the XmlBootstrap object
 
Method Summary
protected  java.lang.String deriveXmlFileName(java.lang.String categoryId, PropertySource context)
           
 java.net.URL getDocumentSource(PropertySource context, java.lang.String categoryId)
          Gets the DocumentSource attribute of the XmlBootstrap object.
protected  java.net.URL locateXmlMap(PropertySource context, java.lang.String categoryId)
          Find the XML document that contains the configuration information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlBootstrap

public XmlBootstrap()
Constructor for the XmlBootstrap object

Method Detail

getDocumentSource

public java.net.URL getDocumentSource(PropertySource context,
                                      java.lang.String categoryId)
                               throws ConfigurationException,
                                      java.io.FileNotFoundException
Gets the DocumentSource attribute of the XmlBootstrap object.

Parameters:
context -
categoryId -
Returns:
The DocumentSource value
Throws:
ConfigurationException
java.io.FileNotFoundException
See Also:
locateXmlMap(com.objectwave.configuration.PropertySource, java.lang.String)

locateXmlMap

protected java.net.URL locateXmlMap(PropertySource context,
                                    java.lang.String categoryId)
                             throws ConfigurationException,
                                    java.io.FileNotFoundException
Find the XML document that contains the configuration information. Use a couple of ways to attempt to locate and XML document. The name of the document is either the class name of the context.getExpectedClass or the value found in System.properties at the categoryId. If the PropertySource class is test.this.PropertySource & the exected class for this PropertySource is another.way.PropertyDetail. The default lookup will first search for an XML document called PropertyDetail.xml in the test.this.PropertySource class location. Next it searches for a system resource on the classpath in the path /another/way/PropertyDetail.xml

Parameters:
categoryId - String The tag name for the xml resource.
context -
Returns:
The URL for the XML file
Throws:
ConfigurationException
java.io.FileNotFoundException

deriveXmlFileName

protected java.lang.String deriveXmlFileName(java.lang.String categoryId,
                                             PropertySource context)