| java.lang.Object org.sape.carbon.core.config.format.DefaultConfigurationFormatService
DefaultConfigurationFormatService | public class DefaultConfigurationFormatService implements ConfigurationFormatService(Code) | | This default implementation of the configuration format serivce provides
an XML based configuration to implemented interface form of configurations.
Copyright 2002 Sapient
since: carbon 1.0 author: Greg Hinkle, January 2002 version: $Revision: 1.34 $($Author: dvoet $ / $Date: 2003/07/29 18:57:25 $) |
constructIndexedName | protected String constructIndexedName(String parentName, String name, int index)(Code) | | Creates an indexed name for use within the format service. If
parentName is not null, an absolute name is created, otherwise,
parentName is ignored.
Parameters: parentName - for use when creating absolute indexed names, can benull for creating local names Parameters: name - name of indexed attribute, cannot be null Parameters: index - cannot be negative String indexed name since: carbon 1.1 |
constructMapName | protected String constructMapName(String parentName, String name, String key)(Code) | | Creates an indexed name for use within the format service. If
parentName is not null, an absolute name is created, otherwise,
parentName is ignored.
Parameters: parentName - for use when creating absolute indexed names, can benull for creating local names Parameters: name - name of indexed attribute, cannot be null Parameters: key - they lookup key for the map attribute String indexed name since: carbon 2.0 |
getChildConfigurationNames | public Set getChildConfigurationNames(Configuration parentConfig)(Code) | | This implementation uses Introspection to determine the list of
all attributes the parentConfig contains. It then uses the
ConfigurationTypeService to determine which of those attributes
are actually sub-configurations (i.e. complex types). If an attribute
is a Map or Array, the actual data is retrieved from parentConfig
and a name is returned for each element.
See Also: ConfigurationFormatService.getChildConfigurationNames |
newConfiguration | public Configuration newConfiguration(Class configurationClass)(Code) | |
Creates a new configuration object of the type specified.
Parameters: configurationClass - type of the configuration object to build the newly created configuration |
readConfigurationStream | public Configuration readConfigurationStream(String name, InputStream in) throws ConfigurationFormatException(Code) | | Loads a Configuration object from the given
InputStream . This Configuration object will represent
the full object-graph depiction of a live configuration.
Parameters: name - The name of the configuration node Parameters: in - the java.io.InputStream from whichthe configuration will be read throws: ConfigurationFormatException - when there is a formatting errorwith the input stream The Configuration object representing a liveobject graph of the data from the input stream |
writeConfigurationStream | public void writeConfigurationStream(Configuration configuration, OutputStream out) throws ConfigurationFormatException(Code) | | Stores the raw version of the provided Configuration
object in the format that this format service implementation
understands.
Parameters: out - The output stream to which the raw configurationdata should be written Parameters: configuration - The Configuration object to be stored; may be anysubclass of Configuration throws: ConfigurationFormatException - When unable to write aconfiguration's raw format to the output stream |
|
|