Vetoable Changes

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 ClassSource MethodProperty NameOld ValueNew Value
AssociationaddMember, removeMember, setMembersmembersUnmodifiable Collection of Member objectsUnmodifiable Collection of Member objects.
AssociationsetTypetypeTopicTopic
BaseNamesetDatastringStringString
BaseNameaddVariant, setVariantsvariantsUnmodifiable Collection of Variant objectsUnmodifiable Collection of Variant Objects.
MembersetParentparentAssociationAssociation
MembersetRoleSpecroleSpecTopicTopic
MemberaddPlayer, removePlayer, setPlayerplayersUnmodifiable Collection of Topic objectsUnmodifiable Collection of Topic objects
TopicMember.addPlayer, Member.removePlayer, Member.setPlayer rolesPlayedUnmodifiable Collection of Member objectsUnmodifiable Collection of Member objects
ScopedObjectsetScope, addTheme, removeThemeUnmodifiable Collection of Topic objectsUnmodifiable Collection of Topic objectsUnmodifiable Collection of Topic objects
TopicsetSubjectsubjectLocatorLocator
TopicaddSubjectIndicator, setSubjectIndicatorssubjectIndicatorsUnmodifiable Collection of Locator objectsUnmodifiable Collection of Locator objects
TopicaddType, setTypestypesUnmodifiable Collection of Topic objectsUnmodifiable Collection of Topic objects
TopicaddName, setNamesnamesUnmodifiable Collection of BaseName objectsUnmodifiable Collection of BaseName objects
TopicaddOccurrence, setOccurrencesoccurrencesUnmodifiable Collection of Occurrence objectsUnmodifiable Collection of Occurrence objects
VariantaddVariant, setVariantsvariantsUnmodifiable Collection of Variant objectsUnmodifiable 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.