Class BlueMindSubscriptionChannel
java.lang.Object
org.exoplatform.caldav.client.bluemind.BlueMindSubscriptionChannel
- All Implemented Interfaces:
CalendarSubscriptionChannel
@Service
public class BlueMindSubscriptionChannel
extends Object
implements CalendarSubscriptionChannel
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, like any contribution from another add-on, so that the
host collects it by type through the Kernel/Spring bridge and never names
it.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlueMindSubscriptionChannel(BlueMindSubscriptionClient blueMindSubscriptionClient) The channel over BlueMind's subscription client. -
Method Summary
Modifier and TypeMethodDescription<T> TasSubscriber(CalDavEndpoint endpoint, String userUid, Function<SubscriptionEdits, T> job) Runs the edits in one BlueMind session opened as the user.id()The channel's stable identifier, for the log.ownersOf(CalDavEndpoint endpoint) BlueMind's own listing of who owns each calendar the account sees.subscriptionOf(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
-
CHANNEL_ID
The channel's identifier.- See Also:
-
-
Constructor Details
-
BlueMindSubscriptionChannel
@Autowired public BlueMindSubscriptionChannel(BlueMindSubscriptionClient blueMindSubscriptionClient) The channel over BlueMind's subscription client.- Parameters:
blueMindSubscriptionClient- the REST client, may be null where only the naming is used
-
-
Method Details
-
id
The channel's stable identifier, for the log.- Specified by:
idin interfaceCalendarSubscriptionChannel- Returns:
- the identifier, never blank
-
userUidOf
The directory entry uid of a BlueMind user principal.- Specified by:
userUidOfin interfaceCalendarSubscriptionChannel- Parameters:
principal- a principal path, may be null- Returns:
- the uid, or null when the path is not a BlueMind user principal
-
subscriptionOf
The subscription BlueMind's container naming reveals, with the owner's principal spelled the account's way.- Specified by:
subscriptionOfin interfaceCalendarSubscriptionChannel- 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(CalDavEndpoint endpoint, String userUid, Function<SubscriptionEdits, T> job) Runs the edits in one BlueMind session opened as the user.- Specified by:
asSubscriberin interfaceCalendarSubscriptionChannel- 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
BlueMind's own listing of who owns each calendar the account sees.- Specified by:
ownersOfin interfaceCalendarSubscriptionChannel- Parameters:
endpoint- the account's endpoint- Returns:
- the listing
-