Class BlueMindEndpoint

java.lang.Object
org.exoplatform.bluemind.mail.util.BlueMindEndpoint

public final class BlueMindEndpoint extends Object
Where a connector preset's BlueMind server lives, from the administrator's configuration only: the boot-time property email.connector.bluemind.coreUrl.<connectorId>, else email.connector.bluemind.coreUrl, else the scheme, host and port of the preset's webmailUrl -- never its imapUrl, which on the deployment observed is another host. Nothing a user sends can name the host.

The answer is the server's scheme, host and port: bluemind-client appends the /api root BlueMind serves its REST API under and never a path a caller names. A configured address may therefore name the server's root or its /api and nothing else: a longer path would be silently dropped by the client, so it is refused here, where the administrator's value is read.

The address must be https; plain http is accepted for a loopback host only, since the account's password travels in the login's body.

  • Field Details

    • CORE_URL_PROPERTY

      public static final String CORE_URL_PROPERTY
      The property naming the server's address, per preset with a .<id> suffix.
      See Also:
  • Method Details

    • serverOf

      public static URI serverOf(org.exoplatform.emailConnector.model.EmailConnector connector)
      The BlueMind server of a preset.
      Parameters:
      connector - the preset
      Returns:
      the server's scheme, host and port, e.g. https://mail.example.com
      Throws:
      IllegalStateException - when neither the property nor the preset's webmail address give a usable server