public static enum CommandResponse.Error extends Enum<CommandResponse.Error> implements Error
| Enum Constant and Description |
|---|
CALLBACK_URL
Callback url not correct (the error code is 2).
|
COMMAND
Command not correct (the error code is 5).
|
FORCESAVE
No changes were applied to the document
before the forcesave command was received (the error code is 4).
|
INTERNAL_SERVER
Internal server error (the error code is 3).
|
KEY
Document key is missing or no document with such key could be found (the error code is 1).
|
NO
No errors (the error code is 0).
|
TOKEN
Invalid token (the error code is 6).
|
| Modifier and Type | Field and Description |
|---|---|
private static Map<Integer,CommandResponse.Error> |
BY_CODE
Defines a map of the
Error objects with the Command Service error codes. |
private Integer |
code
Defines the error code.
|
private String |
description
Defines the error description.
|
| Modifier and Type | Method and Description |
|---|---|
static CommandResponse.Error |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CommandResponse.Error |
valueOfCode(Integer code)
Returns the enum constant of this type with the specified code.
|
static CommandResponse.Error[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetCode, getDescriptionpublic static final CommandResponse.Error NO
public static final CommandResponse.Error KEY
public static final CommandResponse.Error CALLBACK_URL
public static final CommandResponse.Error INTERNAL_SERVER
public static final CommandResponse.Error FORCESAVE
public static final CommandResponse.Error COMMAND
public static final CommandResponse.Error TOKEN
private final Integer code
private final String description
private static final Map<Integer,CommandResponse.Error> BY_CODE
Error objects with the Command Service error codes.public static CommandResponse.Error[] values()
for (CommandResponse.Error c : CommandResponse.Error.values()) System.out.println(c);
public static CommandResponse.Error 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 static CommandResponse.Error valueOfCode(Integer code)
code - The code of the enum constant to be returned.Copyright © 2023–2024. All rights reserved.