Class CalendarObjectWriters

java.lang.Object
org.exoplatform.caldav.client.CalendarObjectWriters

@Component public class CalendarObjectWriters extends Object
Picks the door a server's copies go through: the one write-channel decision of the whole engine (EXO-90307).

Chosen per server, never per call site: the registration's CaldavServer.getWriteChannel() is read for the server the endpoint was minted from, and every write and removal on that endpoint — the organizer's copy, an invitee's copy, an answer carried onto a copy, a repair, a relocation — goes through the same door. That is what makes the administrator's flag a complete rollback: nothing else decides.

No fallback on a registry failure, and that is deliberate where CaldavPushService.mirrorTargetOf does fall back. There, writing the copies where they have always gone is at worst unchanged behaviour. Here, writing through CalDAV a copy meant for the import channel is the very defect the channel exists to prevent — BlueMind would schedule the meeting — so a registry that cannot be read fails the write, which the sweep retries, rather than quietly choosing the wrong door. The endpoint was minted from the same registry a moment earlier, so this read failing is a real incident, not a routine miss.

  • Constructor Details

    • CalendarObjectWriters

      @Autowired public CalendarObjectWriters(CaldavServerService caldavServerService, CalDavObjectWriter calDavObjectWriter, BlueMindImportWriter blueMindImportWriter)
      The resolver over the registry and the two doors.
      Parameters:
      caldavServerService - the registry the channel is read from
      calDavObjectWriter - the CalDAV door
      blueMindImportWriter - the BlueMind import door
  • Method Details

    • writer

      public CalendarObjectWriter writer(CalDavEndpoint endpoint)
      The writer for every object of an endpoint's server.
      Parameters:
      endpoint - the endpoint minted from the registry
      Returns:
      the door the server's registration declares
      Throws:
      RuntimeException - whatever the registry raises when it cannot be read — propagated, never turned into a door