org.sape.carbon.core.config.format
Interface ConfigurationDataFormatService

All Known Implementing Classes:
JDOMConfigurationFactory

public interface ConfigurationDataFormatService

Implmentations of this interface will provide persistance mechanisms for org.jdom.Document objects to and from their native raw formats.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.6 $($Author: dvoet $ / $Date: 2003/05/05 21:21:16 $)
Author:
Greg Hinkle, January 2002

Method Summary
 org.jdom.Document readConfigurationStreamToData(String name, InputStream in)
          Loads a CCLNode object from the given InputStream.
 void writeConfigurationStreamToData(org.jdom.Document document, OutputStream out)
          Stores the raw version of the provided CCLNode object in the format that this format service implementation understands.
 

Method Detail

readConfigurationStreamToData

public org.jdom.Document readConfigurationStreamToData(String name,
                                                       InputStream in)
                                                throws ConfigurationFormatException

Loads a CCLNode object from the given InputStream. This node object will represent the full object-graph depiction of a live configuration.

Parameters:
name - The name of the configuration node
in - the InputStream from which the configuration will be read
Returns:
The CCLNode object representing a live object graph of the data from the input stream
Throws:
ConfigurationFormatException - when there is a formatting error with the input stream

writeConfigurationStreamToData

public void writeConfigurationStreamToData(org.jdom.Document document,
                                           OutputStream out)
                                    throws ConfigurationFormatException

Stores the raw version of the provided CCLNode object in the format that this format service implementation understands.

Parameters:
out - The output stream to which the raw configuration data should be written
document - The Configuration object to be stored; may be any subclass of Configuration
Throws:
ConfigurationFormatException - When unable to write a node's raw format to the output stream


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.