net.sf.doolin.bus.support
Class PropertyChangeMessage

java.lang.Object
  extended by net.sf.doolin.bus.support.PropertyChangeMessage

public class PropertyChangeMessage
extends Object

This class defines a message that can be sent on the Bus to define a property change in a bean.

Author:
Damien Coraboeuf

Constructor Summary
PropertyChangeMessage(Object bean, String propertyName, Object oldValue, Object newValue)
          Constructor.
 
Method Summary
 void cancel()
          Cancels the update
 Object getBean()
          Returns the bean
 Object getOldPropertyValue()
          Returns the previous value of the property
 String getPropertyName()
          Returns the path to the changed property
 Object getPropertyValue()
          Returns the new value for the property
 boolean sameOrigin(Object source)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyChangeMessage

public PropertyChangeMessage(Object bean,
                             String propertyName,
                             Object oldValue,
                             Object newValue)
Constructor.

Parameters:
bean - Bean whose property has changed
propertyName - Path to the property
oldValue - Old property value
newValue - New value for the property
Method Detail

cancel

public void cancel()
Cancels the update


getBean

public Object getBean()
Returns the bean

Returns:
bean whose property has changed

getOldPropertyValue

public Object getOldPropertyValue()
Returns the previous value of the property

Returns:
Old property value

getPropertyName

public String getPropertyName()
Returns the path to the changed property

Returns:
Property path

getPropertyValue

public Object getPropertyValue()
Returns the new value for the property

Returns:
Value

toString

public String toString()
Overrides:
toString in class Object

sameOrigin

public boolean sameOrigin(Object source)


Copyright © 2011. All Rights Reserved.