|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.util.property.PropertyManager
A more robust replacement of java.lang.System for property access.
Field Summary | |
static String |
DEFAULT_PROPERTY_READER_TOKEN
Token which specifies the default property reader |
static String |
READER_PROPERTY_NAME
Property reader list property name |
Method Summary | |
static void |
addPropertyListener(PropertyListener listener)
Add a property listener. |
static void |
addPropertyListeners(PropertyListener[] listeners)
Add an array of property listeners. |
static boolean |
containsProperty(String name)
Check if this map contains a given property. |
static String[] |
getArrayProperty(String name)
Get an array style property. |
static String[] |
getArrayProperty(String base,
String[] defaultValues)
Get an array style property. |
static PropertyMap |
getDefaultPropertyMap()
Get the default PropertyMap. |
static String |
getProperty(String name)
Get a property. |
static String |
getProperty(String name,
String defaultValue)
Get a property. |
static PropertyGroup |
getPropertyGroup(String basename)
Get a property group for the given property base. |
static PropertyGroup |
getPropertyGroup(String basename,
int index)
Get a property group for the given property base at the given index. |
static void |
load(Map map)
Load properties from a map. |
static void |
load(PropertyReader reader)
Load properties from a PropertyReader. |
static void |
load(String classname)
Load properties from a PropertyReader specifed by the given class name. |
static void |
load(String prefix,
Map map)
Load properties from a map. |
static Iterator |
names()
Return an iterator over all contained property names. |
static String |
removeProperty(String name)
Remove a property. |
static boolean |
removePropertyListener(PropertyListener listener)
Remove a property listener. |
static String |
setProperty(String name,
String value)
Set a property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String READER_PROPERTY_NAME
public static final String DEFAULT_PROPERTY_READER_TOKEN
Method Detail |
public static PropertyMap getDefaultPropertyMap()
public static void addPropertyListener(PropertyListener listener)
listener
- Property listener to add.public static void addPropertyListeners(PropertyListener[] listeners)
listeners
- Array of property listeners to add.public static boolean removePropertyListener(PropertyListener listener)
listener
- Property listener to remove.
public static void load(String prefix, Map map) throws PropertyException
prefix
- Prefix to append to all map keys (or null).map
- Map containing properties to load.
PropertyException
public static void load(Map map) throws PropertyException, IOException
map
- Map containing properties to load.
PropertyException
IOException
public static void load(PropertyReader reader) throws PropertyException, IOException
reader
- PropertyReader to read properties from.
PropertyException
IOException
public static void load(String classname) throws PropertyException, IOException
classname
- Class name of a PropertyReader to
read from.
PropertyException
IOException
public static String setProperty(String name, String value)
name
- Property name.value
- Property value.
public static String removeProperty(String name)
name
- Property name.
public static String getProperty(String name, String defaultValue)
name
- Property name.defaultValue
- Default property value.
public static String getProperty(String name)
name
- Property name.
public static String[] getArrayProperty(String base, String[] defaultValues)
base
- Base property name.defaultValues
- Default property values.
public static String[] getArrayProperty(String name)
name
- Property name.
public static Iterator names()
public static boolean containsProperty(String name)
name
- Property name.
public static PropertyGroup getPropertyGroup(String basename)
basename
- Base property name.
public static PropertyGroup getPropertyGroup(String basename, int index)
basename
- Base property name.index
- Array property index.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |