Class CalendarShareChannelRegistry

java.lang.Object
org.exoplatform.caldav.service.CalendarShareChannelRegistry

@Service public class CalendarShareChannelRegistry extends Object
The share channels installed on this platform, and the two questions the share service asks of them: which mechanism a collection gets, and which channel, if any, carries that mechanism.

The contributions are read on each question, through the bean factory, so a channel from another web application is found whatever the boot order.

  • Constructor Details

    • CalendarShareChannelRegistry

      @Autowired public CalendarShareChannelRegistry(org.springframework.beans.factory.ObjectProvider<CalendarShareChannel> channels)
      The registry over every contributed channel.
      Parameters:
      channels - the contributions, from every web application, each read on its own so that one which cannot be created is left out (ContributedBeans); null reads as none
  • Method Details

    • of

      The registry over a fixed list of channels, as a test states them.
      Parameters:
      channels - the channels, may be null for none
      Returns:
      the registry
    • mechanismOf

      public SharingMechanism mechanismOf(DavOptions options, String collectionHref)
      The mechanism a collection gets: the first usable channel that applies to it, the host's own selection from what it advertises otherwise.
      Parameters:
      options - what the collection answered, null when nothing was asked
      collectionHref - the collection's path, may be null
      Returns:
      the mechanism, never null
    • channelFor

      public CalendarShareChannel channelFor(SharingMechanism mechanism)
      The channel carrying a mechanism, or null when the host carries it itself — or nobody does. A usable channel is the only one of its mechanism, so it is the channel whose CalendarShareChannel.applies(DavOptions, String, SharingMechanism) selected that mechanism in mechanismOf(DavOptions, String).
      Parameters:
      mechanism - the mechanism selected, may be null
      Returns:
      the channel, or null