Package org.exoplatform.caldav.service
Class CalendarShareChannelRegistry
java.lang.Object
org.exoplatform.caldav.service.CalendarShareChannelRegistry
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 Summary
ConstructorsConstructorDescriptionCalendarShareChannelRegistry(org.springframework.beans.factory.ObjectProvider<CalendarShareChannel> channels) The registry over every contributed channel. -
Method Summary
Modifier and TypeMethodDescriptionchannelFor(SharingMechanism mechanism) The channel carrying a mechanism, or null when the host carries it itself — or nobody does.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.static CalendarShareChannelRegistryof(List<CalendarShareChannel> channels) The registry over a fixed list of channels, as a test states them.
-
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
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 askedcollectionHref- the collection's path, may be null- Returns:
- the mechanism, never null
-
channelFor
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 whoseCalendarShareChannel.applies(org.exoplatform.caldav.client.DavOptions, java.lang.String, org.exoplatform.caldav.client.SharingMechanism)selected that mechanism inmechanismOf(org.exoplatform.caldav.client.DavOptions, java.lang.String).- Parameters:
mechanism- the mechanism selected, may be null- Returns:
- the channel, or null
-