Expresso 5-6

com.jcorporate.expresso.kernel.management
Class TraxDOMWriter

java.lang.Object
  extended bycom.jcorporate.expresso.kernel.management.TraxDOMWriter
All Implemented Interfaces:
DOMWriter

public class TraxDOMWriter
extends Object
implements DOMWriter

DOM Writer that uses the Java TRAX API for writing the Expresso configuration file. This requires that an Java TRAX compliant XSL engine is available in the classpath. An example of this is the Xalan library from Apache.

Version:
$Revision: 1.7 $ on $Date: 2004/11/17 20:48:17 $
Author:
Michael Rimov

Constructor Summary
TraxDOMWriter()
           
 
Method Summary
 String getRequiredClass()
          Retrieve a class that must exist in the classpath for this to work.
protected  boolean isTraxInstalled()
          Checks to make sure that the appropriate TransformerFactory is available before attempting to work with things.
 void saveDocument(OutputStream os, org.w3c.dom.Document document)
          Override to actually save a DOM document to the output stream via whatever method you desire
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraxDOMWriter

public TraxDOMWriter()
Method Detail

saveDocument

public void saveDocument(OutputStream os,
                         org.w3c.dom.Document document)
                  throws ExpressoRuntimeException
Description copied from interface: DOMWriter
Override to actually save a DOM document to the output stream via whatever method you desire

Specified by:
saveDocument in interface DOMWriter
Parameters:
os - The output stream to save to
document - the DOM document representing the config.
Throws:
ExpressoRuntimeException - if there's an error saving the file.

getRequiredClass

public String getRequiredClass()
Retrieve a class that must exist in the classpath for this to work. Used as a sanity check to make sure the appropriate jars are installed.

Specified by:
getRequiredClass in interface DOMWriter
Returns:
java.lang.String - the name for TransformerFactory

isTraxInstalled

protected boolean isTraxInstalled()
Checks to make sure that the appropriate TransformerFactory is available before attempting to work with things.

Returns:
true if we can find the appropriate TRAX API objects

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.