Class EventResponseSavedListener
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin,org.exoplatform.services.listener.ListenerBase<org.exoplatform.agenda.model.EventAttendee,org.exoplatform.agenda.model.EventAttendee>
Without this the two places a user can answer a meeting from never converge. Answering in the calendar client reaches eXo, because the verification pass reads the copy back; answering in eXo — in the agenda screen, or through the Accept and Decline links in the notification mail, which write agenda directly — reached nothing at all. The copy kept the older answer, showed it to its own author, and handed it back as fresh the next time any client rewrote that object for any reason.
Bound to responseSaved rather than responseSent: the copy has
to track what agenda holds, not only what a user deliberately sent.
The reset to NEEDS-ACTION that follows a material edit of a meeting, and the
propagation of an answer onto a series' exceptional occurrences, are both
saved-without-being-sent — and a copy that missed them would tell the user
they had accepted a meeting whose invitation had been reissued.
Asynchronous on purpose, for the same reason as
CalendarCreatedListener: the event is raised inside the transaction
that records the answer, and talking to a calendar server there would hold a
database transaction open across the network — and would let a slow or
unreachable server fail an answer that has nothing to do with it.
Two halves of one answer (EXO-89868)
An answer has to reach two different sets of copies, and until EXO-89868
only the first existed. pushAnswer writes the answerer's own
copy, off their own account.
CaldavEventPropagationService.propagateAnswer(long, long, String)
writes everybody else's, off theirs. Without the second, root created
a meeting, Benjamin accepted it in macOS Calendar, eXo recorded it correctly
— and root's BlueMind copy never learned, so the organiser read a stale RSVP
in the client they actually live in.
Both are attempted, each inside its own guard, and neither is allowed to
stop the other. They fail for entirely unrelated reasons — one account's
server against fifty others' — and a single try around the pair
would have made the answerer having no connected account the reason nobody
else's copy learned anything. Which is, in miniature, the defect this fixes.
Glue only, per the extensibility norm: it reads who answered what and hands the work to the services.
-
Field Summary
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonEvent(org.exoplatform.services.listener.Event<org.exoplatform.agenda.model.EventAttendee, org.exoplatform.agenda.model.EventAttendee> event) Reacts to an attendee's answer having been recorded.protected voidsetCaldavEventPropagationService(CaldavEventPropagationService caldavEventPropagationService) Hands the propagation service to tests, which have no container to resolve it from.protected voidsetCaldavPushService(CaldavPushService caldavPushService) Hands the service to tests, which have no container to resolve it from.protected voidsetIdentityManager(org.exoplatform.social.core.manager.IdentityManager identityManager) Hands the registry to tests, which have no container to resolve it from.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
-
EventResponseSavedListener
public EventResponseSavedListener()
-
-
Method Details
-
onEvent
public void onEvent(org.exoplatform.services.listener.Event<org.exoplatform.agenda.model.EventAttendee, org.exoplatform.agenda.model.EventAttendee> event) Reacts to an attendee's answer having been recorded.- Parameters:
event- carries the answer as it was before as its source, and as it now stands as its data
-
setIdentityManager
protected void setIdentityManager(org.exoplatform.social.core.manager.IdentityManager identityManager) Hands the registry to tests, which have no container to resolve it from.- Parameters:
identityManager- the registry to use
-
setCaldavPushService
Hands the service to tests, which have no container to resolve it from.- Parameters:
caldavPushService- the service to use
-
setCaldavEventPropagationService
protected void setCaldavEventPropagationService(CaldavEventPropagationService caldavEventPropagationService) Hands the propagation service to tests, which have no container to resolve it from.- Parameters:
caldavEventPropagationService- the service to use
-