Class AgendaInvitationCalendarPlugin
- All Implemented Interfaces:
org.exoplatform.emailConnector.plugin.InvitationCalendarPlugin
The mail reader finds this bean by type across add-ons and asks the first that holds the user's calendar, alone. So agenda holds it only when no other add-on does: a user whose calendar caldav-integration holds is that add-on's, and landing the invitation here as well would put the meeting twice in eXo. Agenda does not read the other add-on's settings to predict its answer — two predicates drift (EXO-90247) — it asks it, through the same SPI, at the moment the reader asks.
The bean is not created at all on a server without the mail reader
(@ConditionalOnClass, read from the class metadata, never loading
the class). A @Service with a name of its own, because that is what
the bridge exports to the reader's context. The only class of agenda that
names a type of the reader's: Spring introspects every method of every
bean it creates, so the landing service speaks agenda's own
MailInvitation and LandedMailInvitation, and this bean
translates both ways. It carries no landing logic:
AgendaInvitationLandingService decides and acts.
-
Constructor Summary
ConstructorsConstructorDescriptionAgendaInvitationCalendarPlugin(AgendaInvitationLandingService agendaInvitationLandingService, org.springframework.context.ApplicationContext applicationContext) Builds the plugin over the landing service and the context the other add-ons' plugins are found in. -
Method Summary
Modifier and TypeMethodDescriptionorg.exoplatform.emailConnector.model.HeldInvitationheld(org.exoplatform.emailConnector.model.InvitationProbe probe) The event the user's personal calendar holds for the invitation, when agenda holds that calendar (EXO-90873): the answer as agenda holds it, NEEDS_ACTION told as none.booleanholdsCalendarFor(String username) Whether agenda holds the user's calendar: an enabled user of the platform who connected no remote calendar account to agenda, and whose calendar no other add-on holds.org.exoplatform.emailConnector.model.LandedInvitationland(org.exoplatform.emailConnector.model.InvitationLanding landing) Lands the invitation in the user's personal eXo calendar.
-
Constructor Details
-
AgendaInvitationCalendarPlugin
@Autowired public AgendaInvitationCalendarPlugin(AgendaInvitationLandingService agendaInvitationLandingService, org.springframework.context.ApplicationContext applicationContext) Builds the plugin over the landing service and the context the other add-ons' plugins are found in.- Parameters:
agendaInvitationLandingService- decides and actsapplicationContext- the Spring context of this WAR, into which the bridge publishes every other WAR's exported beans
-
-
Method Details
-
holdsCalendarFor
Whether agenda holds the user's calendar: an enabled user of the platform who connected no remote calendar account to agenda, and whose calendar no other add-on holds.- Specified by:
holdsCalendarForin interfaceorg.exoplatform.emailConnector.plugin.InvitationCalendarPlugin- Parameters:
username- the user's login- Returns:
- true when the invitation is agenda's to land
-
land
public org.exoplatform.emailConnector.model.LandedInvitation land(org.exoplatform.emailConnector.model.InvitationLanding landing) Lands the invitation in the user's personal eXo calendar.- Specified by:
landin interfaceorg.exoplatform.emailConnector.plugin.InvitationCalendarPlugin- Parameters:
landing- the invitation, the user and what they asked- Returns:
- what was done, null when agenda does not hold the user's calendar or there was nothing to do
- Throws:
IllegalArgumentException- when the invitation cannot be landed as it isRuntimeException- when the landing was attempted and failed
-
held
public org.exoplatform.emailConnector.model.HeldInvitation held(org.exoplatform.emailConnector.model.InvitationProbe probe) The event the user's personal calendar holds for the invitation, when agenda holds that calendar (EXO-90873): the answer as agenda holds it, NEEDS_ACTION told as none.- Specified by:
heldin interfaceorg.exoplatform.emailConnector.plugin.InvitationCalendarPlugin- Parameters:
probe- the user and the event's UID- Returns:
- the event held, null when agenda does not hold the user's calendar or holds no event for the invitation
-