Skip navigation links
com.fatwire.services.beans
Enum ServiceResponse.Status
java.lang.Object
java.lang.Enum<ServiceResponse.Status>
com.fatwire.services.beans.ServiceResponse.Status
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<ServiceResponse.Status>
- Enclosing class:
- ServiceResponse
-
public static enum ServiceResponse.Status
- extends java.lang.Enum<ServiceResponse.Status>
An enumeration of possible states which a response can have.
Enum Constant Summary |
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 |
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
SUCCESS
public static final ServiceResponse.Status SUCCESS
SUCCESS
- generic success state
REFERENCED
public static final ServiceResponse.Status REFERENCED
REFERENCED
- the asset for this asset id has references which must be handled before the asset can be operated on
ERROR
public static final ServiceResponse.Status ERROR
ERROR
- generic error state
values
public static ServiceResponse.Status[] 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 (ServiceResponse.Status c : ServiceResponse.Status.values())
System.out.println(c);
-
- Returns:
- an array containing the constants of this enum type, in the order they are declared
valueOf
public static ServiceResponse.Status valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified name
java.lang.NullPointerException
- if the argument is null
status
public java.lang.Integer status()
- Returns the integer status code associated with this status.
-
- Returns:
- the status code.
toEnum
public static ServiceResponse.Status toEnum(int code)
- Returns a status enum, given the status code. For '0', this will return SUCCESS, for '-2', it will return REFERENCED. For all others, it will return ERROR.
-
- Parameters:
code
- the code to match for, case-sensitive.
- Returns:
- the enum for this code.
Skip navigation links
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.