A vetoable change is notified to all registered listeners before the change takes place. Any listener which receives notification of this event may elect to veto the change by raising a java.beans.PropertyVetoException. If a change is vetoed in this way, it will not be applied. As with PropertyChangeListeners, VetoableChangeListener instances are notified of the change in the same thread as that which caused the change in the first place, and the method call will be blocked until all listeners have been notified. The following table lists all of the vetoable change notifications which might be received by a VetoableChangeListener; the class which originates the change notification and the values which will be passed in the PropertyChangeEvent structure passed to the listener.
Source Class | Source Method | Property Name | Old Value | New Value |
---|---|---|---|---|
Association | addMember, removeMember, setMembers | members | Unmodifiable Collection of Member objects | Unmodifiable Collection of Member objects. |
Association | setType | type | Topic | Topic |
BaseName | setData | string | String | String |
BaseName | addVariant, setVariants | variants | Unmodifiable Collection of Variant objects | Unmodifiable Collection of Variant Objects. |
Member | setParent | parent | Association | Association |
Member | setRoleSpec | roleSpec | Topic | Topic |
Member | addPlayer, removePlayer, setPlayer | players | Unmodifiable Collection of Topic objects | Unmodifiable Collection of Topic objects |
Topic | Member.addPlayer, Member.removePlayer, Member.setPlayer | rolesPlayed | Unmodifiable Collection of Member objects | Unmodifiable Collection of Member objects |
ScopedObject | setScope, addTheme, removeTheme | Unmodifiable Collection of Topic objects | Unmodifiable Collection of Topic objects | Unmodifiable Collection of Topic objects |
Topic | setSubject | subject | Locator | Locator |
Topic | addSubjectIndicator, setSubjectIndicators | subjectIndicators | Unmodifiable Collection of Locator objects | Unmodifiable Collection of Locator objects |
Topic | addType, setTypes | types | Unmodifiable Collection of Topic objects | Unmodifiable Collection of Topic objects |
Topic | addName, setNames | names | Unmodifiable Collection of BaseName objects | Unmodifiable Collection of BaseName objects |
Topic | addOccurrence, setOccurrences | occurrences | Unmodifiable Collection of Occurrence objects | Unmodifiable Collection of Occurrence objects |
Variant | addVariant, setVariants | variants | Unmodifiable Collection of Variant objects | Unmodifiable Collection of Variant objects |
All Vetoable changes are first notified to listeners on the source object itself and then to listeners on the TopicMap object. This structure enables a vetoable change listener registered with the TopicMap to handle all vetoable changes on any object in the topic map.