|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.townleyenterprises.common.AppConfig
This file provides a generalized mechanism for centralizing access to application configuration information. By default, any system property will override any value provided by the application.
The runtime behavior of this class may be configured using the following properties:
te-code.appconfig.overridesystemproperties
- set to
yes or true to allow overiding of the system property values from
registered ConfigSupplier
instances.
Method Summary | |
static java.lang.String |
get(java.lang.String name)
This method returns the appropriate property value. |
static java.lang.String |
get(java.lang.String prefix,
java.lang.String name)
Alternative method that provides a prefix in addition to the specific parameter to retrieve. |
static java.util.List |
getConfigLoaders()
This method is used to provide access to the list of registered ConfigLoader instances. |
static ConfigSupplier |
getPersistenceConfigSupplier()
This method is used to return a reference to the persistence configuration supplier. |
static java.util.Properties |
getProperties()
This method allows access to all of the property values so that external code can be configured from the unified properties. |
static void |
registerAppSupplier(ConfigSupplier s)
This method is used to register an ConfigSupplier with the class. |
static void |
registerPersistenceSupplier(ConfigSupplier s)
This method is used to register a config supplier for the persistence information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void registerAppSupplier(ConfigSupplier s) throws java.io.IOException
java.io.IOException
- if there is a problem accessing the configuration
information.public static void registerPersistenceSupplier(ConfigSupplier s)
public static java.lang.String get(java.lang.String name)
name
- the parameter key
public static java.lang.String get(java.lang.String prefix, java.lang.String name)
prefix
- the prefixname
- the actual param name
public static ConfigSupplier getPersistenceConfigSupplier()
public static java.util.Properties getProperties()
public static java.util.List getConfigLoaders()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |