Class BlueMindServerFlavour

java.lang.Object
org.exoplatform.bluemind.calendar.plugin.BlueMindServerFlavour
All Implemented Interfaces:
org.exoplatform.caldav.plugin.CalendarServerFlavour, org.springframework.core.Ordered

@Service("blueMindAddonServerFlavour") @ConditionalOnClass(org.exoplatform.caldav.plugin.CalendarServerFlavour.class) public class BlueMindServerFlavour extends Object implements org.exoplatform.caldav.plugin.CalendarServerFlavour, org.springframework.core.Ordered
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.

A @Service named "blueMindAddonServerFlavour" and ordered BlueMindCalendarPrecedence.ORDER: the host asks its flavours in order and keeps the first that recognises a registration, so this one answers for a BlueMind registration while the host still ships its own.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The bean name, distinct from the host's own flavour's.
    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.

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlueMindServerFlavour(BlueMindCalendarSessionService blueMindCalendarSessionService)
    The flavour over the calendar's session service.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Drops every REST session the calendar keeps, and only the calendar's: the mail connector's sessions in the add-on's one cache stay kept.
    void
    forgetSession(long userIdentityId, Long serverId)
    Drops the REST sessions kept for one account.
    int
    Ahead of the host's own BlueMind flavour.
    id()
    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

    • BEAN_NAME

      public static final String BEAN_NAME
      The bean name, distinct from the host's own flavour's.
      See Also:
    • 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(BlueMindCalendarSessionService blueMindCalendarSessionService)
      The flavour over the calendar's session service.
      Parameters:
      blueMindCalendarSessionService - the session service
  • Method Details

    • id

      public String id()
      Specified by:
      id in interface org.exoplatform.caldav.plugin.CalendarServerFlavour
    • recognises

      public boolean recognises(org.exoplatform.caldav.model.CaldavServer server)
      Whether the registration's name carries "bluemind", ignoring case.
      Specified by:
      recognises in interface org.exoplatform.caldav.plugin.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 org.exoplatform.caldav.plugin.CalendarServerFlavour
      Returns:
      WriteChannel.BLUEMIND_IMPORT
    • forgetSession

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

      public void forgetAllSessions()
      Drops every REST session the calendar keeps, and only the calendar's: the mail connector's sessions in the add-on's one cache stay kept.
      Specified by:
      forgetAllSessions in interface org.exoplatform.caldav.plugin.CalendarServerFlavour
    • getOrder

      public int getOrder()
      Ahead of the host's own BlueMind flavour.
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Returns:
      BlueMindCalendarPrecedence.ORDER