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.

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 ClassSource MethodProperty NameOld ValueNew Value
Association

addMember

createMember

removeMember

setMembers

membersMember*Member*
AssociationsetTypetypeTopicTopic
BaseNamesetDatastringStringString
BaseName

addVariant

setVariants

variantsVariant*Variant*
MembersetParentparentAssociationAssociation
MembersetRoleSpecroleSpecTopicTopic
Member

addPlayer

removePlayer

setPlayer

playersTopic*Topic*
Topic

Member.addPlayer

Member.removePlayer

Member.setPlayer

rolesPlayedMember*Member*
ScopedObject

setScope

addTheme

removeTheme

scopeTopic*Topic*
TopicsetSubjectsubjectLocatorLocator
Topic

addSubjectIndicator

setSubjectIndicators

subjectIndicatorsLocator*Locator*
Topic

addType

setTypes

typesTopic*Topic*
Topic

addName

createName

setNames

namesBaseName*BaseName*
Topic

addOccurrence

createOccurrence

setOccurrences

occurrencesOccurrence*Occurrence*
BaseName, Variant

addVariant

createVariant

setVariants

variantsVariant*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.