org.jconfig.event
Class ConfigurationChangedEventImpl

java.lang.Object
  extended byorg.jconfig.event.ConfigurationChangedEventImpl
All Implemented Interfaces:
CategoryChangedEvent, ConfigurationChangedEvent, PropertyChangedEvent

public class ConfigurationChangedEventImpl
extends java.lang.Object
implements ConfigurationChangedEvent

The all-in-one implementation of the ConfigurationChangedEvent. Inside tip: the current implementation allows any PropertyChangedListener or CategoryChangeListener to cast the respective Events to a ConfigurationChangedEvent.

Since:
2.2
Author:
Andreas Mecky , Terry Dye

Field Summary
 
Fields inherited from interface org.jconfig.event.PropertyChangedEvent
CATEGORY_ADDED, CATEGORY_CHANGED, CATEGORY_REMOVED, PROPERTY_ADDED, PROPERTY_CHANGED, PROPERTY_REMOVED
 
Constructor Summary
ConfigurationChangedEventImpl(int eventType, Category category, java.lang.String propertyName, java.lang.String oldValue, java.lang.String newValue)
           
 
Method Summary
 Category getCategory()
          The name of the Category
 int getEventType()
          Information about the event.
 java.lang.String getNewValue()
          The new value of the Property.
 java.lang.String getOldValue()
          The old value of the Property.
 java.lang.String getPropertyName()
          The name of the Property that has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationChangedEventImpl

public ConfigurationChangedEventImpl(int eventType,
                                     Category category,
                                     java.lang.String propertyName,
                                     java.lang.String oldValue,
                                     java.lang.String newValue)
Parameters:
eventType -
oldValue -
newValue -
Method Detail

getPropertyName

public java.lang.String getPropertyName()
Description copied from interface: PropertyChangedEvent
The name of the Property that has changed.

Specified by:
getPropertyName in interface PropertyChangedEvent
Returns:
The Property's name

getEventType

public int getEventType()
Description copied from interface: PropertyChangedEvent
Information about the event.

Specified by:
getEventType in interface PropertyChangedEvent
Returns:
The event's identifier/type
See Also:
PropertyChangedEvent.PROPERTY_ADDED, PropertyChangedEvent.PROPERTY_REMOVED, PropertyChangedEvent.CATEGORY_ADDED, PropertyChangedEvent.CATEGORY_REMOVED

getNewValue

public java.lang.String getNewValue()
Description copied from interface: PropertyChangedEvent
The new value of the Property. Can be <null>, if a Property was deleted.

Specified by:
getNewValue in interface PropertyChangedEvent
Returns:
The new value

getOldValue

public java.lang.String getOldValue()
Description copied from interface: PropertyChangedEvent
The old value of the Property. Can be <null>, if a Property was added.

Specified by:
getOldValue in interface PropertyChangedEvent
Returns:
The old value

getCategory

public Category getCategory()
Description copied from interface: CategoryChangedEvent
The name of the Category

Specified by:
getCategory in interface CategoryChangedEvent
Returns:
The Category's name


Copyright © 2001-2005 Andreas Mecky, Terry Dye. All Rights Reserved.