org.exolab.jmscts.util
Class ConfigExpander
java.lang.Object
|
+--org.exolab.jmscts.util.ConfigExpander
- All Implemented Interfaces:
- org.exolab.castor.xml.EventProducer
- public class ConfigExpander
- extends java.lang.Object
- implements org.exolab.castor.xml.EventProducer
This class expands elements and attributes in XML documents as the document
is being parsed. It is designed to be used in conjunction with the Castor
unmarshalling framework.
To be expanded, values must contain text of the form ${property.name}
, where property.name is a property returned
by System.getProperty().
If no property exists, the value remains unchanged.
- Version:
- $Revision: 1.2 $ $Date: 2004/02/03 21:52:13 $
- Author:
- Tim Anderson
- See Also:
EventProducer
,
Unmarshaller
Constructor Summary |
ConfigExpander(java.io.Reader reader)
Construct a new instance |
Method Summary |
void |
setDocumentHandler(org.xml.sax.DocumentHandler handler)
Sets the DocumentHandler to send SAX events to |
void |
start()
Signals to start producing events |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigExpander
public ConfigExpander(java.io.Reader reader)
- Construct a new instance
- Parameters:
reader
- the XML document reader
setDocumentHandler
public void setDocumentHandler(org.xml.sax.DocumentHandler handler)
- Sets the DocumentHandler to send SAX events to
- Specified by:
setDocumentHandler
in interface org.exolab.castor.xml.EventProducer
- Parameters:
handler
- the handler to forward events to
start
public void start()
throws org.xml.sax.SAXException
- Signals to start producing events
- Specified by:
start
in interface org.exolab.castor.xml.EventProducer
- Throws:
org.xml.sax.SAXException
- if the document cannot be parsed
Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.