Class AgendaEventContentSyncListener

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.listener.Listener<org.exoplatform.agenda.model.AgendaEventModification,Object>
org.exoplatform.agenda.listener.content.AgendaEventContentSyncListener
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin, org.exoplatform.services.listener.ListenerBase<org.exoplatform.agenda.model.AgendaEventModification,Object>

@Component public class AgendaEventContentSyncListener extends org.exoplatform.services.listener.Listener<org.exoplatform.agenda.model.AgendaEventModification,Object>
  • Field Summary

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    onEvent(org.exoplatform.services.listener.Event<org.exoplatform.agenda.model.AgendaEventModification,Object> event)
    Propagates the summary of an updated agenda event to the news article linked to it, when such a link exists.

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.exoplatform.services.listener.ListenerBase

    getName
  • Constructor Details

    • AgendaEventContentSyncListener

      public AgendaEventContentSyncListener()
  • Method Details

    • init

      @PostConstruct public void init()
    • onEvent

      public void onEvent(org.exoplatform.services.listener.Event<org.exoplatform.agenda.model.AgendaEventModification,Object> event) throws Exception
      Propagates the summary of an updated agenda event to the news article linked to it, when such a link exists. The link is the contentId property of the event's metadata item; that item exists for every event saved through the agenda service, and social returns its properties map as null (never as an empty map) when no property is stored, so the map is null-checked before it is read.

      An event carrying no summary propagates nothing: SUMMARY is nullable, and pushing it onto the article would replace a title the article has with none.

      Parameters:
      event - the POST_UPDATE_AGENDA_EVENT_EVENT listener event carrying the AgendaEventModification
      Throws:
      Exception - when the news article update fails