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 -
Method Summary
Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 ExceptionPropagates the summary of an updated agenda event to the news article linked to it, when such a link exists. The link is thecontentIdproperty of the event's metadata item; that item exists for every event saved through the agenda service, and social returns its properties map asnull(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:
SUMMARYis nullable, and pushing it onto the article would replace a title the article has with none.- Parameters:
event- thePOST_UPDATE_AGENDA_EVENT_EVENTlistener event carrying theAgendaEventModification- Throws:
Exception- when the news article update fails
-