com.metamatrix.dqp.embedded.configuration
Class ServerConfigFileWriter

java.lang.Object
  extended by com.metamatrix.dqp.embedded.configuration.ServerConfigFileWriter

public class ServerConfigFileWriter
extends java.lang.Object

A utility to write/convert the ServerConfig file from its object form.

Since:
4.3

Constructor Summary
ServerConfigFileWriter()
           
 
Method Summary
static ConfigurationModelContainer addConnectorBinding(ConfigurationModelContainer model, ConnectorBinding binding)
          Add the Connector Bindings to the Configuration object and return the modified object
static ConfigurationModelContainer addConnectorType(ConfigurationModelContainer model, ConnectorBindingType type)
          Add the connector Type to the configuration object supplied and return the modified object
static ConfigurationModelContainer addProperties(ConfigurationModelContainer model, java.util.Properties properties)
          Add the specified properties to the configuration object and return the modified object
static ConfigurationModelContainer addProperty(ConfigurationModelContainer model, java.lang.String propertyName, java.lang.String propertyValue)
          Add the given property to the configuration object and return the modified object
static ConfigurationModelContainer deleteConnectorBinding(ConfigurationModelContainer model, ConnectorBinding binding)
          Remove the Connector Bindings to the Configuration object and return the modified object
static ConfigurationModelContainer deleteConnectorType(ConfigurationModelContainer model, ConnectorBindingType type)
          Delete the connector Type to the configuration object supplied and return the modified object
static void write(ConfigurationModelContainer model, java.net.URL configFileURL)
          Write the Server Configuration into supplied file, in the known Server Configuration format as in config.xml
static char[] writeToCharArray(ConfigurationModelContainer model)
          Write the Server Configuration into supplied file, in the known Server Configuration format as in config.xml (This is clearly a hack without Mr.Halbert's help)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerConfigFileWriter

public ServerConfigFileWriter()
Method Detail

writeToCharArray

public static char[] writeToCharArray(ConfigurationModelContainer model)
                               throws MetaMatrixComponentException
Write the Server Configuration into supplied file, in the known Server Configuration format as in config.xml (This is clearly a hack without Mr.Halbert's help)

Parameters:
properties -
Returns:
Throws:
ApplicationInitializationException
MetaMatrixComponentException
Since:
4.3

write

public static void write(ConfigurationModelContainer model,
                         java.net.URL configFileURL)
                  throws MetaMatrixComponentException
Write the Server Configuration into supplied file, in the known Server Configuration format as in config.xml

Parameters:
properties -
configFileURL -
Throws:
ApplicationInitializationException
MetaMatrixComponentException
Since:
4.3

addConnectorBinding

public static ConfigurationModelContainer addConnectorBinding(ConfigurationModelContainer model,
                                                              ConnectorBinding binding)
                                                       throws MetaMatrixComponentException
Add the Connector Bindings to the Configuration object and return the modified object

Parameters:
model - - Configuration to be changed.
binding - - Connector binding to add/replace
Returns:
modified object
Throws:
MetaMatrixComponentException
Since:
4.3

deleteConnectorBinding

public static ConfigurationModelContainer deleteConnectorBinding(ConfigurationModelContainer model,
                                                                 ConnectorBinding binding)
                                                          throws MetaMatrixComponentException
Remove the Connector Bindings to the Configuration object and return the modified object

Parameters:
model - - Configuration to be changed.
binding - - Connector binding to add/replace
Returns:
modified object
Throws:
MetaMatrixComponentException
Since:
4.3

addConnectorType

public static ConfigurationModelContainer addConnectorType(ConfigurationModelContainer model,
                                                           ConnectorBindingType type)
                                                    throws MetaMatrixComponentException
Add the connector Type to the configuration object supplied and return the modified object

Parameters:
model - - current configuration to be modified
type - - connector type to be added/replaced
Returns:
- modified configuration
Throws:
MetaMatrixComponentException
Since:
4.3

deleteConnectorType

public static ConfigurationModelContainer deleteConnectorType(ConfigurationModelContainer model,
                                                              ConnectorBindingType type)
                                                       throws MetaMatrixComponentException
Delete the connector Type to the configuration object supplied and return the modified object

Parameters:
model - - current configuration to be modified
type - - connector type to be added/replaced
Returns:
- modified configuration
Throws:
MetaMatrixComponentException
Since:
4.3

addProperty

public static ConfigurationModelContainer addProperty(ConfigurationModelContainer model,
                                                      java.lang.String propertyName,
                                                      java.lang.String propertyValue)
                                               throws MetaMatrixComponentException
Add the given property to the configuration object and return the modified object

Parameters:
model - - model to be modified
propertyName - - Property Name
propertyValue - - value to be added/replaced.
Returns:
- modified configuration object
Throws:
MetaMatrixComponentException
Since:
4.3

addProperties

public static ConfigurationModelContainer addProperties(ConfigurationModelContainer model,
                                                        java.util.Properties properties)
                                                 throws MetaMatrixComponentException
Add the specified properties to the configuration object and return the modified object

Parameters:
model - - model to be modified
properties - - properties to add/replace.
Returns:
- modified configuration object
Throws:
MetaMatrixComponentException
Since:
4.3


Copyright © 2009. All Rights Reserved.