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 final org.apache.logging.log4j.Logger
     

    Fields inherited from class com.dassault_systemes.modeler.foundation.events.EventSupport

    EVENT_FIRE_START, EVENT_FIRE_STOP
  • Constructor Summary

    Constructors
    Constructor
    Description
    EventSupport(AbstractRepository abstractRepository)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.nomagic.uml2.ext.jmi.IndexedPropertyChangeEvent
    createIndexedPropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue, int index)
     
    void
    fireInstanceDeletedEvent(javax.jmi.reflect.RefBaseObject source, Object deleted, Object oldDirectContainer)
    Fires event about an instance delete.
    void
    fireModelElementDisposeEvent(javax.jmi.reflect.RefObject disposed, Object oldDirectContainer)
    Fires event about an instance disposal.
    void
    firePropertyChange(javax.jmi.reflect.RefBaseObject source, String propertyName, Object oldValue, Object newValue)
     
    void
    firePropertyChange(javax.jmi.reflect.RefBaseObject source, String propertyName, Object oldValue, Object newValue, int index)
     
    void
    firePropertyChange(javax.jmi.reflect.RefBaseObject source, String propertyName, Object oldValue, Object newValue, int index, int newIndex)
     
    com.nomagic.uml2.ext.jmi.NonMaskedEventSupport
     
    protected boolean
     
    protected boolean
     
    void
    restoreEventDelivery(com.nomagic.uml2.ext.jmi.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
  • Field Details

    • LOG

      public static final org.apache.logging.log4j.Logger LOG
  • Constructor Details

  • Method Details

    • isNotDeliveredEventElement

      protected boolean isNotDeliveredEventElement(Object object)
      Specified by:
      isNotDeliveredEventElement in class com.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
    • createIndexedPropertyChangeEvent

      protected com.nomagic.uml2.ext.jmi.IndexedPropertyChangeEvent createIndexedPropertyChangeEvent(Object source, String propertyName, @CheckForNull Object oldValue, @CheckForNull Object newValue, int index)
      Overrides:
      createIndexedPropertyChangeEvent in class com.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
    • firePropertyChange

      public void firePropertyChange(javax.jmi.reflect.RefBaseObject source, String propertyName, @CheckForNull Object oldValue, @CheckForNull Object newValue)
    • fireModelElementDisposeEvent

      public void fireModelElementDisposeEvent(javax.jmi.reflect.RefObject disposed, @CheckForNull Object oldDirectContainer)
      Description copied from class: com.dassault_systemes.modeler.foundation.events.EventSupport
      Fires event about an instance disposal.
      Overrides:
      fireModelElementDisposeEvent in class com.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, Object deleted, @CheckForNull 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, String propertyName, @CheckForNull Object oldValue, @CheckForNull Object newValue, int index)
    • firePropertyChange

      public void firePropertyChange(javax.jmi.reflect.RefBaseObject source, String propertyName, @CheckForNull Object oldValue, @CheckForNull Object newValue, int index, int newIndex)
    • isDeveloper

      protected boolean isDeveloper()
      Specified by:
      isDeveloper in class com.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
    • restoreEventDelivery

      public void restoreEventDelivery(com.nomagic.uml2.ext.jmi.ModifiedElements modifiedElements)
      Restores event delivery. Non-masked event listeners will start getting events again. If event firing was not disabled via EventSupport.setEnableEventFiring(boolean) then other event listeners will start getting events and UML2MetamodelConstants.EVENT_FIRE_START will be fired for repository property change listeners
      Parameters:
      modifiedElements - provider for changed elements
    • getNonMaskedModelListeners

      public com.nomagic.uml2.ext.jmi.NonMaskedEventSupport getNonMaskedModelListeners()
      Overrides:
      getNonMaskedModelListeners in class com.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
      Returns:
      ModelListener which sends notification even event fire is disabled.