Enum ResponseErrorType
- java.lang.Object
-
- java.lang.Enum<ResponseErrorType>
-
- ru.easydonate.easydonate4j.api.v3.response.ResponseErrorType
-
- All Implemented Interfaces:
Serializable
,Comparable<ResponseErrorType>
public enum ResponseErrorType extends Enum<ResponseErrorType>
The enum that represents all possible and actual response error types.- Author:
- soknight
- See Also:
ErrorResponse.getErrorType()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ELEMENT_NOT_FOUND
Represents the requested element not found error.MISSING_REQUIRED_PARAMETERS
Represents the missing required request parameter(s) error.PLUGIN_INTERNAL_ERROR
Represents the internal plugin error.PLUGIN_IS_DISABLED
Represents the plugin is disabled error.SHOP_NOT_FOUND
Represents the shop not found error.UNKNOWN
Represents an unknown error.WRONG_PARAMETER_VALUE_FORMAT
Represents the request parameters format mismatch error.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull ResponseErrorType
getByNumber(int errorCode)
Get the enum constant by the known error code.static ResponseErrorType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ResponseErrorType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final ResponseErrorType UNKNOWN
Represents an unknown error.
-
SHOP_NOT_FOUND
public static final ResponseErrorType SHOP_NOT_FOUND
Represents the shop not found error.
-
ELEMENT_NOT_FOUND
public static final ResponseErrorType ELEMENT_NOT_FOUND
Represents the requested element not found error.
-
MISSING_REQUIRED_PARAMETERS
public static final ResponseErrorType MISSING_REQUIRED_PARAMETERS
Represents the missing required request parameter(s) error.
-
WRONG_PARAMETER_VALUE_FORMAT
public static final ResponseErrorType WRONG_PARAMETER_VALUE_FORMAT
Represents the request parameters format mismatch error.
-
PLUGIN_IS_DISABLED
public static final ResponseErrorType PLUGIN_IS_DISABLED
Represents the plugin is disabled error.
-
PLUGIN_INTERNAL_ERROR
public static final ResponseErrorType PLUGIN_INTERNAL_ERROR
Represents the internal plugin error.
-
-
Method Detail
-
values
public static ResponseErrorType[] 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 (ResponseErrorType c : ResponseErrorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResponseErrorType 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
-
getByNumber
@NotNull public static @NotNull ResponseErrorType getByNumber(int errorCode)
Get the enum constant by the known error code.
If a relevant enum constant with this error code will not be found then this method will returnUNKNOWN
constant as default.- Parameters:
errorCode
- the error code to find an enum constant.- Returns:
- The found response error enum constant or
UNKNOWN
by default.
-
-