Interface SmartEventSupport


  • @OpenApi
    public interface SmartEventSupport
    Defines an interface form registering smart listeners.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELEMENTS_CHANGED
      Property name of the repository update event.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void dispose()
      Informs the smart listener event support that it is no longer needed.
      void init()
      Initializes the smart listener event support.
      boolean isClean()
      There may be changes in model, but events are processed only in transaction commit listener.
      void registerConfig​(java.lang.Class<? extends Element> aClass, java.util.Collection<SmartListenerConfig> configs, java.beans.PropertyChangeListener listener)
      Registers smart listener configurations to the specified type objects.
      void unregisterConfig​(java.lang.Class<? extends Element> aClass, java.util.Collection<SmartListenerConfig> configs, java.beans.PropertyChangeListener listener)
      Unregisters smart listener configurations from the specified type of objects.
    • Field Detail

      • ELEMENTS_CHANGED

        static final java.lang.String ELEMENTS_CHANGED
        Property name of the repository update event.
        See Also:
        Constant Field Values
    • Method Detail

      • init

        void init()
        Initializes the smart listener event support.
      • dispose

        void dispose()
        Informs the smart listener event support that it is no longer needed.
      • registerConfig

        @OpenApi
        void registerConfig​(java.lang.Class<? extends Element> aClass,
                            java.util.Collection<SmartListenerConfig> configs,
                            java.beans.PropertyChangeListener listener)
        Registers smart listener configurations to the specified type objects. Creates smart listeners for all existing model elements of the specified type.
        Parameters:
        aClass - type of objects to that the smart listener configurations must be registered.
        configs - smart listener configurations.
        listener - property change listener that will receive property change events according to specified smart listener configurations.
      • unregisterConfig

        @OpenApi
        void unregisterConfig​(java.lang.Class<? extends Element> aClass,
                              java.util.Collection<SmartListenerConfig> configs,
                              java.beans.PropertyChangeListener listener)
        Unregisters smart listener configurations from the specified type of objects.
        Parameters:
        aClass - type of object.
        configs - smart listener configurations.
        listener - property change listener.
      • isClean

        boolean isClean()
        There may be changes in model, but events are processed only in transaction commit listener. If some kind of caches depends on this support not processed events may lead in not valid cache.
        Returns:
        true if all model changes were processed by this support.