|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Provides basic abilities to an data-centric Object.
Defines several basic elements required for a data-centric Object. Those elements help a data Object fit within pieces of the Java Beans specification, and provide other useful things.
This ISupportObject instance provides support for bound
and contrained properties on a Java Bean. Support for bound
properties provide a way to notify interested parties when an attempt is
made to change an instance's bound property. The
VetoableChangeListener class allows applications to control the
semantics of whether a change to a contrained property is permitted.
See the current Java Beans specifications for more information.
There is also support for a property scratchpad containing key/value
pairs which can be used to associate values with this
ISupportObject instance. For any given ISupportObject instance,
the property keys are unique (though values need not be).
This ISupportObject allows an optional identifier to be assigned
to the ISupportObject instance. Identifiers can be used to
distinguish, categorize, or label instances within a collection; however,
identifiers need not be unique within a collection.
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener aListener)
Adds a PropertyChangeListener to this
ISupportObject instance. |
void |
addPropertyChangeListener(java.lang.String aPropertyName,
java.beans.PropertyChangeListener aListener)
Adds a PropertyChangeListener to this
ISupportObject instance for the specified property. |
void |
addVetoableChangeListener(java.lang.String aPropertyName,
java.beans.VetoableChangeListener aListener)
Adds a VetoableChangeListener to this
ISupportObject instance for the specified property. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener aListener)
Adds a VetoableChangeListener to this
ISupportObject instance. |
void |
firePropertyChange(java.beans.PropertyChangeEvent aEvent)
Fires a PropertyChangeEvent from this
ISupportObject instance. |
void |
firePropertyChange(java.lang.String aPropertyName,
java.lang.Object aOldValue,
java.lang.Object aNewValue)
Fires a PropertyChangeEvent from this
ISupportObject instance. |
void |
fireVetoableChange(java.beans.PropertyChangeEvent aEvent)
Fires a vetoable PropertyChangeEvent from this
ISupportObject instance. |
void |
fireVetoableChange(java.lang.String aPropertyName,
java.lang.Object aOldValue,
java.lang.Object aNewValue)
Fires a vetoable PropertyChangeEvent from this
ISupportObject instance. |
java.lang.Object |
getID()
Returns the identifier for this ISupportObject
instance. |
java.lang.Object |
getProperty(java.lang.Object aKey)
Returns the value of the property specified by the given Object for this ISupportObject instance. |
int |
getPropertySize()
Returns the number of properties associated with this ISupportObject instance. |
java.util.Iterator |
propertyKeys()
Returns an Iterator instance over the property keys in this
ISupportObject instance. |
java.lang.Object |
removeProperty(java.lang.Object aKey)
Removes the property specified by the gien Object key for this
ISupportObject instance, and returns the value mapped to the
specified Object key. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener aListener)
Removes the specified PropertyChangeListener from this
ISupportObject instance. |
void |
removePropertyChangeListener(java.lang.String aPropertyName,
java.beans.PropertyChangeListener aListener)
Removes the specified PropertyChangeListener from this
ISupportObject instance for the specified property. |
void |
removeVetoableChangeListener(java.lang.String aPropertyName,
java.beans.VetoableChangeListener aListener)
Removes the specified VetoableChangeListener from this
ISupportObject instance for the specified property. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener aListener)
Removes the specified VetoableChangeListener from this
ISupportObject instance. |
void |
setID(java.lang.Object aId)
Sets this ISupportObject instance's identifier. |
void |
setProperty(java.lang.Object aKey,
java.lang.Object aValue)
Sets the specified key/value property on this ISupportObject
instance. |
| Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener aListener)
PropertyChangeListener to this
ISupportObject instance.aListener - the PropertyChangeListener to be added.removePropertyChangeListener( PropertyChangeListener )
public void addPropertyChangeListener(java.lang.String aPropertyName,
java.beans.PropertyChangeListener aListener)
PropertyChangeListener to this
ISupportObject instance for the specified property.aPropertyName - the property to which to add the Listener.aListener - the PropertyChangeListener to be added.removePropertyChangeListener( String, PropertyChangeListener )public void addVetoableChangeListener(java.beans.VetoableChangeListener aListener)
VetoableChangeListener to this
ISupportObject instance.aListener - the VetoableChangeListener to be added.removePropertyChangeListener( PropertyChangeListener )
public void addVetoableChangeListener(java.lang.String aPropertyName,
java.beans.VetoableChangeListener aListener)
VetoableChangeListener to this
ISupportObject instance for the specified property.aPropertyName - the property to which to add the Listener.aListener - the VetoableChangeListener to be added.removePropertyChangeListener( String, PropertyChangeListener )public void removePropertyChangeListener(java.beans.PropertyChangeListener aListener)
PropertyChangeListener from this
ISupportObject instance.aListener - the PropertyChangeListener to be removed.addPropertyChangeListener( PropertyChangeListener )
public void removePropertyChangeListener(java.lang.String aPropertyName,
java.beans.PropertyChangeListener aListener)
PropertyChangeListener from this
ISupportObject instance for the specified property.aPropertyName - the property to which to remove the Listener.aListener - the PropertyChangeListener to be removed.addPropertyChangeListener( String, PropertyChangeListener )public void removeVetoableChangeListener(java.beans.VetoableChangeListener aListener)
VetoableChangeListener from this
ISupportObject instance.aListener - the VetoableChangeListener to be removed.addVetoableChangeListener( VetoableChangeListener )
public void removeVetoableChangeListener(java.lang.String aPropertyName,
java.beans.VetoableChangeListener aListener)
VetoableChangeListener from this
ISupportObject instance for the specified property.aPropertyName - the property to which to remove the Listener.aListener - the VetoableChangeListener to be removed.addVetoableChangeListener( String, VetoableChangeListener )
public void setProperty(java.lang.Object aKey,
java.lang.Object aValue)
ISupportObject
instance.aKey - The key of the property being added.aValue - The value of the property being added.
Examples:
String key = "name"; String value = "Smith"; dataObject.setProperty( key, value );
getProperty( Object ),
removeProperty( Object ),
propertyKeys(),
getPropertySize()public java.lang.Object getProperty(java.lang.Object aKey)
Object for this ISupportObject instance.aKey - the key identifying the value to return.Object key.
Examples:
String value = dataObject.getProperty( "name" );
setProperty( Object, Object ),
removeProperty( Object ),
propertyKeys(),
getPropertySize()public java.lang.Object removeProperty(java.lang.Object aKey)
Object key for this
ISupportObject instance, and returns the value mapped to the
specified Object key.aKey - The key of the key/value pair to removeString value = dataObject.removeProperty( "name" );
setProperty( Object, Object ),
getProperty( Object ),
propertyKeys(),
getPropertySize()public java.util.Iterator propertyKeys()
Iterator instance over the property keys in this
ISupportObject instance.Iterator of the keys in this
ISupportObject instance.
Examples:
Iterator iterator = dataObject.propertyKeys();
while ( iterator.hasNext() ) {
Object aKey = iterator.next();
// do something with the key...
}
setProperty( Object, Object ),
getProperty( Object ),
removeProperty( Object ),
getPropertySize()public int getPropertySize()
ISupportObject instance.ISupportObject
instance.
Examples:
int numberOfProperties = dataObject.propertySize();
setProperty( Object, Object ),
getProperty( Object ),
removeProperty( Object ),
propertyKeys()public void setID(java.lang.Object aId)
ISupportObject instance's identifier. If an
identifier is not specified, a numeric identifier will be provided. The
ESW framework provides numeric identifiers which are unique within this
instance of the Java Virtual Machine
Fires a IUtilResources.ID_PROPERTY property change event.
aId - the unique Id for this ISupportObject instance.getID( )public java.lang.Object getID()
ISupportObject
instance.ISupportObject instance.setID( Object )
public void firePropertyChange(java.lang.String aPropertyName,
java.lang.Object aOldValue,
java.lang.Object aNewValue)
PropertyChangeEvent from this
ISupportObject instance.aPropertyName - the property for which to fire the event.aOldValue - the old value for the event.aNewValue - the new value for the event.public void firePropertyChange(java.beans.PropertyChangeEvent aEvent)
PropertyChangeEvent from this
ISupportObject instance.aEvent - the event to fire.
public void fireVetoableChange(java.lang.String aPropertyName,
java.lang.Object aOldValue,
java.lang.Object aNewValue)
throws java.beans.PropertyVetoException
PropertyChangeEvent from this
ISupportObject instance.aPropertyName - the property for which to fire the event.aOldValue - the old value for the event.aNewValue - the new value for the event.
public void fireVetoableChange(java.beans.PropertyChangeEvent aEvent)
throws java.beans.PropertyVetoException
PropertyChangeEvent from this
ISupportObject instance.aEvent - the event to fire.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||