Class CaldavInvitationCalendarPlugin

java.lang.Object
org.exoplatform.caldav.service.CaldavInvitationCalendarPlugin
All Implemented Interfaces:
org.exoplatform.emailConnector.plugin.InvitationCalendarPlugin

@Service("caldavInvitationCalendarPlugin") @ConditionalOnClass(org.exoplatform.emailConnector.plugin.InvitationCalendarPlugin.class) public class CaldavInvitationCalendarPlugin extends Object implements org.exoplatform.emailConnector.plugin.InvitationCalendarPlugin
Lands, for the mail reader, an invitation the user received by mail in their CalDAV-bound calendar (EXO-90848).

The mail reader finds this bean by type across add-ons when a user clicks, and depends on no calendar add-on; this bean is not created at all on a server without the mail reader installed (@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 this add-on that names a type of the reader's. Spring introspects every method of every bean it creates, so an unconditional bean whose signature named the reader's records would fail this whole add-on's context on a server without the reader; the landing service therefore speaks MailInvitation and LandedMailInvitation, this add-on's own words, and this bean translates both ways. Carries no logic: CaldavInvitationLandingService decides and acts.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.exoplatform.emailConnector.model.HeldInvitation
    held(org.exoplatform.emailConnector.model.InvitationProbe probe)
    The copy of the invitation the user's CalDAV-bound calendar holds (EXO-90873): the user's answer on it, NEEDS-ACTION told as none, and its SEQUENCE.
    boolean
    Whether this add-on holds a CalDAV-bound calendar for the user.
    org.exoplatform.emailConnector.model.LandedInvitation
    land(org.exoplatform.emailConnector.model.InvitationLanding landing)
    Lands the invitation in the user's CalDAV-bound calendar.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CaldavInvitationCalendarPlugin

      public CaldavInvitationCalendarPlugin()
  • Method Details

    • holdsCalendarFor

      public boolean holdsCalendarFor(String username)
      Whether this add-on holds a CalDAV-bound calendar for the user.
      Specified by:
      holdsCalendarFor in interface org.exoplatform.emailConnector.plugin.InvitationCalendarPlugin
      Parameters:
      username - the user's eXo login
      Returns:
      true when a connected account has a calendar bound on it
    • land

      public org.exoplatform.emailConnector.model.LandedInvitation land(org.exoplatform.emailConnector.model.InvitationLanding landing)
      Lands the invitation in the user's CalDAV-bound calendar.
      Specified by:
      land in interface org.exoplatform.emailConnector.plugin.InvitationCalendarPlugin
      Parameters:
      landing - the invitation, the user and what they asked
      Returns:
      what was done, null when the user has no calendar here or there was nothing to do
      Throws:
      IllegalArgumentException - when the invitation cannot be landed as it is
      RuntimeException - when the landing was attempted and failed
    • held

      public org.exoplatform.emailConnector.model.HeldInvitation held(org.exoplatform.emailConnector.model.InvitationProbe probe)
      The copy of the invitation the user's CalDAV-bound calendar holds (EXO-90873): the user's answer on it, NEEDS-ACTION told as none, and its SEQUENCE.
      Specified by:
      held in interface org.exoplatform.emailConnector.plugin.InvitationCalendarPlugin
      Parameters:
      probe - the user and the event's UID
      Returns:
      the copy held, null when the user has no calendar here or holds no copy to tell of
      Throws:
      IllegalStateException - when the mapped copy could not be read