Package com.germinus.easyconf
Class EasyConf
- java.lang.Object
-
- com.germinus.easyconf.EasyConf
-
public class EasyConf extends java.lang.ObjectMain class to obtain the configuration of a software component. The main method isgetConfigurationwhich must be given the name of a component.- Author:
- jferrer@germinus.com
-
-
Constructor Summary
Constructors Modifier Constructor Description privateEasyConf()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ComponentConfigurationgetConfiguration(java.lang.String componentName)Get the full configuration of the given component.static ComponentConfigurationgetConfiguration(java.lang.String companyId, java.lang.String componentName)Get the full configuration of the given component, for the given company.static voidrefreshAll()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 voidrefreshComponent(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.
-
-
-
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
ComponentConfinstance
-
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 readcomponentName- any String which can be used to identified a configuration component.- Returns:
- a
ComponentConfinstance
-
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.
-
-