Class CaldavShareException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.exoplatform.caldav.plugin.CaldavShareException
All Implemented Interfaces:
Serializable

public class CaldavShareException extends RuntimeException
A share of a calendar that could not be read, granted or removed for a reason that is neither the caller's request nor their rights: the account, the server's capability, or the server's own answer (EXO-90253).

The code is the contract, the one the browser translates; the preconditions and privileges are what the server said when it refused, so the refusal can be shown as the server stated it rather than as a generic failure.

See Also:
  • Constructor Details

    • CaldavShareException

      public CaldavShareException(String code)
      A failure named by its code alone.
      Parameters:
      code - the message code
    • CaldavShareException

      public CaldavShareException(String code, Throwable cause)
      A failure named by its code, with its cause.
      Parameters:
      code - the message code
      cause - what went wrong underneath
    • CaldavShareException

      public CaldavShareException(String code, List<String> preconditions, List<String> missingPrivileges, Throwable cause)
      A refusal the server explained.
      Parameters:
      code - the message code
      preconditions - the preconditions the server's error body named
      missingPrivileges - the privileges it said were missing
      cause - what went wrong underneath, may be null
  • Method Details

    • getCode

      public String getCode()
      The message code the browser translates.
      Returns:
      the code
    • getPreconditions

      public List<String> getPreconditions()
      What the server's refusal named.
      Returns:
      the preconditions, possibly empty
    • getMissingPrivileges

      public List<String> getMissingPrivileges()
      The privileges the server said were missing.
      Returns:
      the privileges, possibly empty