public static enum ServiceResponse.Status extends Enum<ServiceResponse.Status>
An enumeration of possible states which a response can have.
Enum Constant and Description |
---|
ERROR
ERROR - generic error state |
REFERENCED
REFERENCED - the asset for this asset id has references which must be handled before the asset can be operated on |
SUCCESS
SUCCESS - generic success state |
Modifier and Type | Method and Description |
---|---|
Integer |
status()
Returns the integer status code associated with this status.
|
static ServiceResponse.Status |
toEnum(int code)
Returns a status enum, given the status code.
|
static ServiceResponse.Status |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ServiceResponse.Status[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared.
|
public static final ServiceResponse.Status SUCCESS
SUCCESS
- generic success statepublic static final ServiceResponse.Status REFERENCED
REFERENCED
- the asset for this asset id has references which must be handled before the asset can be operated onpublic static final ServiceResponse.Status ERROR
ERROR
- generic error statepublic static ServiceResponse.Status[] values()
for (ServiceResponse.Status c : ServiceResponse.Status.values()) System.out.println(c);
public static ServiceResponse.Status 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 Integer status()
public static ServiceResponse.Status toEnum(int code)
code
- the code to match for, case-sensitive.