Class CalDavFailures

java.lang.Object
org.exoplatform.bluemind.calendar.util.CalDavFailures

public final class CalDavFailures extends Object
The one translation of bluemind-client's failures into the calendar host's: what the calendar contributions throw is what the host's SPIs declare, so that the sync engine, the share service and the subscription drain classify a BlueMind failure exactly as they classify a CalDAV one — an authentication refusal pauses the account, a 403 or a 404 abandons a pending subscription, an unreachable server is retried.

The library names no host type, so the translation lives on the add-on's side of the seam, in the module that owns the calendar contributions (backend-spring.md §5: a technology's own exceptions are translated in the module that owns them). Each host type is chosen by the library's type, never by its message; the message is kept, since the library already writes it without a key, a password or a query, and the library's exception is kept as the cause for whoever debugs.

  • Method Details

    • translate

      public static org.exoplatform.caldav.client.CalDavException translate(org.exoplatform.bluemind.client.exception.BlueMindException failure)
      The host failure that means what a library failure means.
      The translation
      bluemind-clientcaldav host
      BlueMindSubjectMismatchExceptionCalDavSubjectMismatchException
      BlueMindAuthenticationException (the refused technical session included)CalDavAuthenticationException
      BlueMindForbiddenExceptionCalDavForbiddenException
      BlueMindNotFoundExceptionCalDavNotFoundException
      BlueMindUnreachableExceptionCalDavUnreachableException
      any other BlueMindExceptionCalDavException
      Parameters:
      failure - the library's failure, never null
      Returns:
      the host's failure, its message the library's and its cause the library's exception