Class ErrorInfo

java.lang.Object
org.exoplatform.webconferencing.client.ErrorInfo

public class ErrorInfo extends Object
Basic error entity.
Created by The eXo Platform SAS
Version:
$Id: ErrorInfo.java 00000 Apr 20, 2015 pnedonosko $
Author:
Peter Nedonosko
  • Field Details

    • CODE_CLIENT_ERROR

      public static final String CODE_CLIENT_ERROR
      The Constant CODE_CLIENT_ERROR.
      See Also:
    • CODE_NOT_FOUND_ERROR

      public static final String CODE_NOT_FOUND_ERROR
      The Constant CODE_NOT_FOUND_ERROR.
      See Also:
    • CODE_ACCESS_ERROR

      public static final String CODE_ACCESS_ERROR
      The Constant CODE_ACCESS_ERROR.
      See Also:
    • CODE_SERVER_ERROR

      public static final String CODE_SERVER_ERROR
      The Constant CODE_SERVER_ERROR.
      See Also:
    • code

      protected final String code
      The code.
    • message

      protected final String message
      The message.
  • Constructor Details

    • ErrorInfo

      public ErrorInfo(String code, String message)
      Instantiates a new error info.
      Parameters:
      code - the code
      message - the message
    • ErrorInfo

      public ErrorInfo(String message)
      Instantiates a new error info.
      Parameters:
      message - the message
  • Method Details

    • clientError

      public static ErrorInfo clientError(String message)
      Client error.
      Parameters:
      message - the message
      Returns:
      the error info
    • notFoundError

      public static ErrorInfo notFoundError(String message)
      Not found error.
      Parameters:
      message - the message
      Returns:
      the error info
    • accessError

      public static ErrorInfo accessError(String message)
      Access error.
      Parameters:
      message - the message
      Returns:
      the error info
    • serverError

      public static ErrorInfo serverError(String message)
      Server error.
      Parameters:
      message - the message
      Returns:
      the error info
    • getCode

      public String getCode()
      Gets the code.
      Returns:
      the code
    • getMessage

      public String getMessage()
      Gets the message.
      Returns:
      the message
    • asJSON

      public String asJSON()
      Error as JSON string.
      Returns:
      the string