|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.twainconnect.core.PropertyManager
public class PropertyManager
Using a helper class to get to our properties file. The file is bundled in the jar's CLASSPATH. In order to override the values place a new properties file in the path structure in your local CLASSPATH outside of the jar.
| Method Summary | |
|---|---|
static PropertyManager |
getInstance()
Singleton interface to get at com/twainconnect/twainconnect.properties |
java.lang.String |
getSystemProperty(java.lang.String key,
java.lang.String defaultValue)
Wrapper around the System.getProperties().get(key) API
call. |
java.lang.String |
getValue(java.lang.String key)
Given a key look up the value in the twainconnect.properties file |
java.lang.String |
getValue(java.lang.String resourceName,
java.lang.String key)
By default the Property Manager uses the "com/twainconnect/twainconnect.properties" file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static PropertyManager getInstance()
public java.lang.String getValue(java.lang.String resourceName,
java.lang.String key)
resourceName - is the name of the properties filekey - of the key-value pair
public java.lang.String getValue(java.lang.String key)
MissingResourceException
public java.lang.String getSystemProperty(java.lang.String key,
java.lang.String defaultValue)
System.getProperties().get(key) API
call. Checks for null and empty values. Regardless return a null
result under those scenarios
key -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||