Class CaldavConnectorStorage

java.lang.Object
org.exoplatform.caldav.storage.CaldavConnectorStorage

public class CaldavConnectorStorage extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    CaldavConnectorStorage(org.exoplatform.commons.api.settings.SettingService settingService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    createCaldavSetting(org.exoplatform.caldav.model.CaldavUserSetting caldavUserSetting, long userIdentityId)
    Stores the credentials of the connected CalDAV account of a user and, when the account was connected through a declared server registration, the identifier of that registration.
    void
    deleteCaldavSetting(long userIdentityId)
    Deletes every stored CalDAV setting of a user: credentials and mirror calendar href alike, so a later reconnection starts from a clean state and never silently reuses the mirror of a previous account.
    org.exoplatform.caldav.model.CaldavUserSetting
    getCaldavSetting(long userIdentityId)
    Retrieves the CalDAV settings of a user: the credentials of the connected account and, when one has been established, the href of the mirror calendar.
    void
    saveMirrorCalendarHref(String mirrorCalendarHref, long userIdentityId)
    Saves the href of the mirror calendar of a user, the remote collection every meeting pushed by eXo is written to.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CaldavConnectorStorage

      public CaldavConnectorStorage(org.exoplatform.commons.api.settings.SettingService settingService)
  • Method Details

    • createCaldavSetting

      public void createCaldavSetting(org.exoplatform.caldav.model.CaldavUserSetting caldavUserSetting, long userIdentityId)
      Stores the credentials of the connected CalDAV account of a user and, when the account was connected through a declared server registration, the identifier of that registration. A connection made outside any registration (the legacy single-server deployment) removes a previously stored reference rather than leaving a stale one pointing the new account at the old server.
      Parameters:
      caldavUserSetting - setting holding the credentials and, optionally, the server registration identifier
      userIdentityId - technical identity identifier of the user
    • saveMirrorCalendarHref

      public void saveMirrorCalendarHref(String mirrorCalendarHref, long userIdentityId)
      Saves the href of the mirror calendar of a user, the remote collection every meeting pushed by eXo is written to. The href is stored beside the other settings of the CalDAV account of that user, so disconnecting the account removes it with the rest.
      Parameters:
      mirrorCalendarHref - href of the mirror calendar collection
      userIdentityId - technical identity identifier of the user
    • getCaldavSetting

      public org.exoplatform.caldav.model.CaldavUserSetting getCaldavSetting(long userIdentityId)
      Retrieves the CalDAV settings of a user: the credentials of the connected account and, when one has been established, the href of the mirror calendar.
      Parameters:
      userIdentityId - technical identity identifier of the user
      Returns:
      the CaldavUserSetting of that user, never null
    • deleteCaldavSetting

      public void deleteCaldavSetting(long userIdentityId)
      Deletes every stored CalDAV setting of a user: credentials and mirror calendar href alike, so a later reconnection starts from a clean state and never silently reuses the mirror of a previous account.
      Parameters:
      userIdentityId - technical identity identifier of the user