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 Summary
Fields Modifier and Type Field Description protected StringcodeThe code.static StringCODE_ACCESS_ERRORThe Constant CODE_ACCESS_ERROR.static StringCODE_CLIENT_ERRORThe Constant CODE_CLIENT_ERROR.static StringCODE_NOT_FOUND_ERRORThe Constant CODE_NOT_FOUND_ERROR.static StringCODE_SERVER_ERRORThe Constant CODE_SERVER_ERROR.protected StringmessageThe message.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorInfoaccessError(String message)Access error.StringasJSON()Error as JSON string.static ErrorInfoclientError(String message)Client error.StringgetCode()Gets the code.StringgetMessage()Gets the message.static ErrorInfonotFoundError(String message)Not found error.static ErrorInfoserverError(String message)Server error.
-
-
-
Field Detail
-
CODE_CLIENT_ERROR
public static final String CODE_CLIENT_ERROR
The Constant CODE_CLIENT_ERROR.- See Also:
- Constant Field Values
-
CODE_NOT_FOUND_ERROR
public static final String CODE_NOT_FOUND_ERROR
The Constant CODE_NOT_FOUND_ERROR.- See Also:
- Constant Field Values
-
CODE_ACCESS_ERROR
public static final String CODE_ACCESS_ERROR
The Constant CODE_ACCESS_ERROR.- See Also:
- Constant Field Values
-
CODE_SERVER_ERROR
public static final String CODE_SERVER_ERROR
The Constant CODE_SERVER_ERROR.- See Also:
- Constant Field Values
-
code
protected final String code
The code.
-
message
protected final String message
The message.
-
-
Method Detail
-
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
-
-