Package org.apache.ofbiz.ws.rs.core
Enum Class ResponseStatus.Custom
- All Implemented Interfaces:
Serializable
,Comparable<ResponseStatus.Custom>
,Constable
,javax.ws.rs.core.Response.StatusType
- Enclosing class:
- ResponseStatus
public static enum ResponseStatus.Custom
extends Enum<ResponseStatus.Custom>
implements javax.ws.rs.core.Response.StatusType
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription422 Unprocessable Entity, see https://tools.ietf.org/html/rfc4918#section-11.2 -
Method Summary
Modifier and TypeMethodDescriptionstatic ResponseStatus.Custom
fromStatusCode
(int code) Convert a numerical status code into the corresponding Status.javax.ws.rs.core.Response.Status.Family
Get the class of status code.Get the reason phrase.int
Get the associated status code.toString()
Get the reason phrase.static ResponseStatus.Custom
Returns the enum constant of this class with the specified name.static ResponseStatus.Custom[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from interface javax.ws.rs.core.Response.StatusType
toEnum
-
Enum Constant Details
-
UNPROCESSABLE_ENTITY
422 Unprocessable Entity, see https://tools.ietf.org/html/rfc4918#section-11.2
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getFamily
public javax.ws.rs.core.Response.Status.Family getFamily()Get the class of status code.- Specified by:
getFamily
in interfacejavax.ws.rs.core.Response.StatusType
- Returns:
- the class of status code.
-
getStatusCode
public int getStatusCode()Get the associated status code.- Specified by:
getStatusCode
in interfacejavax.ws.rs.core.Response.StatusType
- Returns:
- the status code.
-
getReasonPhrase
Get the reason phrase.- Specified by:
getReasonPhrase
in interfacejavax.ws.rs.core.Response.StatusType
- Returns:
- the reason phrase.
-
toString
Get the reason phrase.- Overrides:
toString
in classEnum<ResponseStatus.Custom>
- Returns:
- the reason phrase.
-
fromStatusCode
Convert a numerical status code into the corresponding Status.- Parameters:
code
-- Returns:
- the matching Status or null is no matching Status is defined.
-