|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary java.util.Hashtable java.util.Properties org.jboss.util.property.PropertyMap org.jboss.util.property.PropertyGroup
This is a helper class to access a group of properties with out having to refer to their full names.
This class needs more work to be fully functional. It should suffice for adding property listeners and getting/setting property values, but other activies might not work out so well.
Field Summary | |
protected String |
basename
Base property name |
Fields inherited from class org.jboss.util.property.PropertyMap |
boundListeners, EMPTY_ARRAY_PROPERTY, PROPERTY_NAME_SEPARATOR, unboundListeners |
Fields inherited from class java.util.Properties |
defaults |
Constructor Summary | |
PropertyGroup(String basename,
Properties container)
Construct a PropertyGroup. |
Method Summary | |
protected void |
addPropertyListener(BoundPropertyListener listener)
Add a bound property listener. |
boolean |
containsKey(Object name)
Check if this PropertyMap contains a given property name. |
Set |
entrySet()
Returns an entry set for all properties in this group. |
Object |
get(Object name)
Get a property |
String |
getBaseName()
Get the base property name for this group. |
Object |
put(Object name,
Object value)
Set a property. |
Object |
remove(Object name)
Remove a property. |
protected boolean |
removePropertyListener(BoundPropertyListener listener)
Remove a bound property listener. |
Methods inherited from class org.jboss.util.property.PropertyMap |
addPropertyListener, addPropertyListeners, containsProperty, entrySet, firePropertyAdded, firePropertyChanged, firePropertyRemoved, getArrayProperty, getArrayProperty, getProperty, getPropertyGroup, getPropertyGroup, keySet, load, load, load, load, makeIndexPropertyName, makePrefixedPropertyName, names, removeProperty, removePropertyListener, setProperty |
Methods inherited from class java.util.Properties |
getProperty, list, list, load, propertyNames, save, store |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsValue, elements, equals, hashCode, isEmpty, keys, keySet, putAll, rehash, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected final String basename
Constructor Detail |
public PropertyGroup(String basename, Properties container)
basename
- Base property name.container
- Property container.
NullArgumentException
- Basename is null.Method Detail |
public final String getBaseName()
public boolean containsKey(Object name)
name
- Property name.
public Object put(Object name, Object value)
put
in interface Map
put
in class PropertyMap
name
- Property name.value
- Property value.
public Object get(Object name)
name
- Property name.
public Object remove(Object name)
remove
in interface Map
remove
in class PropertyMap
name
- Property name.
public Set entrySet()
This is currently ver inefficient, but should get the job done for now.
protected void addPropertyListener(BoundPropertyListener listener)
Generates a fully qualified property name and adds the listener under that name.
addPropertyListener
in class PropertyMap
listener
- Bound property listener to add.protected boolean removePropertyListener(BoundPropertyListener listener)
Generates a fully qualified property name and removes the listener under that name.
removePropertyListener
in class PropertyMap
listener
- Bound property listener to remove.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |