Enum Class StatusCode

java.lang.Object
java.lang.Enum<StatusCode>
dk.mada.jaxrs.model.api.StatusCode
All Implemented Interfaces:
Serializable, Comparable<StatusCode>, Constable

public enum StatusCode extends Enum<StatusCode>
HTTP status codes. The HttpURLConnection constants in enumeration-form. And then some from https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
  • Enum Constant Details

    • HTTP_DEFAULT

      public static final StatusCode HTTP_DEFAULT
      Special code to hold the state for the OpenApi default entry.
      See Also:
    • CONTINUE

      public static final StatusCode CONTINUE
      Continue.
    • SWITCHING_PROTOCOLS

      public static final StatusCode SWITCHING_PROTOCOLS
      Switching Protocols.
    • EARLY_HINTS

      public static final StatusCode EARLY_HINTS
      Early hints.
    • HTTP_OK

      public static final StatusCode HTTP_OK
      OK.
    • HTTP_CREATED

      public static final StatusCode HTTP_CREATED
      Created.
    • HTTP_ACCEPTED

      public static final StatusCode HTTP_ACCEPTED
      Accepted.
    • HTTP_NOT_AUTHORITATIVE

      public static final StatusCode HTTP_NOT_AUTHORITATIVE
      Non-Authoritative Information.
    • HTTP_NO_CONTENT

      public static final StatusCode HTTP_NO_CONTENT
      No Content.
    • HTTP_RESET

      public static final StatusCode HTTP_RESET
      Reset Content.
    • HTTP_PARTIAL

      public static final StatusCode HTTP_PARTIAL
      Partial Content.
    • MULTI_STATUS

      public static final StatusCode MULTI_STATUS
      Multi-Status.
    • ALREADY_REPORTED

      public static final StatusCode ALREADY_REPORTED
      Already Reported.
    • IM_USED

      public static final StatusCode IM_USED
      IM Used.
    • HTTP_MULT_CHOICE

      public static final StatusCode HTTP_MULT_CHOICE
      Multiple Choices.
    • HTTP_MOVED_PERM

      public static final StatusCode HTTP_MOVED_PERM
      Moved Permanently.
    • HTTP_MOVED_TEMP

      public static final StatusCode HTTP_MOVED_TEMP
      Temporary Redirect.
    • HTTP_SEE_OTHER

      public static final StatusCode HTTP_SEE_OTHER
      See Other.
    • HTTP_NOT_MODIFIED

      public static final StatusCode HTTP_NOT_MODIFIED
      Not Modified.
    • HTTP_USE_PROXY

      public static final StatusCode HTTP_USE_PROXY
      Use Proxy.
    • HTTP_UNUSED

      public static final StatusCode HTTP_UNUSED
      Unused, reserved.
    • HTTP_TEMPORARY_REDIRECT

      public static final StatusCode HTTP_TEMPORARY_REDIRECT
      Temporary Redirect.
    • PERMANENT_REDIRECT

      public static final StatusCode PERMANENT_REDIRECT
      Permanent Redirect.
    • HTTP_BAD_REQUEST

      public static final StatusCode HTTP_BAD_REQUEST
      Bad Request.
    • HTTP_UNAUTHORIZED

      public static final StatusCode HTTP_UNAUTHORIZED
      Unauthorized.
    • HTTP_PAYMENT_REQUIRED

      public static final StatusCode HTTP_PAYMENT_REQUIRED
      Payment Required.
    • HTTP_FORBIDDEN

      public static final StatusCode HTTP_FORBIDDEN
      Forbidden.
    • HTTP_NOT_FOUND

      public static final StatusCode HTTP_NOT_FOUND
      Not Found.
    • HTTP_BAD_METHOD

      public static final StatusCode HTTP_BAD_METHOD
      Method Not Allowed.
    • HTTP_NOT_ACCEPTABLE

      public static final StatusCode HTTP_NOT_ACCEPTABLE
      Not Acceptable.
    • HTTP_PROXY_AUTH

      public static final StatusCode HTTP_PROXY_AUTH
      Proxy Authentication Required.
    • HTTP_CLIENT_TIMEOUT

      public static final StatusCode HTTP_CLIENT_TIMEOUT
      Request Time-Out.
    • HTTP_CONFLICT

      public static final StatusCode HTTP_CONFLICT
      Conflict.
    • HTTP_GONE

      public static final StatusCode HTTP_GONE
      Gone.
    • HTTP_LENGTH_REQUIRED

      public static final StatusCode HTTP_LENGTH_REQUIRED
      Length Required.
    • HTTP_PRECON_FAILED

      public static final StatusCode HTTP_PRECON_FAILED
      Precondition Failed.
    • HTTP_ENTITY_TOO_LARGE

      public static final StatusCode HTTP_ENTITY_TOO_LARGE
      Request Entity Too Large.
    • HTTP_REQ_TOO_LONG

      public static final StatusCode HTTP_REQ_TOO_LONG
      Request-URI Too Large.
    • HTTP_UNSUPPORTED_TYPE

      public static final StatusCode HTTP_UNSUPPORTED_TYPE
      Unsupported Media Type.
    • HTTP_UNPROCESSABLE_ENTITY

      public static final StatusCode HTTP_UNPROCESSABLE_ENTITY
      Unprocessable Entity.
    • HTTP_LOCKED

      public static final StatusCode HTTP_LOCKED
      Locked.
    • HTTP_FAILED_DEPENDENCY

      public static final StatusCode HTTP_FAILED_DEPENDENCY
      Failed dependency.
    • TOO_EARLY

      public static final StatusCode TOO_EARLY
      Too early.
    • UPGRADE_REQUIRED

      public static final StatusCode UPGRADE_REQUIRED
      Upgrade Required.
    • PRECONDITION_REQUIRED

      public static final StatusCode PRECONDITION_REQUIRED
      Precondition Required.
    • TOO_MANY_REQUESTS

      public static final StatusCode TOO_MANY_REQUESTS
      Too Many Requests.
    • REQUEST_HEADER_FIELDS_TOO_LARGE

      public static final StatusCode REQUEST_HEADER_FIELDS_TOO_LARGE
      Request Header Fields Too Large.
    • HTTP_INTERNAL_ERROR

      public static final StatusCode HTTP_INTERNAL_ERROR
      Internal Server Error.
    • HTTP_NOT_IMPLEMENTED

      public static final StatusCode HTTP_NOT_IMPLEMENTED
      Not Implemented.
    • HTTP_BAD_GATEWAY

      public static final StatusCode HTTP_BAD_GATEWAY
      Bad Gateway.
    • HTTP_UNAVAILABLE

      public static final StatusCode HTTP_UNAVAILABLE
      Service Unavailable.
    • HTTP_GATEWAY_TIMEOUT

      public static final StatusCode HTTP_GATEWAY_TIMEOUT
      Gateway Timeout.
    • HTTP_VERSION

      public static final StatusCode HTTP_VERSION
      HTTP Version Not Supported.
    • VARIANT_ALSO_NEGOTIATES

      public static final StatusCode VARIANT_ALSO_NEGOTIATES
      Variant Also Negotiates.
    • INSUFFICIENT_STORAGE

      public static final StatusCode INSUFFICIENT_STORAGE
      Insufficient Storage.
    • LOOP_DETECTED

      public static final StatusCode LOOP_DETECTED
      Loop Detected.
    • NOT_EXTENDED

      public static final StatusCode NOT_EXTENDED
      Not Extended.
    • NETWORK_AUTHENTICATION_REQUIRED

      public static final StatusCode NETWORK_AUTHENTICATION_REQUIRED
      Network Authentication Required.
  • Method Details

    • values

      public static StatusCode[] 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

      public static StatusCode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • asOpenApiStatus

      public String asOpenApiStatus()
      Returns the code in the same form as expected by OpenApi. This means that HTTP_DEFAULT is returned as "default", others as their status code in string form.
      Returns:
      the OpenApi status code
    • of

      public static StatusCode of(String code)
      Convert OpenApi wire status code a model StatusCode. Note the special handling of "default".
      Parameters:
      code - the OpenApi wire-form of a status code
      Returns:
      the matching status code