Class BlueMindCalendarConfiguration

java.lang.Object
org.exoplatform.bluemind.calendar.configuration.BlueMindCalendarConfiguration

@Configuration @ConditionalOnClass({org.exoplatform.caldav.client.CalDavClient.class,org.exoplatform.caldav.plugin.CalendarShareChannel.class,org.exoplatform.services.connector.credentials.ConnectorCredentialsService.class}) public class BlueMindCalendarConfiguration extends Object
What the calendar contributions need from the calendar host beyond its SPIs, built in this web application from what the host does export.

The Kernel/Spring bridge exports a web application's @Service beans and nothing else, and two of the host's collaborators the contributions use are @Components: its credentials seam (CaldavCredentialsResolver) and its DAV client (HttpCalDavClient). Both are plain classes over exported services — commons-exo's ConnectorCredentialsService and the host's CaldavServerService — so the add-on builds its own instances of the host's own classes rather than a copy of their logic: the credentials context and every DAV request stay exactly the host's.

Factory-method beans, so that none of them is exported back: another web application asking for a CalDavClient still gets the host's. Guarded by ConditionalOnClass, so the add-on boots without the calendar host, and creates nothing on a calendar host that predates the contribution SPIs (CalendarShareChannel stands for them): every calendar component of this add-on carries the same guard, since each needs a bean built here.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.exoplatform.caldav.client.CalDavClient
    blueMindCalDavClient(org.exoplatform.caldav.service.CaldavServerService caldavServerService, org.exoplatform.caldav.provider.CaldavCredentialsResolver blueMindCaldavCredentialsResolver)
    The host's DAV client, over the host's server registry and the seam above: the requests the share channel and the import writer make over DAV are the host's requests.
    org.exoplatform.caldav.provider.CaldavCredentialsResolver
    blueMindCaldavCredentialsResolver(org.exoplatform.services.connector.credentials.ConnectorCredentialsService connectorCredentialsService)
    The host's credentials seam, over the platform's credentials service.
    blueMindCalendarSessions(org.exoplatform.bluemind.client.BlueMindRestClient blueMindRestClient, org.exoplatform.caldav.provider.CaldavCredentialsResolver blueMindCaldavCredentialsResolver, int ttlSeconds, int maxAccounts)
    The calendar contributions' door onto BlueMind's REST API.

    Methods inherited from class java.lang.Object

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

    • BlueMindCalendarConfiguration

      public BlueMindCalendarConfiguration()
  • Method Details

    • blueMindCaldavCredentialsResolver

      @Bean public org.exoplatform.caldav.provider.CaldavCredentialsResolver blueMindCaldavCredentialsResolver(org.exoplatform.services.connector.credentials.ConnectorCredentialsService connectorCredentialsService)
      The host's credentials seam, over the platform's credentials service.
      Parameters:
      connectorCredentialsService - the platform's credentials service
      Returns:
      the seam
    • blueMindCalDavClient

      @Bean public org.exoplatform.caldav.client.CalDavClient blueMindCalDavClient(org.exoplatform.caldav.service.CaldavServerService caldavServerService, org.exoplatform.caldav.provider.CaldavCredentialsResolver blueMindCaldavCredentialsResolver)
      The host's DAV client, over the host's server registry and the seam above: the requests the share channel and the import writer make over DAV are the host's requests.
      Parameters:
      caldavServerService - the host's server registry
      blueMindCaldavCredentialsResolver - the credentials seam
      Returns:
      the client
    • blueMindCalendarSessions

      @Bean public BlueMindCalendarSessions blueMindCalendarSessions(org.exoplatform.bluemind.client.BlueMindRestClient blueMindRestClient, org.exoplatform.caldav.provider.CaldavCredentialsResolver blueMindCaldavCredentialsResolver, @Value("${exo.agenda.caldav.bluemind.session.ttlSeconds:300}") int ttlSeconds, @Value("${exo.agenda.caldav.bluemind.session.maxAccounts:1000}") int maxAccounts)
      The calendar contributions' door onto BlueMind's REST API.
      Parameters:
      blueMindRestClient - the add-on's REST client
      blueMindCaldavCredentialsResolver - the credentials seam
      ttlSeconds - the session cache's lifetime, read to know whether calls are keyed at all
      maxAccounts - the session cache's room, likewise
      Returns:
      the door