org.apache.beehive.controls.api.properties
Class BaseMap

Object
  extended by BaseMap
All Implemented Interfaces:
Serializable, PropertyMap
Direct Known Subclasses:
AnnotatedElementMap, BeanPropertyMap

public abstract class BaseMap
extends Object
implements PropertyMap, Serializable

The BaseMap class provide an abstract base PropertyMap class from which other concrete PropertyMap implementation can derive. It contains some common code (such as property key validation and the implementation of the base delegation model) that is generically useful.

See Also:
Serialized Form

Constructor Summary
BaseMap()
           
 
Method Summary
 boolean containsPropertySet(Class<? extends Annotation> propertySet)
          Returns true if the PropertyMap contains one or more values for the specified PropertySet, false otherwise.
 PropertyMap getDelegateMap()
          Returns a delegate base property map from which values will be derived if not found within the local property map.
 Class getMapClass()
          Returns the PropertySet or Control interface class associated with the PropertyMap.
 Object getProperty(PropertyKey key)
          Returns the property value specified by 'key' within this map.
<T extends Annotation>
T
getPropertySet(Class<T> propertySet)
          Returns a PropertySet proxy instance that derives its data from the contents of the property map.
protected  boolean isValidKey(PropertyKey key)
          Checks to ensure that the provided key is a valid key for this PropertyMap
 void setDelegateMap(PropertyMap delegateMap)
          Sets a delegate base property map from which values will be derived if not found within the local property map.
protected  void setMapClass(Class mapClass)
          Sets the PropertySet or Control interface associated with this map.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface PropertyMap
setProperty
 

Constructor Detail

BaseMap

public BaseMap()
Method Detail

setMapClass

protected void setMapClass(Class mapClass)
Sets the PropertySet or Control interface associated with this map. Only properties declared by the PropertySet or one of the PropertySets on the Control interface may be used with this map.


getMapClass

public Class getMapClass()
Returns the PropertySet or Control interface class associated with the PropertyMap.

Specified by:
getMapClass in interface PropertyMap

isValidKey

protected boolean isValidKey(PropertyKey key)
Checks to ensure that the provided key is a valid key for this PropertyMap


setDelegateMap

public void setDelegateMap(PropertyMap delegateMap)
Sets a delegate base property map from which values will be derived if not found within the local property map.

Specified by:
setDelegateMap in interface PropertyMap

getDelegateMap

public PropertyMap getDelegateMap()
Returns a delegate base property map from which values will be derived if not found within the local property map.

Specified by:
getDelegateMap in interface PropertyMap

getProperty

public Object getProperty(PropertyKey key)
Returns the property value specified by 'key' within this map.

Specified by:
getProperty in interface PropertyMap

containsPropertySet

public boolean containsPropertySet(Class<? extends Annotation> propertySet)
Returns true if the PropertyMap contains one or more values for the specified PropertySet, false otherwise.

Specified by:
containsPropertySet in interface PropertyMap

getPropertySet

public <T extends Annotation> T getPropertySet(Class<T> propertySet)
Returns a PropertySet proxy instance that derives its data from the contents of the property map. Will return null if the PropertyMap does not contain any properties associated with the specified PropertySet.

Specified by:
getPropertySet in interface PropertyMap