|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.core.utils.PropertiesUtils
public class PropertiesUtils
| Nested Class Summary | |
|---|---|
static interface |
PropertiesUtils.SymbolTable
|
| Constructor Summary | |
|---|---|
PropertiesUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
getProperty(Properties props,
String name,
boolean defaultVal)
Get a boolean valued property, returning default value if it is not set or is set to an invalid value. |
static int |
getProperty(Properties props,
String name,
int defaultVal)
Get a int valued property, returning default value if it is not set or is set to an invalid value. |
static long |
getProperty(Properties props,
String name,
long defaultVal)
Get a long valued property, returning default value if it is not set or is set to an invalid value |
static String |
getProperty(Properties props,
String name,
String defaultVal)
Get a String valued property, returning default value if it is not set or is set to an invalid value. |
static String |
substitute(String initialString,
Properties properties)
This recursively substitutes occurrences ${property.name} in initialString with the value of the property property.name taken from the supplied properties object. |
static String |
substitute(String initialString,
Properties properties,
String prefix,
String suffix)
|
static String |
substitute(String initialString,
PropertiesUtils.SymbolTable symbols)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesUtils()
| Method Detail |
|---|
public static String substitute(String initialString,
Properties properties)
initialString - the string to perform the substitutions inproperties - the properties to take the values from
public static String substitute(String initialString,
Properties properties,
String prefix,
String suffix)
public static String substitute(String initialString,
PropertiesUtils.SymbolTable symbols)
public static String getProperty(Properties props,
String name,
String defaultVal)
name - the property namedefaultVal - the default value to use if the property is not set
public static boolean getProperty(Properties props,
String name,
boolean defaultVal)
name - the property namedefaultVal - the default value to use if the property is not set
public static int getProperty(Properties props,
String name,
int defaultVal)
name - the property namedefaultVal - the default value to use if the property is not set
public static long getProperty(Properties props,
String name,
long defaultVal)
name - the property namedefaultVal - the default value to use if the property is not set
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||