com.germinus.easyconf
Class EasyConf

java.lang.Object
  extended bycom.germinus.easyconf.EasyConf

public class EasyConf
extends java.lang.Object

Main class to obtain the configuration of a software component. The main method is getConfiguration which must be given the name of a component.

Author:
jferrer@germinus.com

Method Summary
static ComponentConfiguration getConfiguration(java.lang.String componentName)
          Get the full configuration of the given component.
static ComponentConfiguration getConfiguration(java.lang.String companyId, java.lang.String componentName)
          Get the full configuration of the given component, for the given company.
static void refreshAll()
          Refresh the configuration of all components KNOWN BUG: this method does not refresh the properties configuration because the underlying library Jakarta Commons Configuration also contains a cache which is not refreshable.
static void refreshComponent(java.lang.String componentName)
          Refresh the configuration of the given component KNOWN BUG: this method does not refresh the properties configuration because the underlying library Jakarta Commons Configuration also contains a cache which is not refreshable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConfiguration

public static ComponentConfiguration getConfiguration(java.lang.String componentName)
Get the full configuration of the given component. The configuration will be cached so that next calls will not need to reload the properties or XML files again.

Parameters:
componentName - any String which can be used to identified a configuration component.
Returns:
a ComponentConf instance

getConfiguration

public static ComponentConfiguration getConfiguration(java.lang.String companyId,
                                                      java.lang.String componentName)
Get the full configuration of the given component, for the given company. This method should be used when the application is to be deployed in an ASP model where several companies want different configurations for the same running applications The configuration will be cached so that next calls will not need to reload the properties or XML files again.

Parameters:
companyId - the identifier of the company whose specific configuration should be read
componentName - any String which can be used to identified a configuration component.
Returns:
a ComponentConf instance

refreshComponent

public static void refreshComponent(java.lang.String componentName)
Refresh the configuration of the given component KNOWN BUG: this method does not refresh the properties configuration because the underlying library Jakarta Commons Configuration also contains a cache which is not refreshable. This issue is scheduled to be solved after version 1.0 of such library.


refreshAll

public static void refreshAll()
Refresh the configuration of all components KNOWN BUG: this method does not refresh the properties configuration because the underlying library Jakarta Commons Configuration also contains a cache which is not refreshable. This issue is scheduled to be solved after version 1.0 of such library.



Copyright © 2005 EasyConf team. All Rights Reserved.