|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.utils.PropertyUtils
public class PropertyUtils
INTERNAL: Utility class for handling properties and their values.
Constructor Summary | |
---|---|
PropertyUtils()
|
Method Summary | |
---|---|
static int |
getInt(java.lang.String property_value)
|
static int |
getInt(java.lang.String property_value,
int default_value)
INTERNAL: Returns the property value as an int. |
static java.lang.String |
getProperty(java.util.Map properties,
java.lang.String name)
INTERNAL: Helper method used to get better error messages with less typing. |
static java.lang.String |
getProperty(java.util.Map properties,
java.lang.String name,
boolean required)
INTERNAL: Helper method used to get better error messages with less typing. |
static boolean |
isTrue(java.util.Map properties,
java.lang.String name)
INTERNAL: Same as isTrue(Map, String, boolean) with the default set to false; |
static boolean |
isTrue(java.util.Map properties,
java.lang.String name,
boolean default_value)
INTERNAL: Helper method used to get the value of boolean properties. |
static boolean |
isTrue(java.lang.String property_value)
|
static boolean |
isTrue(java.lang.String property_value,
boolean default_value)
|
static java.util.Properties |
loadProperties(java.io.File propfile)
INTERNAL; Reads properties from a file. |
static java.util.Properties |
loadProperties(java.io.InputStream istream)
|
static java.util.Properties |
loadProperties(java.lang.String propfile)
INTERNAL; Reads properties from a file. |
static java.util.Properties |
loadPropertiesFromClassPath(java.lang.String resource)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyUtils()
Method Detail |
---|
public static java.lang.String getProperty(java.util.Map properties, java.lang.String name)
public static java.lang.String getProperty(java.util.Map properties, java.lang.String name, boolean required)
public static boolean isTrue(java.util.Map properties, java.lang.String name, boolean default_value)
public static boolean isTrue(java.util.Map properties, java.lang.String name)
public static boolean isTrue(java.lang.String property_value)
public static boolean isTrue(java.lang.String property_value, boolean default_value)
public static int getInt(java.lang.String property_value, int default_value)
public static int getInt(java.lang.String property_value) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public static java.util.Properties loadProperties(java.lang.String propfile) throws java.io.IOException
java.io.IOException
public static java.util.Properties loadProperties(java.io.File propfile) throws java.io.IOException
java.io.IOException
public static java.util.Properties loadPropertiesFromClassPath(java.lang.String resource) throws java.io.IOException
java.io.IOException
public static java.util.Properties loadProperties(java.io.InputStream istream) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |