|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.util.UtlProps
public final class UtlProps
Utility class containing methods to work with properties.
Several Neeve components support initialization and configuration using properties in the runtime property set. An environment property set is maintained by this class. Upon startup, it is initialized with the Java runtime system property set and updated with properties specified in the property file referenced by the system property 'nv.app.propfile' if present. This method allows the user to further update the property set in case the user wishes to override the property values set using the above described manner.
This class IS supported for use by end users.
Constructor Summary | |
---|---|
UtlProps()
|
Method Summary | |
---|---|
static Properties |
deserialize(String str)
Deerialize a property table from a string |
static Properties |
getEnvProps()
Several Neeve components support initialization and configuration using properties in the runtime property set. |
static Object |
getValue(Map<String,Object> props,
String name)
Get the value of a property from a property table. |
static boolean |
getValue(Map<String,Object> props,
String name,
boolean defValue)
Convenience method to return a property value as a boolean value |
static double |
getValue(Map<String,Object> props,
String name,
double defValue)
Convenience method to return a property value as a numeric value |
static int |
getValue(Map<String,Object> props,
String name,
int defValue)
Convenience method to return a property value as a numeric value |
static short |
getValue(Map<String,Object> props,
String name,
short defValue)
Convenience method to return a property value as a numeric value |
static String |
getValue(Map<String,Object> props,
String name,
String defValue)
Convenience method to return a property value as a String value |
static String |
getValue(Properties props,
String name)
Get the value of a property from a property table. |
static boolean |
getValue(Properties props,
String name,
boolean defValue)
Convenience method to return a property value as a boolean value |
static double |
getValue(Properties props,
String name,
double defValue)
Convenience method to return a property value as a numeric value |
static int |
getValue(Properties props,
String name,
int defValue)
Convenience method to return a property value as an int value |
static short |
getValue(Properties props,
String name,
short defValue)
Convenience method to return a property value as a short value |
static String |
getValue(Properties props,
String name,
String defValue)
Convenience method to return a property value as a String value |
static Object |
getValue(String name)
Deprecated. Use UtlEnv.getValue(String) instead. |
static boolean |
getValue(String name,
boolean defValue)
Deprecated. Use UtlEnv.getValue(String, boolean) instead. |
static double |
getValue(String name,
double defValue)
Deprecated. Use UtlEnv.getValue(String, double) instead. |
static String |
getValue(String name,
String defValue)
Deprecated. Use UtlEnv#getValue(String, String) instead. |
static void |
serialize(Properties props,
StringBuilder builder)
Serialize a property table to a string |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UtlProps()
Method Detail |
---|
public static final Properties getEnvProps()
Several Neeve components support initialization and configuration using properties in the runtime property set. The application property set is maintained by this class. Upon startup, it is initialized with the Java runtime system property set and updated with properties specified in the property file referenced by the system property 'nv.app.propfile' if present. This method allows the user to further update the property set in case the user wishes to override the property values set using the above described manner.
public static String getValue(Properties props, String name)
props
- The property tablename
- The property name
@Deprecated public static final Object getValue(String name)
UtlEnv.getValue(String)
instead.
name
- The property name
public static final Object getValue(Map<String,Object> props, String name)
props
- The property table.name
- The property name
@Deprecated public static String getValue(String name, String defValue)
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
string value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static String getValue(Properties props, String name, String defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
string value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
@Deprecated public static double getValue(String name, double defValue)
UtlEnv.getValue(String, double)
instead.
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
numeric value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static double getValue(Properties props, String name, double defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
numeric value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static int getValue(Properties props, String name, int defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
numeric value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static short getValue(Properties props, String name, short defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
numeric value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
@Deprecated public static boolean getValue(String name, boolean defValue)
UtlEnv.getValue(String, boolean)
instead.
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
boolean value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static boolean getValue(Properties props, String name, boolean defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
boolean value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static String getValue(Map<String,Object> props, String name, String defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
string value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static short getValue(Map<String,Object> props, String name, short defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
numeric value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static int getValue(Map<String,Object> props, String name, int defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
numeric value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static double getValue(Map<String,Object> props, String name, double defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
numeric value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static boolean getValue(Map<String,Object> props, String name, boolean defValue)
props
- The property tablename
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
boolean value. It uses getValue(java.util.Properties, java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static void serialize(Properties props, StringBuilder builder)
props
- The property table to serializebuilder
- The string builder to serialize it to.public static Properties deserialize(String str)
str
- The string to deserialize it from.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |