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.
In the following table, an asterisk (*) following a type name indicates that the value is a collection of objects of that type. All collections passed in events are unmodifiable.
Source Class | Source Method | Property Name | Old Value | New Value |
---|---|---|---|---|
Association | addMember createMember removeMember setMembers | members | Member* | Member* |
Association | setType | type | Topic | Topic |
BaseName | setData | string | String | String |
BaseName | addVariant setVariants | variants | Variant* | Variant* |
Member | setParent | parent | Association | Association |
Member | setRoleSpec | roleSpec | Topic | Topic |
Member | addPlayer removePlayer setPlayer | players | Topic* | Topic* |
Topic | Member.addPlayer Member.removePlayer Member.setPlayer | rolesPlayed | Member* | Member* |
ScopedObject | setScope addTheme removeTheme | scope | Topic* | Topic* |
Topic | setSubject | subject | Locator | Locator |
Topic | addSubjectIndicator setSubjectIndicators | subjectIndicators | Locator* | Locator* |
Topic | addType setTypes | types | Topic* | Topic* |
Topic | addName createName setNames | names | BaseName* | BaseName* |
Topic | addOccurrence createOccurrence setOccurrences | occurrences | Occurrence* | Occurrence* |
BaseName, Variant | addVariant createVariant setVariants | variants | Variant* | Variant* |
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.