Java Doc for ConfigurationEvent.java in  » Library » Apache-commons-configuration-1.4-src » org » apache » commons » configuration » event » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache commons configuration 1.4 src » org.apache.commons.configuration.event 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.EventObject
      org.apache.commons.configuration.event.ConfigurationEvent

All known Subclasses:   org.apache.commons.configuration.event.ConfigurationErrorEvent,
ConfigurationEvent
public class ConfigurationEvent extends EventObject (Code)

An event class for reporting updates on a configuration object.

Event objects of this type are used for "raw" events, i.e. unfiltered modifications of any kind. A level with semantically higher events (e.g. for property changes) may be built on top of this fundamental event mechanism.

Each event can contain the following data:

  • A source object, which is usually the configuration object that was modified.
  • The event's type. This is a numeric value that corresponds to constant declarations in concrete configuration classes. It describes what exactly has happended.
  • If available, the name of the property whose modification caused the event.
  • If available, the value of the property that caused this event.
  • A flag whether this event was generated before or after the update of the source configuration. A modification of a configuration typically causes two events: one event before and one event after the modification is performed. This allows event listeners to react at the correct point of time.

The following standard events are generated by typical configuration implementations (the constants for the event types are defined in org.apache.commons.configuration.AbstractConfiguration ):

EVENT_ADD_PROPERTY
This event is triggered for each call of the addProperty() 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).
EVENT_SET_PROPERTY
Calling the setProperty() method triggers this event. The event object stores the name of the affected property and its new value.
EVENT_CLEAR_PROPERTY
If a property is removed from a configuration (by calling the clearProperty() 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 null.
EVENT_CLEAR
This event is fired when the whole configuration is cleared. The corresponding event object contains no additional data.


author:
   author:
   href="http://jakarta.apache.org/commons/configuration/team-list.html">Commons
author:
   Configuration team
version:
   $Id: ConfigurationEvent.java 443105 2006-09-13 20:04:01Z oheger $
since:
   1.3



Constructor Summary
public  ConfigurationEvent(Object source, int type, String propertyName, Object propertyValue, boolean beforeUpdate)
     Creates a new instance of ConfigurationEvent and initializes it.

Method Summary
public  StringgetPropertyName()
     Returns the name of the affected property.
public  ObjectgetPropertyValue()
     Returns the value of the affected property if available.
public  intgetType()
     Returns the type of this event.
public  booleanisBeforeUpdate()
     Returns a flag if this event was generated before or after an update.


Constructor Detail
ConfigurationEvent
public ConfigurationEvent(Object source, int type, String propertyName, Object propertyValue, boolean beforeUpdate)(Code)
Creates a new instance of ConfigurationEvent and initializes it.
Parameters:
  source - the event source
Parameters:
  type - the event's type
Parameters:
  propertyName - the name of the affected property
Parameters:
  propertyValue - the value of the affected property
Parameters:
  beforeUpdate - the before update flag




Method Detail
getPropertyName
public String getPropertyName()(Code)
Returns the name of the affected property. This can be null if no property change has lead to this event. the name of the property



getPropertyValue
public Object getPropertyValue()(Code)
Returns the value of the affected property if available. the value of the property; can be null



getType
public int getType()(Code)
Returns the type of this event. This describes the update process that caused this event. the event's type



isBeforeUpdate
public boolean isBeforeUpdate()(Code)
Returns a flag if this event was generated before or after an update. true if this event was generated before an update;false otherwise



Fields inherited from java.util.EventObject
protected transient Object source(Code)(Java Doc)

Methods inherited from java.util.EventObject
public Object getSource()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.