Class CalendarFeedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.exoplatform.agenda.util.CalendarFeedException
All Implemented Interfaces:
Serializable

public class CalendarFeedException extends Exception
Why a calendar link cannot be read (EXO-90278), as the message code the user is shown: agenda.calendarSubscription.<reason>. The message never carries the URL, which may embed a secret.
See Also:
  • Field Details

    • CODE_PREFIX

      public static final String CODE_PREFIX
      Prefix of every message code.
      See Also:
    • INVALID_URL

      public static final String INVALID_URL
      Not a usable absolute URL.
      See Also:
    • SCHEME_NOT_ALLOWED

      public static final String SCHEME_NOT_ALLOWED
      A scheme other than http, https or webcal.
      See Also:
    • PORT_NOT_ALLOWED

      public static final String PORT_NOT_ALLOWED
      A port outside the allowed set.
      See Also:
    • CREDENTIALS_IN_URL

      public static final String CREDENTIALS_IN_URL
      A user name or password in the URL.
      See Also:
    • REFUSED_ADDRESS

      public static final String REFUSED_ADDRESS
      The host resolves to an address the platform must not reach.
      See Also:
    • UNRESOLVABLE

      public static final String UNRESOLVABLE
      The host resolves to nothing.
      See Also:
    • UNREACHABLE

      public static final String UNREACHABLE
      No answer could be read.
      See Also:
    • TIMEOUT

      public static final String TIMEOUT
      The answer took too long.
      See Also:
    • HTTP_ERROR

      public static final String HTTP_ERROR
      The server answered with an error status.
      See Also:
    • TOO_LARGE

      public static final String TOO_LARGE
      The answer is larger than allowed.
      See Also:
    • TOO_MANY_REDIRECTS

      public static final String TOO_MANY_REDIRECTS
      Too many redirects.
      See Also:
    • NOT_A_CALENDAR

      public static final String NOT_A_CALENDAR
      The answer is not an iCalendar document.
      See Also:
    • MALFORMED_CALENDAR

      public static final String MALFORMED_CALENDAR
      The answer looks like an iCalendar document but cannot be read.
      See Also:
    • OWN_CALENDAR

      public static final String OWN_CALENDAR
      A link of this eXo to the user's own calendar.
      See Also:
    • ALREADY_IN_AGENDA

      public static final String ALREADY_IN_AGENDA
      A link of this eXo to a calendar the user already sees in their agenda through a space.
      See Also:
    • OWN_SPACE_CALENDAR

      public static final String OWN_SPACE_CALENDAR
      The link publishes a calendar of the space subscribing to it: the space's members already see its events (EXO-90373).
      See Also:
  • Constructor Details

    • CalendarFeedException

      public CalendarFeedException(String reason)
      Builds the exception for a reason.
      Parameters:
      reason - one of the reason constants
    • CalendarFeedException

      public CalendarFeedException(String reason, Throwable cause)
      Builds the exception for a reason, keeping its cause for the logs.
      Parameters:
      reason - one of the reason constants
      cause - what failed
  • Method Details

    • getReason

      public String getReason()
      Returns:
      the reason, one of the constants
    • getCode

      public String getCode()
      Returns:
      the full message code, agenda.calendarSubscription.<reason>