com.togethersoft.openapi.util.propertyMap
Class PropertyProviderAdapter


public class PropertyProviderAdapter
implements PropertyProvider

Default implementation of PropertyProvider. Allows to add/remove PropertyMap listener.

Author:
TogetherSoft
Since: Together 4.0

Field Summary
 private ObjectmyPropertyKey
           
 private PropertyMapmyPropertyMap
           

Constructor Summary
PropertyProviderAdapter(PropertyMap propertyMap, Object propertyKey)
          Creates new PropertyProvider with propertyKey name of the only property and with propertyMap set
of values.

Method Summary
 PropertyaddProperty(Object propertyValue)
          Adds new value to this property.
 voidaddPropertyMapListener(PropertyMapListener l)
          Adds listener for PropertyMapEvent.
 booleancanAddProperty(Object propertyValue)
          Checks whether it is possible to add specified value.
 booleanisReadable()
          Checks whether it is possible to read values of this property.
 booleanisWritable()
          Checks whether it is possible to write values to this property.
 Enumerationproperties()
          Returns Enumeration of values.
 voidremovePropertyMapListener(PropertyMapListener l)
          Removes listener for PropertyMapEvent.

Field Detail

myPropertyKey

private Object myPropertyKey

myPropertyMap

private PropertyMap myPropertyMap
Constructor Detail

PropertyProviderAdapter

public PropertyProviderAdapter(PropertyMap propertyMap, Object propertyKey)
Creates new PropertyProvider with propertyKey name of the only property and with propertyMap set
of values.
Parameters:
propertyMap Property's values
propertyKey Name of this property
Method Detail

addProperty

public Property addProperty(Object propertyValue)
Adds new value to this property.
Parameters:
propertyValue Property value to be added
Returns: Added value

addPropertyMapListener

public void addPropertyMapListener(PropertyMapListener l)
Adds listener for PropertyMapEvent.
Parameters:
l Listener to be added

canAddProperty

public boolean canAddProperty(Object propertyValue)
Checks whether it is possible to add specified value.
Parameters:
propertyValue Property value to be checked
Returns: true if it is possible, false otherwise

isReadable

public boolean isReadable()
Checks whether it is possible to read values of this property.
Returns: true if it is possible, false otherwise

isWritable

public boolean isWritable()
Checks whether it is possible to write values to this property.
Returns: true if it is possible, false otherwise

properties

public Enumeration properties()
Returns Enumeration of values.
Returns: Enumeration of values

removePropertyMapListener

public void removePropertyMapListener(PropertyMapListener l)
Removes listener for PropertyMapEvent.
Parameters:
l Listener to be removed

Association Links

to Class com.togethersoft.openapi.util.propertyMap.PropertyMap

to Class java.lang.Object