Author: oheger Date: Wed Sep 13 13:04:01 2006 New Revision: 443105 URL: http://svn.apache.org/viewvc?view=rev&rev=443105 Log: Documentation update about configuration events; related to CONFIGURATION-225
Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/event/ConfigurationEvent.java jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/event/ConfigurationEvent.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/event/ConfigurationEvent.java?view=diff&rev=443105&r1=443104&r2=443105 ============================================================================== --- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/event/ConfigurationEvent.java (original) +++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/event/ConfigurationEvent.java Wed Sep 13 13:04:01 2006 @@ -45,6 +45,29 @@ * performed. This allows event listeners to react at the correct point of time.</li> * </ul> * </p> + * <p> + * The following standard events are generated by typical configuration + * implementations (the constants for the event types are defined in + * <code>[EMAIL PROTECTED] org.apache.commons.configuration.AbstractConfiguration}</code>): + * <dl> + * <dt>EVENT_ADD_PROPERTY</dt> + * <dd>This event is triggered for each call of the <code>addProperty()</code> + * method of a configuration object. It contains the name of the property, to + * which new data is added, and the value object that is added to this property + * (this may be an array or a list if multiple values are added).</dd> + * <dt>EVENT_SET_PROPERTY</dt> + * <dd>Calling the <code>setProperty()</code> method triggers this event. The + * event object stores the name of the affected property and its new value.</dd> + * <dt>EVENT_CLEAR_PROPERTY</dt> + * <dd>If a property is removed from a configuration (by calling the + * <code>clearProperty()</code> method), an event of this type is fired. In + * this case the event object only stores the name of the removed property, the + * value is <b>null</b>.</dd> + * <dt>EVENT_CLEAR</dt> + * <dd>This event is fired when the whole configuration is cleared. The + * corresponding event object contains no additional data.</dd> + * </dl> + * </p> * * @author <a * href="http://jakarta.apache.org/commons/configuration/team-list.html">Commons Modified: jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml?view=diff&rev=443105&r1=443104&r2=443105 ============================================================================== --- jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml (original) +++ jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml Wed Sep 13 13:04:01 2006 @@ -70,10 +70,13 @@ <p> <dl> <dt>AbstractConfiguration</dt> - <dd>EVENT_ADD_PROPERTY (a property was added), EVENT_SET_PROPERTY - (a property's value was changed), EVENT_CLEAR_PROPERTY (a property was - removed from the configuration), EVENT_CLEAR (the configuration was - cleared)</dd> + <dd>EVENT_ADD_PROPERTY (a property was added; the name of the affected + property and the value that was added can be obtained from the + event object), EVENT_SET_PROPERTY (a property's value was changed; the + event object stores the name of the affected property and its new value), + EVENT_CLEAR_PROPERTY (a property was removed from the configuration; + its name is stored in the event object), EVENT_CLEAR (the configuration + was cleared)</dd> <dt>AbstractFileConfiguration</dt> <dd>EVENT_RELOAD (the configuration was reloaded)</dd> <dt>HierarchicalConfiguration</dt> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]