|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.speakright.core.SRConfig
public class SRConfig
Reads property files. Currently reads a single .property file for the app. Properties can be overriden (but only in unit tests)
Later we may hook this in with Jakarta Commons or DB-based config
| Constructor Summary | |
|---|---|
SRConfig()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
configPath()
Path of the config file (eg. |
static boolean |
getBooleanProperty(java.lang.String propName)
Get property as a boolean. |
static java.lang.String |
getProperty(java.lang.String propName)
Get a property. |
static void |
init(java.lang.String path,
java.lang.String fileName)
MUST be called the first SpeakRight method called in an application. |
static void |
overrideProperty(java.lang.String propName,
java.lang.String val)
Add an override value for a property. |
static void |
uninit()
Reset so init needs to be called again. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SRConfig()
| Method Detail |
|---|
public static void init(java.lang.String path,
java.lang.String fileName)
path - full path to the properties file. The path is normally the same as the project dir.fileName - name of the properties file.public static java.lang.String configPath()
public static void uninit()
init needs to be called again.
Only used by unit tests.
public static void overrideProperty(java.lang.String propName,
java.lang.String val)
propName - val - public static java.lang.String getProperty(java.lang.String propName)
init hasn't yet been called.
propName -
public static boolean getBooleanProperty(java.lang.String propName)
propName -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||