Class BlueMindServerFlavour

java.lang.Object
org.exoplatform.caldav.client.bluemind.BlueMindServerFlavour
All Implemented Interfaces:
CalendarServerFlavour

@Service public class BlueMindServerFlavour extends Object implements CalendarServerFlavour
BlueMind as a server flavour: recognised by its registration's name, it may write through WriteChannel.BLUEMIND_IMPORT, and it keeps a REST session per account (EXO-90397) that eXo drops when the account or the registration changes.

Recognised by the name, because nothing else on the row says which product it is: a preset is a copy, never a link (the drawer's serverPresets.js states why), so no preset identifier is stored; the provider name is the agenda bridge's, not the product's; and the sharing mechanism is a runtime capability read from the server, not a stored fact a save can be judged by. An administrator who renames a BlueMind registration to something else therefore also gives up its BlueMind-only choices — and is told so by the registry's refusal rather than by a silent reset.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The flavour's identifier, the same as the front end's BlueMind preset.
    static final String
    What a registration's name carries when it stands for a BlueMind server: the shipped seed row ("Bluemind") and the drawer's preset ("BlueMind") both write it.
  • Constructor Summary

    Constructors
    Constructor
    Description
    The bean Spring makes, its session service injected.
    A flavour over a given session service, as a test states it.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Drops every kept REST session.
    void
    forgetSession(long userIdentityId, Long serverId)
    Drops the REST session kept for one account.
    id()
    The flavour's stable identifier, the same as the front end's server preset for the product.
    boolean
    recognises(org.exoplatform.caldav.model.CaldavServer server)
    Whether the registration's name carries "bluemind", ignoring case.
    Set<org.exoplatform.caldav.model.WriteChannel>
    BlueMind's own ICS import door.

    Methods inherited from class java.lang.Object

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

    • FLAVOUR_ID

      public static final String FLAVOUR_ID
      The flavour's identifier, the same as the front end's BlueMind preset.
      See Also:
    • NAME_MARKER

      public static final String NAME_MARKER
      What a registration's name carries when it stands for a BlueMind server: the shipped seed row ("Bluemind") and the drawer's preset ("BlueMind") both write it.
      See Also:
  • Constructor Details

    • BlueMindServerFlavour

      public BlueMindServerFlavour()
      The bean Spring makes, its session service injected.
    • BlueMindServerFlavour

      public BlueMindServerFlavour(BlueMindSessionService blueMindSessionService)
      A flavour over a given session service, as a test states it.
      Parameters:
      blueMindSessionService - the session service, may be null
  • Method Details

    • id

      public String id()
      The flavour's stable identifier, the same as the front end's server preset for the product.
      Specified by:
      id in interface CalendarServerFlavour
      Returns:
      the identifier, never blank
    • recognises

      public boolean recognises(org.exoplatform.caldav.model.CaldavServer server)
      Whether the registration's name carries "bluemind", ignoring case.
      Specified by:
      recognises in interface CalendarServerFlavour
      Parameters:
      server - the registration, may be null
      Returns:
      true when its name says BlueMind
    • writeChannels

      public Set<org.exoplatform.caldav.model.WriteChannel> writeChannels()
      BlueMind's own ICS import door.
      Specified by:
      writeChannels in interface CalendarServerFlavour
      Returns:
      WriteChannel.BLUEMIND_IMPORT
    • forgetSession

      public void forgetSession(long userIdentityId, Long serverId)
      Drops the REST session kept for one account.
      Specified by:
      forgetSession in interface CalendarServerFlavour
      Parameters:
      userIdentityId - the social identity of the connected user
      serverId - the registration the account was on
    • forgetAllSessions

      public void forgetAllSessions()
      Drops every kept REST session.
      Specified by:
      forgetAllSessions in interface CalendarServerFlavour