Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » util » property » [javadoc | source]
org.jboss.util.property
public class: PropertyGroup [javadoc | source]
java.lang.Object
   java.util.Dictionary
      java.util.Hashtable
         java.util.Properties
            org.jboss.util.property.PropertyMap
               org.jboss.util.property.PropertyGroup

All Implemented Interfaces:
    Map, Serializable, Cloneable

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 final  String basename    Base property name 
Fields inherited from org.jboss.util.property.PropertyMap:
PROPERTY_NAME_SEPARATOR,  EMPTY_ARRAY_PROPERTY,  unboundListeners,  boundListeners
Constructor:
 public PropertyGroup(String basename,
    Properties container) 
    Construct a PropertyGroup.
    Parameters:
    basename - Base property name.
    container - Property container.
    Throws:
    NullArgumentException - Basename is null.
Method from org.jboss.util.property.PropertyGroup Summary:
addPropertyListener,   containsKey,   entrySet,   get,   getBaseName,   put,   remove,   removePropertyListener
Methods from org.jboss.util.property.PropertyMap:
addPropertyListener,   addPropertyListener,   addPropertyListeners,   containsProperty,   entrySet,   firePropertyAdded,   firePropertyChanged,   firePropertyRemoved,   getArrayProperty,   getArrayProperty,   getProperty,   getPropertyGroup,   getPropertyGroup,   keySet,   load,   load,   load,   load,   makeIndexPropertyName,   makePrefixedPropertyName,   names,   put,   remove,   removeProperty,   removePropertyListener,   removePropertyListener,   setProperty
Methods from java.util.Properties:
getProperty,   getProperty,   list,   list,   load,   load,   loadFromXML,   propertyNames,   save,   setProperty,   store,   store,   storeToXML,   storeToXML,   stringPropertyNames
Methods from java.util.Hashtable:
clear,   clone,   contains,   containsKey,   containsValue,   elements,   entrySet,   equals,   get,   hashCode,   isEmpty,   keySet,   keys,   put,   putAll,   remove,   size,   toString,   values
Methods from java.util.Dictionary:
elements,   get,   isEmpty,   keys,   put,   remove,   size
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.util.property.PropertyGroup Detail:
 protected  void addPropertyListener(BoundPropertyListener listener) 
    Add a bound property listener.

    Generates a fully qualified property name and adds the listener under that name.

 public boolean containsKey(Object name) 
    Check if this PropertyMap contains a given property name.
 public Set entrySet() 
    Returns an entry set for all properties in this group.

    This is currently ver inefficient, but should get the job done for now.

 public Object get(Object name) 
    Get a property
 public final String getBaseName() 
    Get the base property name for this group.
 public Object put(Object name,
    Object value) 
    Set a property.
 public Object remove(Object name) 
    Remove a property.
 protected boolean removePropertyListener(BoundPropertyListener listener) 
    Remove a bound property listener.

    Generates a fully qualified property name and removes the listener under that name.