Package org.sunbird.common.exception
Enum ResponseCode
- java.lang.Object
-
- java.lang.Enum<ResponseCode>
-
- org.sunbird.common.exception.ResponseCode
-
- All Implemented Interfaces:
Serializable,Comparable<ResponseCode>
public enum ResponseCode extends Enum<ResponseCode>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLIENT_ERROROKPARTIAL_SUCCESSRESOURCE_NOT_FOUNDSERVER_ERROR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcode()static ResponseCodegetResponseCode(Integer code)static ResponseCodevalueOf(String name)Returns the enum constant of this type with the specified name.static ResponseCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OK
public static final ResponseCode OK
-
CLIENT_ERROR
public static final ResponseCode CLIENT_ERROR
-
SERVER_ERROR
public static final ResponseCode SERVER_ERROR
-
RESOURCE_NOT_FOUND
public static final ResponseCode RESOURCE_NOT_FOUND
-
PARTIAL_SUCCESS
public static final ResponseCode PARTIAL_SUCCESS
-
-
Method Detail
-
values
public static ResponseCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ResponseCode c : ResponseCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResponseCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
code
public int code()
-
getResponseCode
public static ResponseCode getResponseCode(Integer code)
-
-