Class CmsEntityObserver

java.lang.Object
org.opencms.ade.contenteditor.client.CmsEntityObserver
All Implemented Interfaces:
com.google.gwt.event.logical.shared.ValueChangeHandler<org.opencms.acacia.shared.CmsEntity>, com.google.gwt.event.shared.EventHandler

public class CmsEntityObserver extends Object implements com.google.gwt.event.logical.shared.ValueChangeHandler<org.opencms.acacia.shared.CmsEntity>
Observer for content entities, used to notify listeners of entity changes.

  • Constructor Details

    • CmsEntityObserver

      public CmsEntityObserver(org.opencms.acacia.shared.CmsEntity entity)
      Constructor.

      Parameters:
      entity - the entity to observe
  • Method Details

    • addEntityChangeListener

      public void addEntityChangeListener(I_CmsEntityChangeListener changeListener, String changeScope)
      Adds an entity change listener for the given scope.

      Parameters:
      changeListener - the change listener
      changeScope - the change scope
    • clear

      public void clear()
      Removes this observer from the entities change handler registration and clears registered listeners.

    • onValueChange

      public void onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent<org.opencms.acacia.shared.CmsEntity> event)
      Specified by:
      onValueChange in interface com.google.gwt.event.logical.shared.ValueChangeHandler<org.opencms.acacia.shared.CmsEntity>
      See Also:
      • ValueChangeHandler.onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)
    • safeExecuteChangeListener

      protected void safeExecuteChangeListener(org.opencms.acacia.shared.CmsEntity entity, I_CmsEntityChangeListener listener)
      Calls an entity change listener, catching any errors.

      Parameters:
      entity - the entity with which the change listener should be called
      listener - the change listener