public enum ContentStatus extends Enum<ContentStatus>
These are based on HTTP response code, and are used to determine the HTTP code that will be returned by the service.
Enum Constant and Description |
---|
ACCEPTED
The request has been accepted for processing, but the processing has not been completed.
|
BAD_GATEWAY
The server, while acting as a gateway or proxy, received an invalid response from the upstream
server it accessed in attempting to fulfill the request.
|
BAD_REQUEST
The request could not be understood by the server due to malformed syntax.
|
CONFLICT
The request could not be completed due to a conflict with the current state of the resource.
|
CREATED
The request has been fulfilled and resulted in a new resource being created.
|
FORBIDDEN
The server understood the request, but is refusing to fulfill it.
|
FOUND
The requested resource resides temporarily under a different URI.
|
GATEWAY_TIMEOUT
The server, while acting as a gateway or proxy, did not receive a timely response from the
upstream server specified by the URI or some other auxiliary server it needed to access in
attempting to complete the request.
|
GONE
The requested resource is no longer available at the server and no forwarding address is known.
|
INTERNAL_SERVER_ERROR
The server encountered an unexpected condition which prevented it from fulfilling the request.
|
MOVED_PERMANENTLY
The requested resource has been assigned a new permanent URI and any future references to this
resource SHOULD use one of the returned URIs.
|
NO_CONTENT
The server has fulfilled the request but does not need to return any content.
|
NOT_FOUND
The server has not found anything matching the Request-URI.
|
NOT_IMPLEMENTED
The server does not support the functionality required to fulfill the request.
|
OK
The request has succeeded.
|
RESET_CONTENT
The server has fulfilled the request and the user agent SHOULD reset the document view which
caused the request to be sent.
|
SEE_OTHER
The response to the request can be found under a different URI and SHOULD be retrieved using a
GET method on that resource.
|
SERVICE_UNAVAILABLE
The server is currently unable to handle the request due to a temporary overloading or
maintenance of the server.
|
TEMPORARY_REDIRECT
The requested resource resides temporarily under a different URI.
|
Modifier and Type | Method and Description |
---|---|
int |
code()
The HTTP response code for this enum value.
|
static ContentStatus |
forCode(int code)
Returns the the content status corresponding to the specified HTTP status code.
|
static boolean |
isRedirect(ContentStatus status)
Indicates whether the specified status corresponds to an HTTP redirect code.
|
String |
toString()
Returns the status as a string for use in the XML.
|
static ContentStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ContentStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ContentStatus OK
public static final ContentStatus CREATED
public static final ContentStatus ACCEPTED
public static final ContentStatus NO_CONTENT
Berlioz will not send any content with the request.
public static final ContentStatus RESET_CONTENT
Berlioz will not send any content with the request.
public static final ContentStatus MOVED_PERMANENTLY
public static final ContentStatus FOUND
Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests.
public static final ContentStatus SEE_OTHER
public static final ContentStatus TEMPORARY_REDIRECT
public static final ContentStatus BAD_REQUEST
The client SHOULD NOT repeat the request without modifications.
public static final ContentStatus FORBIDDEN
public static final ContentStatus NOT_FOUND
public static final ContentStatus CONFLICT
public static final ContentStatus GONE
public static final ContentStatus INTERNAL_SERVER_ERROR
public static final ContentStatus NOT_IMPLEMENTED
public static final ContentStatus BAD_GATEWAY
public static final ContentStatus SERVICE_UNAVAILABLE
public static final ContentStatus GATEWAY_TIMEOUT
public static ContentStatus[] values()
for (ContentStatus c : ContentStatus.values()) System.out.println(c);
public static ContentStatus 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 int code()
public static ContentStatus forCode(int code)
code
- The HTTP code.null
.public static boolean isRedirect(ContentStatus status)
status
- The content statustrue
if the content status greater than or equal to 300 and less than 400;
false
otherwise.public String toString()
The string representation is always XML safe (does not need to be escaped) and corresponds to the name of the enum value as lower case and using '-' instead of '_' between words.
toString
in class Enum<ContentStatus>
Copyright © 2016 Allette Systems. All rights reserved.