Class BlueMindSubscriptionChannel
java.lang.Object
org.exoplatform.bluemind.calendar.plugin.BlueMindSubscriptionChannel
- All Implemented Interfaces:
org.exoplatform.caldav.plugin.CalendarSubscriptionChannel,org.springframework.core.Ordered
@Service("blueMindAddonSubscriptionChannel")
@ConditionalOnClass(org.exoplatform.caldav.plugin.CalendarSubscriptionChannel.class)
public class BlueMindSubscriptionChannel
extends Object
implements org.exoplatform.caldav.plugin.CalendarSubscriptionChannel, org.springframework.core.Ordered
BlueMind's subscriptions as a channel: its container naming
(
BlueMindContainerNaming) tells a subscription from the account's
own calendar, and its REST subscription API
(BlueMindSubscriptionClient) subscribes a colleague to a calendar
shared with them (EXO-90275, EXO-90277, EXO-90347).
A @Service named "blueMindAddonSubscriptionChannel" and ordered
BlueMindCalendarPrecedence.ORDER: the host asks its channels in
order and keeps the first that names a principal or reads a subscription,
so this one answers for a BlueMind account while the host still ships its
own.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe bean name, distinct from the host's own channel's.static final StringThe channel's identifier.Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionBlueMindSubscriptionChannel(BlueMindSubscriptionClient blueMindSubscriptionClient) The channel over BlueMind's subscription client. -
Method Summary
Modifier and TypeMethodDescription<T> TasSubscriber(org.exoplatform.caldav.client.CalDavEndpoint endpoint, String userUid, Function<org.exoplatform.caldav.plugin.SubscriptionEdits, T> job) Runs the edits in one BlueMind session opened as the user.intgetOrder()Ahead of the host's own BlueMind channel.id()org.exoplatform.caldav.plugin.CalendarOwnersownersOf(org.exoplatform.caldav.client.CalDavEndpoint endpoint) BlueMind's own listing of who owns each calendar the account sees.org.exoplatform.caldav.plugin.CalendarSubscriptionsubscriptionOf(String href, String principal) The subscription BlueMind's container naming reveals, with the owner's principal spelled the account's way.The directory entry uid of a BlueMind user principal.
-
Field Details
-
BEAN_NAME
The bean name, distinct from the host's own channel's.- See Also:
-
CHANNEL_ID
The channel's identifier.- See Also:
-
-
Constructor Details
-
BlueMindSubscriptionChannel
The channel over BlueMind's subscription client.- Parameters:
blueMindSubscriptionClient- the REST client, may be null where only the naming is used
-
-
Method Details
-
id
- Specified by:
idin interfaceorg.exoplatform.caldav.plugin.CalendarSubscriptionChannel
-
userUidOf
The directory entry uid of a BlueMind user principal.- Specified by:
userUidOfin interfaceorg.exoplatform.caldav.plugin.CalendarSubscriptionChannel- Parameters:
principal- a principal path, may be null- Returns:
- the uid, or null when the path is not a BlueMind user principal
-
subscriptionOf
public org.exoplatform.caldav.plugin.CalendarSubscription subscriptionOf(String href, String principal) The subscription BlueMind's container naming reveals, with the owner's principal spelled the account's way.- Specified by:
subscriptionOfin interfaceorg.exoplatform.caldav.plugin.CalendarSubscriptionChannel- Parameters:
href- the collection's pathprincipal- the account's own principal path, may be null- Returns:
- the subscription, or null
-
asSubscriber
public <T> T asSubscriber(org.exoplatform.caldav.client.CalDavEndpoint endpoint, String userUid, Function<org.exoplatform.caldav.plugin.SubscriptionEdits, T> job) Runs the edits in one BlueMind session opened as the user.- Specified by:
asSubscriberin interfaceorg.exoplatform.caldav.plugin.CalendarSubscriptionChannel- Type Parameters:
T- what the job produces- Parameters:
endpoint- the user's endpointuserUid- the directory entry uid recorded for themjob- the edits- Returns:
- what the job produced
-
ownersOf
public org.exoplatform.caldav.plugin.CalendarOwners ownersOf(org.exoplatform.caldav.client.CalDavEndpoint endpoint) BlueMind's own listing of who owns each calendar the account sees.- Specified by:
ownersOfin interfaceorg.exoplatform.caldav.plugin.CalendarSubscriptionChannel- Parameters:
endpoint- the account's endpoint- Returns:
- the listing
-
getOrder
public int getOrder()Ahead of the host's own BlueMind channel.- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Returns:
BlueMindCalendarPrecedence.ORDER
-