Interface ShareHost


public interface ShareHost
What the host lends a CalendarShareChannel for one operation: the lock serialising edits of a collection's access, who eXo knows behind a principal, and the subscription follow-up of a confirmed change. Every method answers from eXo's own records or the owner's own endpoint, never with an administrator's key.
  • Method Details

    • lockOf

      Lock lockOf(SharedCalendar calendar)
      The lock serialising this node's edits of one collection's access.
      Parameters:
      calendar - the calendar being shared
      Returns:
      the lock, not yet held
    • recordedPrincipal

      String recordedPrincipal(SharedCalendar calendar)
      The principal eXo recorded for the caller's connection to the server.
      Parameters:
      calendar - the calendar being shared
      Returns:
      the canonical principal, or null when none is recorded
    • ownerPrincipalForRead

      String ownerPrincipalForRead(SharedCalendar calendar)
      The caller's principal for a read: the recorded one, the server being asked only when nothing is recorded.
      Parameters:
      calendar - the calendar being read
      Returns:
      the canonical principal, or null when neither says
    • usersConnectedAs

      List<org.exoplatform.caldav.model.CalendarShares.ShareUser> usersConnectedAs(SharedCalendar calendar, String principal)
      The eXo users connected to the server as one principal, the caller left out; a lookup that fails names nobody.
      Parameters:
      calendar - the calendar being shared
      principal - the canonical principal
      Returns:
      the users, possibly empty
    • displayNameOf

      String displayNameOf(SharedCalendar calendar, String href, String canonical)
      What a principal no eXo user is connected as calls itself.
      Parameters:
      calendar - the calendar being shared
      href - the principal href as written
      canonical - the canonical principal
      Returns:
      the name, never blank
    • followSubscription

      void followSubscription(SharedCalendar calendar, ShareRecipient sharee, String shareeUid, String containerUid, boolean subscribe)
      Makes the colleague's account follow a change just confirmed on the access list: subscribed after a grant, unsubscribed after a revoke. Never fails the owner's action: what does not land is recorded and retried.
      Parameters:
      calendar - the calendar
      sharee - the colleague
      shareeUid - the uid the server addresses the colleague by
      containerUid - the calendar's container uid on the server
      subscribe - true after a grant, false after a revoke