WebFlow
Class PropertyChangeSupport

java.lang.Object
  |
  +--WebFlow.PropertyChangeSupport

public class PropertyChangeSupport
extends java.lang.Object

This is a utility class that can be used by beans that support bound properties. You can use an instance of this class as a member field of your bean and delegate various work to it.


Field Summary
 java.util.Hashtable children
           
 myHashMap listeners
           
 
Constructor Summary
PropertyChangeSupport(org.omg.CORBA.Object sourceBean, BeanContextChildSupport BChild_)
           
 
Method Summary
 void addPropertyChangeListener(org.omg.CORBA.Object listener)
          Add a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(java.lang.String propertyName, org.omg.CORBA.Object listener)
          Add a PropertyChangeListener for a specific property.
 void fireEvent_old(java.lang.String eventMethod, org.omg.CORBA.Object evt)
           
 void fireEvent(java.lang.String eventMethod, org.omg.CORBA.Object evt)
           
 void firePropertyChange_old(WebFlow.PropertyChangeEvent evt)
          Fire an existing PropertyChangeEvent to any registered listeners.
 void firePropertyChange(WebFlow.PropertyChangeEvent evt)
           
 void firePropertyChange(java.lang.String propertyName, org.omg.CORBA.Any oldValue, org.omg.CORBA.Any newValue)
          Report a bound property update to any registered listeners.
 void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
          Report a boolean bound property update to any registered listeners.
 void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
          Report an int bound property update to any registered listeners.
 void firePropertyChange(java.lang.String propertyName, org.omg.CORBA.Object oldValue, org.omg.CORBA.Object newValue)
           
 void firePropertyChange(java.lang.String propertyName, java.lang.String oldValue, java.lang.String newValue)
           
 boolean hasListeners(java.lang.String propertyName)
          Check if there are any listeners for a specific property.
 void insertContextInfo(org.omg.CORBA.Request request)
           
 void invokeEventMethod(org.omg.CORBA.Object target, java.lang.String eventMethod, org.omg.CORBA.Object evt)
           
 void invokePropertyChange(org.omg.CORBA.Object target, WebFlow.PropertyChangeEvent evt)
           
 org.omg.CORBA.Object[] invokePullEventsOfListeners(org.omg.CORBA.Object target)
           
 void listContents(java.lang.String propertyName, java.util.Hashtable children)
           
 org.omg.CORBA.Object[] pull()
           
 void pullExtended(java.util.Vector vlist)
           
 void removePropertyChangeListener(org.omg.CORBA.Object listener)
          Remove a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(java.lang.String propertyName, org.omg.CORBA.Object listener)
          Remove a PropertyChangeListener for a specific property.
 void sendEvent_old(java.lang.String propertyName, WebFlow.PropertyChangeEvent evt)
           
 void sendEvent(java.lang.String propertyName, WebFlow.PropertyChangeEvent evt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

public myHashMap listeners

children

public java.util.Hashtable children
Constructor Detail

PropertyChangeSupport

public PropertyChangeSupport(org.omg.CORBA.Object sourceBean,
                             BeanContextChildSupport BChild_)
Parameters:
sourceBean - The bean to be given as the source for any events.
Method Detail

insertContextInfo

public void insertContextInfo(org.omg.CORBA.Request request)

addPropertyChangeListener

public void addPropertyChangeListener(org.omg.CORBA.Object listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(org.omg.CORBA.Object listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Parameters:
listener - The PropertyChangeListener to be removed

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      org.omg.CORBA.Object listener)
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property.
Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         org.omg.CORBA.Object listener)
Remove a PropertyChangeListener for a specific property.
Parameters:
propertyName - The name of the property that was listened on.
listener - The PropertyChangeListener to be removed

fireEvent_old

public void fireEvent_old(java.lang.String eventMethod,
                          org.omg.CORBA.Object evt)

fireEvent

public void fireEvent(java.lang.String eventMethod,
                      org.omg.CORBA.Object evt)

invokeEventMethod

public void invokeEventMethod(org.omg.CORBA.Object target,
                              java.lang.String eventMethod,
                              org.omg.CORBA.Object evt)

invokePropertyChange

public void invokePropertyChange(org.omg.CORBA.Object target,
                                 WebFlow.PropertyChangeEvent evt)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               org.omg.CORBA.Any oldValue,
                               org.omg.CORBA.Any newValue)
Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.
Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

sendEvent_old

public void sendEvent_old(java.lang.String propertyName,
                          WebFlow.PropertyChangeEvent evt)

sendEvent

public void sendEvent(java.lang.String propertyName,
                      WebFlow.PropertyChangeEvent evt)

invokePullEventsOfListeners

public org.omg.CORBA.Object[] invokePullEventsOfListeners(org.omg.CORBA.Object target)

pull

public org.omg.CORBA.Object[] pull()

pullExtended

public void pullExtended(java.util.Vector vlist)

listContents

public void listContents(java.lang.String propertyName,
                         java.util.Hashtable children)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               int oldValue,
                               int newValue)
Report an int bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.

Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.String oldValue,
                               java.lang.String newValue)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               org.omg.CORBA.Object oldValue,
                               org.omg.CORBA.Object newValue)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               boolean oldValue,
                               boolean newValue)
Report a boolean bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.

Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange_old

public void firePropertyChange_old(WebFlow.PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered listeners. No event is fired if the given event's old and new values are equal and non-null.
Parameters:
evt - The PropertyChangeEvent object.

firePropertyChange

public void firePropertyChange(WebFlow.PropertyChangeEvent evt)

hasListeners

public boolean hasListeners(java.lang.String propertyName)
Check if there are any listeners for a specific property.
Parameters:
propertyName - the property name.
Returns:
true if there are ore or more listeners for the given property