org.naftulin.configmgr
Class ConfigurationManagerFactory

java.lang.Object
  extended by org.naftulin.configmgr.ConfigurationManagerFactory

public class ConfigurationManagerFactory
extends java.lang.Object

A factory that creates and maintains configuration management engine and configuration manager.

Since:
1.0
Author:
Henry Naftulin

Method Summary
static ConfigurationManagement getConfigurationManagement()
          Returns configuration management engine object.
static ConfigurationManager getConfigurationManager()
          Returns configuration manager.
static boolean isIniialized()
           
static void setConfigurationFile(java.lang.String configFile)
          Sets a file from which master configuration would be read.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isIniialized

public static boolean isIniialized()

setConfigurationFile

public static void setConfigurationFile(java.lang.String configFile)
                                 throws ConfigurationManagerException
Sets a file from which master configuration would be read. By default, the file is 'config.xml', but it could be owervritten by using this API. Only valid before configuration management is initialized, otherwise throws an exception.

Parameters:
configFile - the configuration file for master record.
Throws:
ConfigurationManagerException - if a configuration management engine is already initiazed.

getConfigurationManagement

public static ConfigurationManagement getConfigurationManagement()
                                                          throws ConfigurationManagerException
Returns configuration management engine object. If the object was not created yet, this call will create it.

Returns:
configuration management engine object.
Throws:
ConfigurationManagerException - if an error occured while creating a configuration managment object.

getConfigurationManager

public static ConfigurationManager getConfigurationManager()
                                                    throws ConfigurationManagerException
Returns configuration manager. If the manager was not created yet, this call will create it.

Returns:
configuration manager.
Throws:
ConfigurationManagerException - if an error occurs while creating a configuration manager.


Copyright © 2009. All Rights Reserved.