public enum ReturnCode extends Enum<ReturnCode>
Common Return Codes, used for all requests, to help specify the nature of the problem which may have occurred, if processing wasn't successful.
Modifier and Type | Class and Description |
---|---|
static class |
ReturnCode.Classification
ReturnCode Classification, i.e.
|
Enum Constant and Description |
---|
AUTHENTICATION_WARNING
HTTP Status Code 403 - Forbidden.
The request was valid, but the server is refusing action. |
AUTHORIZATION_WARNING
HTTP Status Code 401 - Unauthorized (RFC 7235).
Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. |
CONSTRAINT_ERROR
Custom Warning 596 - Constraint Error.
A unique constraint violation occurred in the database. |
CRYPTO_ERROR
Custom Warning 591 - General Cryptographic Error.
A generic cryptographic error occurred during the request. |
DATABASE_ERROR
Custom Warning 595 - Database Error.
A generic problem with the database occurred. |
ERROR
HTTP Status Code 500 - Internal Server Error.
A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. |
IDENTIFICATION_WARNING
HTTP Status Code 404 - Not Found.
The requested resource could not be found but may be available in the future. |
ILLEGAL_ACTION
HTTP Status Code 405 - Method Not Allowed.
A request method is not supported for the requested resource; for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource. |
INTEGRITY_ERROR
Custom Warning 592 - Integrity Error.
The encrypted data is having integrity errors. |
INTEGRITY_WARNING
HTTP Status Code 409 - Conflict.
Indicates that the request could not be processed because of conflict in the request, such as an edit conflict between multiple simultaneous updates. |
NETWORK_ERROR
HTTP Status Code 502 - Bad Gateway Error.
It was not possible to communicate with the requested URL. |
SETTING_ERROR
Custom Warning 593 - Setting Error.
Error extracting the setting value. |
SETTING_WARNING
Custom Warning 492 - Setting Warning.
It is not permitted to add, alter or delete the given setting. |
SIGNATURE_WARNING
Custom Warning 491 - Cryptographic Signature Problem.
The Signature is not usable, as it has expired. |
SUCCESS
HTTP Status Code 200 - OK.
Standard response for successful HTTP requests. |
VERIFICATION_WARNING
HTTP Status Code 406 - Not Acceptable.
The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request. |
WARNING
HTTP Status Code 400 - Bad Request.
The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing). |
Modifier and Type | Method and Description |
---|---|
static ReturnCode |
findReturnCode(int code)
Converts the actual code (integer value) to a ReturnCode enum value.
|
ReturnCode.Classification |
getClassification() |
int |
getCode() |
String |
getDescription() |
int |
getHttpCode() |
static ReturnCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReturnCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ReturnCode SUCCESS
public static final ReturnCode WARNING
public static final ReturnCode AUTHORIZATION_WARNING
public static final ReturnCode AUTHENTICATION_WARNING
public static final ReturnCode IDENTIFICATION_WARNING
public static final ReturnCode ILLEGAL_ACTION
public static final ReturnCode VERIFICATION_WARNING
public static final ReturnCode INTEGRITY_WARNING
public static final ReturnCode SIGNATURE_WARNING
public static final ReturnCode SETTING_WARNING
public static final ReturnCode ERROR
public static final ReturnCode NETWORK_ERROR
public static final ReturnCode CRYPTO_ERROR
public static final ReturnCode INTEGRITY_ERROR
public static final ReturnCode SETTING_ERROR
public static final ReturnCode DATABASE_ERROR
public static final ReturnCode CONSTRAINT_ERROR
public static ReturnCode[] values()
for (ReturnCode c : ReturnCode.values()) System.out.println(c);
public static ReturnCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic ReturnCode.Classification getClassification()
public int getCode()
public int getHttpCode()
public String getDescription()
public static ReturnCode findReturnCode(int code)
ERROR
is then returned.code
- The integer value to convert to a ReturnCode enum valueCopyright © 2019 JavaDog.io. All rights reserved.