Package com.nomagic.uml2.ext.jmi
Class EventSupport
- java.lang.Object
-
- com.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
-
- com.nomagic.uml2.ext.jmi.EventSupport
-
- All Implemented Interfaces:
com.dassault_systemes.modeler.foundation.events.RepositoryListenerRegistry<javax.jmi.reflect.RefObject>
,RepositoryListenerRegistry
public class EventSupport extends com.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject> implements RepositoryListenerRegistry
Class for firing events and handling event listeners.
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.logging.log4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description EventSupport(AbstractRepository abstractRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IndexedPropertyChangeEvent
createIndexedPropertyChangeEvent(java.lang.Object source, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue, int index)
void
fireInstanceDeletedEvent(javax.jmi.reflect.RefBaseObject source, java.lang.Object deleted, java.lang.Object oldDirectContainer)
Fires event about an instance delete.void
fireModelElementDisposeEvent(javax.jmi.reflect.RefObject disposed, java.lang.Object oldDirectContainer)
Fires event about an instance disposal.void
firePropertyChange(javax.jmi.reflect.RefBaseObject source, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
void
firePropertyChange(javax.jmi.reflect.RefBaseObject source, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue, int index)
void
firePropertyChange(javax.jmi.reflect.RefBaseObject source, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue, int index, int newIndex)
NonMaskedEventSupport
getNonMaskedModelListeners()
protected boolean
isDeveloper()
protected boolean
isNotDeliveredEventElement(java.lang.Object object)
void
restoreEventDelivery(ModifiedElements modifiedElements)
Restores event delivery.-
Methods inherited from class com.dassault_systemes.modeler.foundation.events.EventSupport
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addRepositoryListener, callModelListener, fireCountedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getEventsCount, invokeAfterTransaction, isEnableEventFiring, isModelCleanAfterEventsStopped, removeAllPropertyChangeListeners, removeListener, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeRepositoryListener, restoreEventDelivery, setEnableEventFiring, setModelListener, startLogEvents, stopEventDelivery, stopLogEvents
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.dassault_systemes.modeler.foundation.events.RepositoryListenerRegistry
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, removeAllPropertyChangeListeners, removeListener, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
EventSupport
public EventSupport(AbstractRepository abstractRepository)
-
-
Method Detail
-
isNotDeliveredEventElement
protected boolean isNotDeliveredEventElement(java.lang.Object object)
- Specified by:
isNotDeliveredEventElement
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
-
createIndexedPropertyChangeEvent
protected IndexedPropertyChangeEvent createIndexedPropertyChangeEvent(java.lang.Object source, java.lang.String propertyName, @CheckForNull java.lang.Object oldValue, @CheckForNull java.lang.Object newValue, int index)
- Overrides:
createIndexedPropertyChangeEvent
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
-
firePropertyChange
public void firePropertyChange(javax.jmi.reflect.RefBaseObject source, java.lang.String propertyName, @CheckForNull java.lang.Object oldValue, @CheckForNull java.lang.Object newValue)
-
fireModelElementDisposeEvent
public void fireModelElementDisposeEvent(javax.jmi.reflect.RefObject disposed, @CheckForNull java.lang.Object oldDirectContainer)
Description copied from class:com.dassault_systemes.modeler.foundation.events.EventSupport
Fires event about an instance disposal.- Overrides:
fireModelElementDisposeEvent
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
- Parameters:
disposed
- element that was disposed.oldDirectContainer
- old direct container (feature data set or resource).
-
fireInstanceDeletedEvent
public void fireInstanceDeletedEvent(javax.jmi.reflect.RefBaseObject source, java.lang.Object deleted, @CheckForNull java.lang.Object oldDirectContainer)
Fires event about an instance delete.- Parameters:
source
- source of the event.deleted
- element that was deleted.oldDirectContainer
- old direct container (feature data set or resource).
-
firePropertyChange
public void firePropertyChange(javax.jmi.reflect.RefBaseObject source, java.lang.String propertyName, @CheckForNull java.lang.Object oldValue, @CheckForNull java.lang.Object newValue, int index)
-
firePropertyChange
public void firePropertyChange(javax.jmi.reflect.RefBaseObject source, java.lang.String propertyName, @CheckForNull java.lang.Object oldValue, @CheckForNull java.lang.Object newValue, int index, int newIndex)
-
isDeveloper
protected boolean isDeveloper()
- Specified by:
isDeveloper
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
-
restoreEventDelivery
public void restoreEventDelivery(ModifiedElements modifiedElements)
Restores event delivery. Non-masked event listeners will start getting events again. If event firing was not disabled viaEventSupport.setEnableEventFiring(boolean)
then other event listeners will start getting events andUML2MetamodelConstants.EVENT_FIRE_START
will be fired for repository property change listeners- Parameters:
modifiedElements
- provider for changed elements
-
getNonMaskedModelListeners
public NonMaskedEventSupport getNonMaskedModelListeners()
- Overrides:
getNonMaskedModelListeners
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
- Returns:
- ModelListener which sends notification even event fire is disabled.
-
-