Removed most of deprecations; fixes gh-1570

This commit is contained in:
Marcin Grzejszczak
2020-11-26 12:58:36 +01:00
parent 1deb643be5
commit d8f6e17af5
49 changed files with 32 additions and 2906 deletions

View File

@@ -52,15 +52,6 @@ public class BodyMatchers {
this.matchers.add(new PathBodyMatcher(xPath, matchingTypeValue));
}
/**
* @deprecated use{@link #matchers()}
* @return json path matchers
*/
@Deprecated
public List<BodyMatcher> jsonPathMatchers() {
return matchers();
}
public boolean hasMatchers() {
return !this.matchers.isEmpty();
}

View File

@@ -433,653 +433,4 @@ public final class HttpHeaders {
*/
public static final String WWW_AUTHENTICATE = "WWW-Authenticate";
/**
* @return The HTTP {@code Accept} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.3.2">Section 5.3.2 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.ACCEPT}.
*/
@Deprecated
public String accept() {
return ACCEPT;
}
/**
* @return The HTTP {@code Accept-Charset} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.3.3">Section 5.3.3 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.ACCEPT_CHARSET}.
*/
@Deprecated
public String acceptCharset() {
return ACCEPT_CHARSET;
}
/**
* @return The HTTP {@code Accept-Encoding} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.3.4">Section 5.3.4 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.ACCEPT_ENCODING}.
*/
@Deprecated
public String acceptEncoding() {
return ACCEPT_ENCODING;
}
/**
* @return The HTTP {@code Accept-Language} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.3.5">Section 5.3.5 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.ACCEPT_LANGUAGE}.
*/
@Deprecated
public String acceptLanguage() {
return ACCEPT_LANGUAGE;
}
/**
* @return The HTTP {@code Accept-Ranges} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7233#section-2.3">Section 5.3.5 of RFC
* 7233</a>
* @deprecated Replaced by {@code HttpHeaders.ACCEPT_RANGES}.
*/
@Deprecated
public String acceptRanges() {
return ACCEPT_RANGES;
}
/**
* @return The CORS {@code Access-Control-Allow-Credentials} response header field
* name.
* @see <a href="https://www.w3.org/TR/cors/">CORS W3C recommendation</a>
* @deprecated Replaced by {@code HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS}.
*/
@Deprecated
public String accessControlAllowCredentials() {
return ACCESS_CONTROL_ALLOW_CREDENTIALS;
}
/**
* @return The CORS {@code Access-Control-Allow-Headers} response header field name.
* @see <a href="https://www.w3.org/TR/cors/">CORS W3C recommendation</a>
* @deprecated Replaced by {@code HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS}.
*/
@Deprecated
public String accessControlAllowHeaders() {
return ACCESS_CONTROL_ALLOW_HEADERS;
}
/**
* @return The CORS {@code Access-Control-Allow-Methods} response header field name.
* @see <a href="https://www.w3.org/TR/cors/">CORS W3C recommendation</a>
* @deprecated Replaced by {@code HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS}.
*/
@Deprecated
public String accessControlAllowMethods() {
return ACCESS_CONTROL_ALLOW_METHODS;
}
/**
* @return The CORS {@code Access-Control-Allow-Origin} response header field name.
* @see <a href="https://www.w3.org/TR/cors/">CORS W3C recommendation</a>
* @deprecated Replaced by {@code HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN}.
*/
@Deprecated
public String accessControlAllowOrigin() {
return ACCESS_CONTROL_ALLOW_ORIGIN;
}
/**
* @return The CORS {@code Access-Control-Expose-Headers} response header field name.
* @see <a href="https://www.w3.org/TR/cors/">CORS W3C recommendation</a>
* @deprecated Replaced by {@code HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS}.
*/
@Deprecated
public String accessControlExposeHeaders() {
return ACCESS_CONTROL_EXPOSE_HEADERS;
}
/**
* @return The CORS {@code Access-Control-Max-Age} response header field name.
* @see <a href="https://www.w3.org/TR/cors/">CORS W3C recommendation</a>
* @deprecated Replaced by {@code HttpHeaders.ACCESS_CONTROL_MAX_AGE}.
*/
@Deprecated
public String accessControlMaxAge() {
return ACCESS_CONTROL_MAX_AGE;
}
/**
* @return The CORS {@code Access-Control-Request-Headers} request header field name.
* @see <a href="https://www.w3.org/TR/cors/">CORS W3C recommendation</a>
* @deprecated Replaced by {@code HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS}.
*/
@Deprecated
public String accessControlRequestHeaders() {
return ACCESS_CONTROL_REQUEST_HEADERS;
}
/**
* @return The CORS {@code Access-Control-Request-Method} request header field name.
* @see <a href="https://www.w3.org/TR/cors/">CORS W3C recommendation</a>
* @deprecated Replaced by {@code HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD}.
*/
@Deprecated
public String accessControlRequestMethod() {
return ACCESS_CONTROL_REQUEST_METHOD;
}
/**
* @return The HTTP {@code Age} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.1">Section 5.1 of RFC
* 7234</a>
* @deprecated Replaced by {@code HttpHeaders.AGE}.
*/
@Deprecated
public String age() {
return AGE;
}
/**
* @return The HTTP {@code Allow} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-7.4.1">Section 7.4.1 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.ALLOW}.
*/
@Deprecated
public String allow() {
return ALLOW;
}
/**
* @return The HTTP {@code Authorization} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7235#section-4.2">Section 4.2 of RFC
* 7235</a>
* @deprecated Replaced by {@code HttpHeaders.AUTHORIZATION}.
*/
@Deprecated
public String authorization() {
return AUTHORIZATION;
}
/**
* @return The HTTP {@code Cache-Control} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2">Section 5.2 of RFC
* 7234</a>
* @deprecated Replaced by {@code HttpHeaders.CACHE_CONTROL}.
*/
@Deprecated
public String cacheControl() {
return CACHE_CONTROL;
}
/**
* @return The HTTP {@code Connection} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7230#section-6.1">Section 6.1 of RFC
* 7230</a>
* @deprecated Replaced by {@code HttpHeaders.CONNECTION}.
*/
@Deprecated
public String connection() {
return CONNECTION;
}
/**
* @return The HTTP {@code Content-Encoding} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-3.1.2.2">Section 3.1.2.2
* of RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.CONTENT_ENCODING}.
*/
@Deprecated
public String contentEncoding() {
return CONTENT_ENCODING;
}
/**
* @return The HTTP {@code Content-Disposition} header field name
* @see <a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>
* @deprecated Replaced by {@code HttpHeaders.CONTENT_DISPOSITION}.
*/
@Deprecated
public String contentDisposition() {
return CONTENT_DISPOSITION;
}
/**
* @return The HTTP {@code Content-Language} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-3.1.3.2">Section 3.1.3.2
* of RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.CONTENT_LANGUAGE}.
*/
@Deprecated
public String contentLanguage() {
return CONTENT_LANGUAGE;
}
/**
* @return The HTTP {@code Content-Length} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7230#section-3.3.2">Section 3.3.2 of
* RFC 7230</a>
* @deprecated Replaced by {@code HttpHeaders.CONTENT_LENGTH}.
*/
@Deprecated
public String contentLength() {
return CONTENT_LENGTH;
}
/**
* @return The HTTP {@code Content-Location} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-3.1.4.2">Section 3.1.4.2
* of RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.CONTENT_LOCATION}.
*/
@Deprecated
public String contentLocation() {
return CONTENT_LOCATION;
}
/**
* @return The HTTP {@code Content-Range} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7233#section-4.2">Section 4.2 of RFC
* 7233</a>
* @deprecated Replaced by {@code HttpHeaders.CONTENT_RANGE}.
*/
@Deprecated
public String contentRange() {
return CONTENT_RANGE;
}
/**
* @return The HTTP {@code Content-Type} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-3.1.1.5">Section 3.1.1.5
* of RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.CONTENT_TYPE}.
*/
@Deprecated
public String contentType() {
return CONTENT_TYPE;
}
/**
* @return The HTTP {@code Cookie} header field name.
* @see <a href="https://tools.ietf.org/html/rfc2109#section-4.3.4">Section 4.3.4 of
* RFC 2109</a>
* @deprecated Replaced by {@code HttpHeaders.COOKIE}.
*/
@Deprecated
public String cookie() {
return COOKIE;
}
/**
* @return The HTTP {@code Date} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-7.1.1.2">Section 7.1.1.2
* of RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.DATE}.
*/
@Deprecated
public String date() {
return DATE;
}
/**
* @return The HTTP {@code ETag} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7232#section-2.3">Section 2.3 of RFC
* 7232</a>
* @deprecated Replaced by {@code HttpHeaders.ETAG}.
*/
@Deprecated
public String etag() {
return ETAG;
}
/**
* @return The HTTP {@code Expect} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.1.1">Section 5.1.1 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.EXPECT}.
*/
@Deprecated
public String expect() {
return EXPECT;
}
/**
* @return The HTTP {@code Expires} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.3">Section 5.3 of RFC
* 7234</a>
* @deprecated Replaced by {@code HttpHeaders.EXPIRES}.
*/
@Deprecated
public String expires() {
return EXPIRES;
}
/**
* @return The HTTP {@code From} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.5.1">Section 5.5.1 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.FROM}.
*/
@Deprecated
public String from() {
return FROM;
}
/**
* @return The HTTP {@code Host} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7230#section-5.4">Section 5.4 of RFC
* 7230</a>
* @deprecated Replaced by {@code HttpHeaders.HOST}.
*/
@Deprecated
public String host() {
return HOST;
}
/**
* @return The HTTP {@code If-Match} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7232#section-3.1">Section 3.1 of RFC
* 7232</a>
* @deprecated Replaced by {@code HttpHeaders.IF_MATCH}.
*/
@Deprecated
public String ifMatch() {
return IF_MATCH;
}
/**
* @return The HTTP {@code If-Modified-Since} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7232#section-3.3">Section 3.3 of RFC
* 7232</a>
* @deprecated Replaced by {@code HttpHeaders.IF_MODIFIED_SINCE}.
*/
@Deprecated
public String ifModifiedSince() {
return IF_MODIFIED_SINCE;
}
/**
* @return The HTTP {@code If-None-Match} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7232#section-3.2">Section 3.2 of RFC
* 7232</a>
* @deprecated Replaced by {@code HttpHeaders.IF_NONE_MATCH}.
*/
@Deprecated
public String ifNoneMatch() {
return IF_NONE_MATCH;
}
/**
* @return The HTTP {@code If-Range} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7233#section-3.2">Section 3.2 of RFC
* 7233</a>
* @deprecated Replaced by {@code HttpHeaders.IF_RANGE}.
*/
@Deprecated
public String ifRange() {
return IF_RANGE;
}
/**
* @return The HTTP {@code If-Unmodified-Since} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7232#section-3.4">Section 3.4 of RFC
* 7232</a>
* @deprecated Replaced by {@code HttpHeaders.IF_UNMODIFIED_SINCE}.
*/
@Deprecated
public String ifUnmodifiedSince() {
return IF_UNMODIFIED_SINCE;
}
/**
* @return The HTTP {@code Last-Modified} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7232#section-2.2">Section 2.2 of RFC
* 7232</a>
* @deprecated Replaced by {@code HttpHeaders.LAST_MODIFIED}.
*/
@Deprecated
public String lastModified() {
return LAST_MODIFIED;
}
/**
* @return The HTTP {@code Link} header field name.
* @see <a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>
* @deprecated Replaced by {@code HttpHeaders.LINK}.
*/
@Deprecated
public String link() {
return LINK;
}
/**
* @return The HTTP {@code Location} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-7.1.2">Section 7.1.2 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.LOCATION}.
*/
@Deprecated
public String location() {
return LOCATION;
}
/**
* @return The HTTP {@code Max-Forwards} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.1.2">Section 5.1.2 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.MAX_FORWARDS}.
*/
@Deprecated
public String max_forwards() {
return MAX_FORWARDS;
}
/**
* @return The HTTP {@code Origin} header field name.
* @see <a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>
* @deprecated Replaced by {@code HttpHeaders.ORIGIN}.
*/
@Deprecated
public String origin() {
return ORIGIN;
}
/**
* @return The HTTP {@code Pragma} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.4">Section 5.4 of RFC
* 7234</a>
* @deprecated Replaced by {@code HttpHeaders.PRAGMA}.
*/
@Deprecated
public String pragma() {
return PRAGMA;
}
/**
* @return The HTTP {@code Proxy-Authenticate} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7235#section-4.3">Section 4.3 of RFC
* 7235</a>
* @deprecated Replaced by {@code HttpHeaders.PROXY_AUTHENTICATE}.
*/
@Deprecated
public String proxyAuthenticate() {
return PROXY_AUTHENTICATE;
}
/**
* @return The HTTP {@code Proxy-Authorization} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7235#section-4.4">Section 4.4 of RFC
* 7235</a>
* @deprecated Replaced by {@code HttpHeaders.PROXY_AUTHORIZATION}.
*/
@Deprecated
public String proxyAuthorization() {
return PROXY_AUTHORIZATION;
}
/**
* @return The HTTP {@code Range} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7233#section-3.1">Section 3.1 of RFC
* 7233</a>
* @deprecated Replaced by {@code HttpHeaders.RANGE}.
*/
@Deprecated
public String range() {
return RANGE;
}
/**
* @return The HTTP {@code Referer} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.5.2">Section 5.5.2 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.REFERER}.
*/
@Deprecated
public String referer() {
return REFERER;
}
/**
* @return The HTTP {@code Retry-After} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-7.1.3">Section 7.1.3 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.RETRY_AFTER}.
*/
@Deprecated
public String retryAfter() {
return RETRY_AFTER;
}
/**
* @return The HTTP {@code Server} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-7.4.2">Section 7.4.2 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.server}.
*/
@Deprecated
public String server() {
return SERVER;
}
/**
* @return The HTTP {@code Set-Cookie} header field name.
* @see <a href="https://tools.ietf.org/html/rfc2109#section-4.2.2">Section 4.2.2 of
* RFC 2109</a>
* @deprecated Replaced by {@code HttpHeaders.SET_COOKIE}.
*/
@Deprecated
public String setCookie() {
return SET_COOKIE;
}
/**
* @return The HTTP {@code Set-Cookie2} header field name.
* @see <a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>
* @deprecated Replaced by {@code HttpHeaders.SET_COOKIE_2}.
*/
@Deprecated
public String setCookie2() {
return SET_COOKIE_2;
}
/**
* @return The HTTP {@code TE} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7230#section-4.3">Section 4.3 of RFC
* 7230</a>
* @deprecated Replaced by {@code HttpHeaders.TE}.
*/
@Deprecated
public String te() {
return TE;
}
/**
* @return The HTTP {@code Trailer} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7230#section-4.4">Section 4.4 of RFC
* 7230</a>
* @deprecated Replaced by {@code HttpHeaders.TRAILER}.
*/
@Deprecated
public String trailer() {
return TRAILER;
}
/**
* @return The HTTP {@code Transfer-Encoding} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7230#section-3.3.1">Section 3.3.1 of
* RFC 7230</a>
* @deprecated Replaced by {@code HttpHeaders.TRANSFER_ENCODING}.
*/
@Deprecated
public String transferEncoding() {
return TRANSFER_ENCODING;
}
/**
* @return The HTTP {@code Upgrade} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7230#section-6.7">Section 6.7 of RFC
* 7230</a>
* @deprecated Replaced by {@code HttpHeaders.UPGRADE}.
*/
@Deprecated
public String upgrade() {
return UPGRADE;
}
/**
* @return The HTTP {@code User-Agent} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.5.3">Section 5.5.3 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.USER_AGENT}.
*/
@Deprecated
public String user_agent() {
return USER_AGENT;
}
/**
* @return The HTTP {@code Vary} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-7.1.4">Section 7.1.4 of
* RFC 7231</a>
* @deprecated Replaced by {@code HttpHeaders.VARY}.
*/
@Deprecated
public String vary() {
return VARY;
}
/**
* @return The HTTP {@code Via} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7230#section-5.7.1">Section 5.7.1 of
* RFC 7230</a>
* @deprecated Replaced by {@code HttpHeaders.VIA}.
*/
@Deprecated
public String via() {
return VIA;
}
/**
* @return The HTTP {@code Warning} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.5">Section 5.5 of RFC
* 7234</a>
* @deprecated Replaced by {@code HttpHeaders.WARNING}.
*/
@Deprecated
public String warning() {
return WARNING;
}
/**
* @return The HTTP {@code WWW-Authenticate} header field name.
* @see <a href="https://tools.ietf.org/html/rfc7235#section-4.1">Section 4.1 of RFC
* 7235</a>
* @deprecated Replaced by {@code HttpHeaders.WWW_AUTHENTICATE}.
*/
@Deprecated
public String wwwAuthenticate() {
return WWW_AUTHENTICATE;
}
}

View File

@@ -74,78 +74,6 @@ public final class HttpMethods {
*/
public static String TRACE = "TRACE";
/**
* @return {@code GET}.
* @deprecated Replaced by {@code HttpMethods.GET}.
*/
@Deprecated
public HttpMethod GET() {
return HttpMethod.GET;
}
/**
* @return {@code HEAD}.
* @deprecated Replaced by {@code HttpMethods.HEAD}.
*/
@Deprecated
public HttpMethod HEAD() {
return HttpMethod.HEAD;
}
/**
* @return {@code POST}.
* @deprecated Replaced by {@code HttpMethods.POST}.
*/
@Deprecated
public HttpMethod POST() {
return HttpMethod.POST;
}
/**
* @return {@code PUT}.
* @deprecated Replaced by {@code HttpMethods.PUT}.
*/
@Deprecated
public HttpMethod PUT() {
return HttpMethod.PUT;
}
/**
* @return {@code PATCH}.
* @deprecated Replaced by {@code HttpMethods.PATCH}.
*/
@Deprecated
public HttpMethod PATCH() {
return HttpMethod.PATCH;
}
/**
* @return {@code DELETE}.
* @deprecated Replaced by {@code HttpMethods.DELETE}.
*/
@Deprecated
public HttpMethod DELETE() {
return HttpMethod.DELETE;
}
/**
* @return {@code OPTIONS}.
* @deprecated Replaced by {@code HttpMethods.OPTIONS}.
*/
@Deprecated
public HttpMethod OPTIONS() {
return HttpMethod.OPTIONS;
}
/**
* @return {@code TRACE}.
* @deprecated Replaced by {@code HttpMethods.TRACE}.
*/
@Deprecated
public HttpMethod TRACE() {
return HttpMethod.TRACE;
}
public enum HttpMethod {
GET(HttpMethods.GET), HEAD(HttpMethods.HEAD), POST(HttpMethods.POST), PUT(HttpMethods.PUT), PATCH(

View File

@@ -151,15 +151,6 @@ public final class HttpStatus {
*/
public static final int FOUND = 302;
/**
* The HTTP {@code 302 Moved Temporarily} status code.
* @see <a href="https://tools.ietf.org/html/rfc1945#section-9.3">HTTP/1.0, section
* 9.3</a>
* @deprecated in favor of {@link #FOUND} which will be returned from
*/
@Deprecated
public static final int MOVED_TEMPORARILY = 302;
/**
* The HTTP {@code 303 See Other} status code.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.4">HTTP/1.1:
@@ -174,15 +165,6 @@ public final class HttpStatus {
*/
public static final int NOT_MODIFIED = 304;
/**
* The HTTP {@code 305 Use Proxy} status code.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.5">HTTP/1.1:
* Semantics and Content, section 6.4.5</a>
* @deprecated due to security concerns regarding in-band configuration of a proxy
*/
@Deprecated
public static final int USE_PROXY = 305;
/**
* The HTTP {@code 307 Temporary Redirect} status code.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.7">HTTP/1.1:
@@ -294,15 +276,6 @@ public final class HttpStatus {
*/
public static final int PAYLOAD_TOO_LARGE = 413;
/**
* The HTTP {@code 413 Request Entity Too Large} status code.
* @see <a href="https://tools.ietf.org/html/rfc2616#section-10.4.14">HTTP/1.1,
* section 10.4.14</a>
* @deprecated in favor of {@link #PAYLOAD_TOO_LARGE} which will be returned from
*/
@Deprecated
public static final int REQUEST_ENTITY_TOO_LARGE = 413;
/**
* The HTTP {@code 414 URI Too Long} status code.
* @since 4.1* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.12" >
@@ -310,15 +283,6 @@ public final class HttpStatus {
*/
public static final int URI_TOO_LONG = 414;
/**
* The HTTP {@code 414 Request-URI Too Long} status code.
* @see <a href="https://tools.ietf.org/html/rfc2616#section-10.4.15">HTTP/1.1,
* section 10.4.15</a>
* @deprecated in favor of {@link #URI_TOO_LONG} which will be returned from
*/
@Deprecated
public static final int REQUEST_URI_TOO_LONG = 414;
/**
* The HTTP {@code 415 Unsupported Media Type} status code.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.13">HTTP/1.1:
@@ -346,33 +310,6 @@ public final class HttpStatus {
*/
public static final int I_AM_A_TEAPOT = 418;
/**
* The HTTP {@code 419 Insufficient Space} status code.
* @deprecated See <a href=
* "https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">WebDAV
* Draft Changes</a>
*/
@Deprecated
public static final int INSUFFICIENT_SPACE_ON_RESOURCE = 419;
/**
* The HTTP {@code 420 Method Failure} status code.
* @deprecated See <a href=
* "https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">WebDAV
* Draft Changes</a>
*/
@Deprecated
public static final int METHOD_FAILURE = 420;
/**
* The HTTP {@code 421 Destination Locked} status code.
* @deprecated See <a href=
* "https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">WebDAV
* Draft Changes</a>
*/
@Deprecated
public static final int DESTINATION_LOCKED = 421;
/**
* The HTTP {@code 422 Unprocessable Entity} status code.
* @see <a href="https://tools.ietf.org/html/rfc4918#section-11.2">WebDAV</a>
@@ -508,732 +445,4 @@ public final class HttpStatus {
*/
public static final int NETWORK_AUTHENTICATION_REQUIRED = 511;
/**
* @return {@code 100 Continue}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.2.1">HTTP/1.1:
* Semantics and Content, section 6.2.1</a>
* @deprecated Replaced by {@code HttpStatus.CONTINUE}.
*/
@Deprecated
public int CONTINUE() {
return HttpStatus.CONTINUE;
}
/**
* @return {@code 101 Switching Protocols}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.2.2">HTTP/1.1:
* Semantics and Content, section 6.2.2</a>
* @deprecated Replaced by {@code HttpStatus.SWITCHING_PROTOCOLS}.
*/
@Deprecated
public int SWITCHING_PROTOCOLS() {
return HttpStatus.SWITCHING_PROTOCOLS;
}
/**
* @return {@code 102 Processing}.
* @see <a href="https://tools.ietf.org/html/rfc2518#section-10.1">WebDAV</a>
* @deprecated Replaced by {@code HttpStatus.PROCESSING}.
*/
@Deprecated
public int PROCESSING() {
return HttpStatus.PROCESSING;
}
/**
* @return {@code 103 Checkpoint}.
* @see <a href="https://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal" >
* A proposal for supporting resumable POST/PUT HTTP requests in HTTP/1.0</a>
* @deprecated Replaced by {@code HttpStatus.CHECKPOINT}.
*/
@Deprecated
public int CHECKPOINT() {
return HttpStatus.CHECKPOINT;
}
/**
* @return {@code 200 OK}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">HTTP/1.1:
* Semantics and Content, section 6.3.1</a>
* @deprecated Replaced by {@code HttpStatus.OK}.
*/
@Deprecated
public int OK() {
return HttpStatus.OK;
}
/**
* @return {@code 201 Created}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.2">HTTP/1.1:
* Semantics and Content, section 6.3.2</a>
* @deprecated Replaced by {@code HttpStatus.CREATED}.
*/
@Deprecated
public int CREATED() {
return HttpStatus.CREATED;
}
/**
* @return {@code 202 Accepted}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.3">HTTP/1.1:
* Semantics and Content, section 6.3.3</a>
* @deprecated Replaced by {@code HttpStatus.ACCEPTED}.
*/
@Deprecated
public int ACCEPTED() {
return HttpStatus.ACCEPTED;
}
/**
* @return {@code 203 Non-Authoritative Information}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.4">HTTP/1.1:
* Semantics and Content, section 6.3.4</a>
* @deprecated Replaced by {@code HttpStatus.NON_AUTHORITATIVE_INFORMATION}.
*/
@Deprecated
public int NON_AUTHORITATIVE_INFORMATION() {
return HttpStatus.NON_AUTHORITATIVE_INFORMATION;
}
/**
* @return {@code 204 No Content}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.5">HTTP/1.1:
* Semantics and Content, section 6.3.5</a>
* @deprecated Replaced by {@code HttpStatus.NO_CONTENT}.
*/
@Deprecated
public int NO_CONTENT() {
return HttpStatus.NO_CONTENT;
}
/**
* @return {@code 205 Reset Content}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.6">HTTP/1.1:
* Semantics and Content, section 6.3.6</a>
* @deprecated Replaced by {@code HttpStatus.RESET_CONTENT}.
*/
@Deprecated
public int RESET_CONTENT() {
return HttpStatus.RESET_CONTENT;
}
/**
* @return {@code 206 Partial Content}.
* @see <a href="https://tools.ietf.org/html/rfc7233#section-4.1">HTTP/1.1: Range
* Requests, section 4.1</a>
* @deprecated Replaced by {@code HttpStatus.PARTIAL_CONTENT}.
*/
@Deprecated
public int PARTIAL_CONTENT() {
return HttpStatus.PARTIAL_CONTENT;
}
/**
* @return {@code 207 Multi-Status}.
* @see <a href="https://tools.ietf.org/html/rfc4918#section-13">WebDAV</a>
* @deprecated Replaced by {@code HttpStatus.MULTI_STATUS}.
*/
@Deprecated
public int MULTI_STATUS() {
return HttpStatus.MULTI_STATUS;
}
/**
* @return {@code 208 Already Reported}.
* @see <a href="https://tools.ietf.org/html/rfc5842#section-7.1">WebDAV Binding
* Extensions</a>
* @deprecated Replaced by {@code HttpStatus.ALREADY_REPORTED}.
*/
@Deprecated
public int ALREADY_REPORTED() {
return HttpStatus.ALREADY_REPORTED;
}
/**
* @return {@code 226 IM Used}.
* @see <a href="https://tools.ietf.org/html/rfc3229#section-10.4.1">Delta encoding in
* HTTP</a>
* @deprecated Replaced by {@code HttpStatus.IM_USED}.
*/
@Deprecated
public int IM_USED() {
return HttpStatus.IM_USED;
}
/**
* @return {@code 300 Multiple Choices}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.1">HTTP/1.1:
* Semantics and Content, section 6.4.1</a>
* @deprecated Replaced by {@code HttpStatus.MULTIPLE_CHOICES}.
*/
@Deprecated
public int MULTIPLE_CHOICES() {
return HttpStatus.MULTIPLE_CHOICES;
}
/**
* @return {@code 301 Moved Permanently}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.2">HTTP/1.1:
* Semantics and Content, section 6.4.2</a>
* @deprecated Replaced by {@code HttpStatus.MOVED_PERMANENTLY}.
*/
@Deprecated
public int MOVED_PERMANENTLY() {
return HttpStatus.MOVED_PERMANENTLY;
}
/**
* @return {@code 302 Found}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.3">HTTP/1.1:
* Semantics and Content, section 6.4.3</a>
* @deprecated Replaced by {@code HttpStatus.FOUND}.
*/
@Deprecated
public int FOUND() {
return HttpStatus.FOUND;
}
/**
* @return {@code 302 Moved Temporarily}.
* @see <a href="https://tools.ietf.org/html/rfc1945#section-9.3">HTTP/1.0, section
* 9.3</a>
* @deprecated in favor of {@link #FOUND} which will be returned from
*/
@Deprecated
public int MOVED_TEMPORARILY() {
return HttpStatus.MOVED_TEMPORARILY;
}
/**
* @return {@code 303 See Other}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.4">HTTP/1.1:
* Semantics and Content, section 6.4.4</a>
* @deprecated Replaced by {@code HttpStatus.SEE_OTHER}.
*/
@Deprecated
public int SEE_OTHER() {
return HttpStatus.SEE_OTHER;
}
/**
* @return {@code 304 Not Modified}.
* @see <a href="https://tools.ietf.org/html/rfc7232#section-4.1">HTTP/1.1:
* Conditional Requests, section 4.1</a>
* @deprecated Replaced by {@code HttpStatus.NOT_MODIFIED}.
*/
@Deprecated
public int NOT_MODIFIED() {
return HttpStatus.NOT_MODIFIED;
}
/**
* @return {@code 305 Use Proxy}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.5">HTTP/1.1:
* Semantics and Content, section 6.4.5</a>
* @deprecated due to security concerns regarding in-band configuration of a proxy
*/
@Deprecated
public int USE_PROXY() {
return HttpStatus.USE_PROXY;
}
/**
* @return {@code 307 Temporary Redirect}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.7">HTTP/1.1:
* Semantics and Content, section 6.4.7</a>
* @deprecated Replaced by {@code HttpStatus.TEMPORARY_REDIRECT}.
*/
@Deprecated
public int TEMPORARY_REDIRECT() {
return HttpStatus.TEMPORARY_REDIRECT;
}
/**
* @return {@code 308 Permanent Redirect}.
* @see <a href="https://tools.ietf.org/html/rfc7238">RFC 7238</a>
* @deprecated Replaced by {@code HttpStatus.PERMANENT_REDIRECT}.
*/
@Deprecated
public int PERMANENT_REDIRECT() {
return HttpStatus.PERMANENT_REDIRECT;
}
/**
* @return {@code 400 Bad Request}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.1">HTTP/1.1:
* Semantics and Content, section 6.5.1</a>
* @deprecated Replaced by {@code HttpStatus.BAD_REQUEST}.
*/
@Deprecated
public int BAD_REQUEST() {
return HttpStatus.BAD_REQUEST;
}
/**
* @return {@code 401 Unauthorized}.
* @see <a href="https://tools.ietf.org/html/rfc7235#section-3.1">HTTP/1.1:
* Authentication, section 3.1</a>
* @deprecated Replaced by {@code HttpStatus.UNAUTHORIZED}.
*/
@Deprecated
public int UNAUTHORIZED() {
return HttpStatus.UNAUTHORIZED;
}
/**
* @return {@code 402 Payment Required}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.2">HTTP/1.1:
* Semantics and Content, section 6.5.2</a>
* @deprecated Replaced by {@code HttpStatus.PAYMENT_REQUIRED}.
*/
@Deprecated
public int PAYMENT_REQUIRED() {
return HttpStatus.PAYMENT_REQUIRED;
}
/**
* @return {@code 403 Forbidden}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.3">HTTP/1.1:
* Semantics and Content, section 6.5.3</a>
* @deprecated Replaced by {@code HttpStatus.FORBIDDEN}.
*/
@Deprecated
public int FORBIDDEN() {
return HttpStatus.FORBIDDEN;
}
/**
* @return {@code 404 Not Found}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.4">HTTP/1.1:
* Semantics and Content, section 6.5.4</a>
* @deprecated Replaced by {@code HttpStatus.NOT_FOUND}.
*/
@Deprecated
public int NOT_FOUND() {
return HttpStatus.NOT_FOUND;
}
/**
* @return {@code 405 Method Not Allowed}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.5">HTTP/1.1:
* Semantics and Content, section 6.5.5</a>
* @deprecated Replaced by {@code HttpStatus.METHOD_NOT_ALLOWED}.
*/
@Deprecated
public int METHOD_NOT_ALLOWED() {
return HttpStatus.METHOD_NOT_ALLOWED;
}
/**
* @return {@code 406 Not Acceptable}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.6">HTTP/1.1:
* Semantics and Content, section 6.5.6</a>
* @deprecated Replaced by {@code HttpStatus.NOT_ACCEPTABLE}.
*/
@Deprecated
public int NOT_ACCEPTABLE() {
return HttpStatus.NOT_ACCEPTABLE;
}
/**
* @return {@code 407 Proxy Authentication Required}.
* @see <a href="https://tools.ietf.org/html/rfc7235#section-3.2">HTTP/1.1:
* Authentication, section 3.2</a>
* @deprecated Replaced by {@code HttpStatus.PROXY_AUTHENTICATION_REQUIRED}.
*/
@Deprecated
public int PROXY_AUTHENTICATION_REQUIRED() {
return HttpStatus.PROXY_AUTHENTICATION_REQUIRED;
}
/**
* @return {@code 408 Request Timeout}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.7">HTTP/1.1:
* Semantics and Content, section 6.5.7</a>
* @deprecated Replaced by {@code HttpStatus.REQUEST_TIMEOUT}.
*/
@Deprecated
public int REQUEST_TIMEOUT() {
return HttpStatus.REQUEST_TIMEOUT;
}
/**
* @return {@code 409 Conflict}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.8">HTTP/1.1:
* Semantics and Content, section 6.5.8</a>
* @deprecated Replaced by {@code HttpStatus.CONFLICT}.
*/
@Deprecated
public int CONFLICT() {
return HttpStatus.CONFLICT;
}
/**
* @return {@code 410 Gone}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.9">HTTP/1.1:
* Semantics and Content, section 6.5.9</a>
* @deprecated Replaced by {@code HttpStatus.GONE}.
*/
@Deprecated
public int GONE() {
return HttpStatus.GONE;
}
/**
* @return {@code 411 Length Required}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.10">HTTP/1.1:
* Semantics and Content, section 6.5.10</a>
* @deprecated Replaced by {@code HttpStatus.LENGTH_REQUIRED}.
*/
@Deprecated
public int LENGTH_REQUIRED() {
return HttpStatus.LENGTH_REQUIRED;
}
/**
* @return {@code 412 Precondition failed}.
* @see <a href="https://tools.ietf.org/html/rfc7232#section-4.2">HTTP/1.1:
* Conditional Requests, section 4.2</a>
* @deprecated Replaced by {@code HttpStatus.PRECONDITION_FAILED}.
*/
@Deprecated
public int PRECONDITION_FAILED() {
return HttpStatus.PRECONDITION_FAILED;
}
/**
* @return {@code 413 Payload Too Large}.
* @since 4.1* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.11" >
* HTTP/1.1: Semantics and Content, section 6.5.11</a>
* @deprecated Replaced by {@code HttpStatus.PAYLOAD_TOO_LARGE}.
*/
@Deprecated
public int PAYLOAD_TOO_LARGE() {
return HttpStatus.PAYLOAD_TOO_LARGE;
}
/**
* @return {@code 413 Request Entity Too Large}.
* @see <a href="https://tools.ietf.org/html/rfc2616#section-10.4.14">HTTP/1.1,
* section 10.4.14</a>
* @deprecated in favor of {@link #PAYLOAD_TOO_LARGE} which will be returned from
*/
@Deprecated
public int REQUEST_ENTITY_TOO_LARGE() {
return HttpStatus.REQUEST_ENTITY_TOO_LARGE;
}
/**
* @return {@code 414 URI Too Long}.
* @since 4.1* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.12" >
* HTTP/1.1: Semantics and Content, section 6.5.12</a>
* @deprecated Replaced by {@code HttpStatus.URI_TOO_LONG}.
*/
@Deprecated
public int URI_TOO_LONG() {
return HttpStatus.URI_TOO_LONG;
}
/**
* @return {@code 414 Request-URI Too Long}.
* @see <a href="https://tools.ietf.org/html/rfc2616#section-10.4.15">HTTP/1.1,
* section 10.4.15</a>
* @deprecated in favor of {@link #URI_TOO_LONG} which will be returned from
*/
@Deprecated
public int REQUEST_URI_TOO_LONG() {
return HttpStatus.REQUEST_URI_TOO_LONG;
}
/**
* @return {@code 415 Unsupported Media Type}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.13">HTTP/1.1:
* Semantics and Content, section 6.5.13</a>
* @deprecated Replaced by {@code HttpStatus.UNSUPPORTED_MEDIA_TYPE}.
*/
@Deprecated
public int UNSUPPORTED_MEDIA_TYPE() {
return HttpStatus.UNSUPPORTED_MEDIA_TYPE;
}
/**
* @return {@code 416 Requested Range Not Satisfiable}.
* @see <a href="https://tools.ietf.org/html/rfc7233#section-4.4">HTTP/1.1: Range
* Requests, section 4.4</a>
* @deprecated Replaced by {@code HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE}.
*/
@Deprecated
public int REQUESTED_RANGE_NOT_SATISFIABLE() {
return HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE;
}
/**
* @return {@code 417 Expectation Failed}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.14">HTTP/1.1:
* Semantics and Content, section 6.5.14</a>
* @deprecated Replaced by {@code HttpStatus.EXPECTATION_FAILED}.
*/
@Deprecated
public int EXPECTATION_FAILED() {
return HttpStatus.EXPECTATION_FAILED;
}
/**
* @return {@code 418 I'm a teapot}.
* @see <a href="https://tools.ietf.org/html/rfc2324#section-2.3.2">HTCPCP/1.0</a>
* @deprecated Replaced by {@code HttpStatus.I_AM_A_TEAPOT}.
*/
@Deprecated
public int I_AM_A_TEAPOT() {
return HttpStatus.I_AM_A_TEAPOT;
}
/**
* @return {@code 419 Insufficient Space}.
* @deprecated See <a href=
* "https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">WebDAV
* Draft Changes</a>
*/
@Deprecated
public int INSUFFICIENT_SPACE_ON_RESOURCE() {
return HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE;
}
/**
* @return {@code 420 Method Failure}.
* @deprecated See <a href=
* "https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">WebDAV
* Draft Changes</a>
*/
@Deprecated
public int METHOD_FAILURE() {
return HttpStatus.METHOD_FAILURE;
}
/**
* @return {@code 421 Destination Locked}.
* @deprecated See <a href=
* "https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">WebDAV
* Draft Changes</a>
*/
@Deprecated
public int DESTINATION_LOCKED() {
return HttpStatus.DESTINATION_LOCKED;
}
/**
* @return {@code 422 Unprocessable Entity}.
* @see <a href="https://tools.ietf.org/html/rfc4918#section-11.2">WebDAV</a>
* @deprecated Replaced by {@code HttpStatus.UNPROCESSABLE_ENTITY}.
*/
@Deprecated
public int UNPROCESSABLE_ENTITY() {
return HttpStatus.UNPROCESSABLE_ENTITY;
}
/**
* @return {@code 423 Locked}.
* @see <a href="https://tools.ietf.org/html/rfc4918#section-11.3">WebDAV</a>
* @deprecated Replaced by {@code HttpStatus.LOCKED}.
*/
@Deprecated
public int LOCKED() {
return HttpStatus.LOCKED;
}
/**
* @return {@code 424 Failed Dependency}.
* @see <a href="https://tools.ietf.org/html/rfc4918#section-11.4">WebDAV</a>
* @deprecated Replaced by {@code HttpStatus.FAILED_DEPENDENCY}.
*/
@Deprecated
public int FAILED_DEPENDENCY() {
return HttpStatus.FAILED_DEPENDENCY;
}
/**
* @return {@code 426 Upgrade Required}.
* @see <a href="https://tools.ietf.org/html/rfc2817#section-6">Upgrading to TLS
* Within HTTP/1.1</a>
* @deprecated Replaced by {@code HttpStatus.UPGRADE_REQUIRED}.
*/
@Deprecated
public int UPGRADE_REQUIRED() {
return HttpStatus.UPGRADE_REQUIRED;
}
/**
* @return {@code 428 Precondition Required}.
* @see <a href="https://tools.ietf.org/html/rfc6585#section-3">Additional HTTP Status
* Codes</a>
* @deprecated Replaced by {@code HttpStatus.PRECONDITION_REQUIRED}.
*/
@Deprecated
public int PRECONDITION_REQUIRED() {
return HttpStatus.PRECONDITION_REQUIRED;
}
/**
* @return {@code 429 Too Many Requests}.
* @see <a href="https://tools.ietf.org/html/rfc6585#section-4">Additional HTTP Status
* Codes</a>
* @deprecated Replaced by {@code HttpStatus.TOO_MANY_REQUESTS}.
*/
@Deprecated
public int TOO_MANY_REQUESTS() {
return HttpStatus.TOO_MANY_REQUESTS;
}
/**
* @return {@code 431 Request Header Fields Too Large}.
* @see <a href="https://tools.ietf.org/html/rfc6585#section-5">Additional HTTP Status
* Codes</a>
* @deprecated Replaced by {@code HttpStatus.REQUEST_HEADER_FIELDS_TOO_LARGE}.
*/
@Deprecated
public int REQUEST_HEADER_FIELDS_TOO_LARGE() {
return HttpStatus.REQUEST_HEADER_FIELDS_TOO_LARGE;
}
/**
* @return {@code 451 Unavailable For Legal Reasons}.
* @see <a href=
* "https://tools.ietf.org/html/draft-ietf-httpbis-legally-restricted-status-04" > An
* HTTP Status Code to Report Legal Obstacles</a>
* @deprecated Replaced by {@code HttpStatus.UNAVAILABLE_FOR_LEGAL_REASONS}.
*/
@Deprecated
public int UNAVAILABLE_FOR_LEGAL_REASONS() {
return HttpStatus.UNAVAILABLE_FOR_LEGAL_REASONS;
}
/**
* @return {@code 500 Internal Server Error}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.1">HTTP/1.1:
* Semantics and Content, section 6.6.1</a>
* @deprecated Replaced by {@code HttpStatus.INTERNAL_SERVER_ERROR}.
*/
@Deprecated
public int INTERNAL_SERVER_ERROR() {
return HttpStatus.INTERNAL_SERVER_ERROR;
}
/**
* @return {@code 501 Not Implemented}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.2">HTTP/1.1:
* Semantics and Content, section 6.6.2</a>
* @deprecated Replaced by {@code HttpStatus.NOT_IMPLEMENTED}.
*/
@Deprecated
public int NOT_IMPLEMENTED() {
return HttpStatus.NOT_IMPLEMENTED;
}
/**
* @return {@code 502 Bad Gateway}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.3">HTTP/1.1:
* Semantics and Content, section 6.6.3</a>
* @deprecated Replaced by {@code HttpStatus.BAD_GATEWAY}.
*/
@Deprecated
public int BAD_GATEWAY() {
return HttpStatus.BAD_GATEWAY;
}
/**
* @return {@code 503 Service Unavailable}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.4">HTTP/1.1:
* Semantics and Content, section 6.6.4</a>
* @deprecated Replaced by {@code HttpStatus.SERVICE_UNAVAILABLE}.
*/
@Deprecated
public int SERVICE_UNAVAILABLE() {
return HttpStatus.SERVICE_UNAVAILABLE;
}
/**
* @return {@code 504 Gateway Timeout}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.5">HTTP/1.1:
* Semantics and Content, section 6.6.5</a>
* @deprecated Replaced by {@code HttpStatus.GATEWAY_TIMEOUT}.
*/
@Deprecated
public int GATEWAY_TIMEOUT() {
return HttpStatus.GATEWAY_TIMEOUT;
}
/**
* @return {@code 505 HTTP Version Not Supported}.
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.6">HTTP/1.1:
* Semantics and Content, section 6.6.6</a>
* @deprecated Replaced by {@code HttpStatus.HTTP_VERSION_NOT_SUPPORTED}.
*/
@Deprecated
public int HTTP_VERSION_NOT_SUPPORTED() {
return HttpStatus.HTTP_VERSION_NOT_SUPPORTED;
}
/**
* @return {@code 506 Variant Also Negotiates}
* @see <a href="https://tools.ietf.org/html/rfc2295#section-8.1">Transparent Content
* Negotiation</a>
* @deprecated Replaced by {@code HttpStatus.VARIANT_ALSO_NEGOTIATES}.
*/
@Deprecated
public int VARIANT_ALSO_NEGOTIATES() {
return HttpStatus.VARIANT_ALSO_NEGOTIATES;
}
/**
* @return {@code 507 Insufficient Storage}
* @see <a href="https://tools.ietf.org/html/rfc4918#section-11.5">WebDAV</a>
* @deprecated Replaced by {@code HttpStatus.INSUFFICIENT_STORAGE}.
*/
@Deprecated
public int INSUFFICIENT_STORAGE() {
return HttpStatus.INSUFFICIENT_STORAGE;
}
/**
* @return {@code 508 Loop Detected}
* @see <a href="https://tools.ietf.org/html/rfc5842#section-7.2">WebDAV Binding
* Extensions</a>
* @deprecated Replaced by {@code HttpStatus.LOOP_DETECTED}.
*/
@Deprecated
public int LOOP_DETECTED() {
return HttpStatus.LOOP_DETECTED;
}
/**
* @return {@code 509 Bandwidth Limit Exceeded}
* @deprecated Replaced by {@code HttpStatus.BANDWIDTH_LIMIT_EXCEEDED}.
*/
@Deprecated
public int BANDWIDTH_LIMIT_EXCEEDED() {
return HttpStatus.BANDWIDTH_LIMIT_EXCEEDED;
}
/**
* @return {@code 510 Not Extended}
* @see <a href="https://tools.ietf.org/html/rfc2774#section-7">HTTP Extension
* Framework</a>
* @deprecated Replaced by {@code HttpStatus.NOT_EXTENDED}.
*/
@Deprecated
public int NOT_EXTENDED() {
return HttpStatus.NOT_EXTENDED;
}
/**
* @return {@code 511 Network Authentication Required}.
* @see <a href="https://tools.ietf.org/html/rfc6585#section-6">Additional HTTP Status
* Codes</a>
* @deprecated Replaced by {@code HttpStatus.NETWORK_AUTHENTICATION_REQUIRED}.
*/
@Deprecated
public int NETWORK_AUTHENTICATION_REQUIRED() {
return HttpStatus.NETWORK_AUTHENTICATION_REQUIRED;
}
}

View File

@@ -291,18 +291,6 @@ public class Input extends Common implements RegexCreatingProperty<ClientDslProp
consumer.accept(this.messageHeaders);
}
/**
* The stub matchers part of the contract.
* @param consumer function to manipulate the body headers
* @deprecated Deprecated in favor of bodyMatchers to support other future
* bodyMatchers too
*/
@Deprecated
public void stubMatchers(Consumer<BodyMatchers> consumer) {
log.warn("stubMatchers method is deprecated. Please use bodyMatchers instead");
bodyMatchers(consumer);
}
/**
* The stub matchers part of the contract.
* @param consumer function to manipulate the message headers
@@ -324,18 +312,6 @@ public class Input extends Common implements RegexCreatingProperty<ClientDslProp
consumer.call();
}
/**
* The stub matchers part of the contract.
* @param consumer function to manipulate the body headers
* @deprecated Deprecated in favor of bodyMatchers to support other future
* bodyMatchers too
*/
@Deprecated
public void stubMatchers(@DelegatesTo(BodyMatchers.class) Closure consumer) {
log.warn("stubMatchers method is deprecated. Please use bodyMatchers instead");
bodyMatchers(consumer);
}
/**
* The stub matchers part of the contract.
* @param consumer function to manipulate the message headers

View File

@@ -26,12 +26,12 @@ import org.apache.commons.logging.LogFactory;
* @author Tim Ysewyn
* @since 1.0.2
*/
public class MediaTypes {
public final class MediaTypes {
private static final Log log = LogFactory.getLog(MediaTypes.class);
public MediaTypes() {
log.warn("WARNING: MediaTypes shouldn't be instantiated. Use its static methods instead.");
private MediaTypes() {
throw new IllegalStateException("You can't instantiate an utility class");
}
/**
@@ -119,157 +119,4 @@ public class MediaTypes {
*/
public static final String TEXT_XML = "text/xml";
/**
* @deprecated Replaced by {@code MediaTypes.ALL_VALUE}.
* @return {@code MediaTypes.ALL_VALUE}
*/
@Deprecated
public String allValue() {
return ALL_VALUE;
}
/**
* @deprecated Replaced by {@code MediaTypes.APPLICATION_ATOM_XML}.
* @return {@code MediaTypes.APPLICATION_ATOM_XML}
*/
@Deprecated
public String applicationAtomXml() {
return APPLICATION_ATOM_XML;
}
/**
* @deprecated Replaced by {@code MediaTypes.APPLICATION_FORM_URLENCODED}.
* @return {@code MediaTypes.APPLICATION_FORM_URLENCODED}
*/
@Deprecated
public String applicationFormUrlencoded() {
return APPLICATION_FORM_URLENCODED;
}
/**
* @deprecated Replaced by {@code MediaTypes.APPLICATION_JSON}.
* @return {@code MediaTypes.APPLICATION_JSON}
*/
@Deprecated
public String applicationJson() {
return APPLICATION_JSON;
}
/**
* @deprecated Replaced by {@code MediaTypes.APPLICATION_JSON_UTF8}.
* @return {@code MediaTypes.APPLICATION_JSON_UTF8}
*/
@Deprecated
public String applicationJsonUtf8() {
return APPLICATION_JSON_UTF8;
}
/**
* @deprecated Replaced by {@code MediaTypes.APPLICATION_OCTET_STREAM}.
* @return {@code MediaTypes.APPLICATION_OCTET_STREAM}
*/
@Deprecated
public String applicationOctetStream() {
return APPLICATION_OCTET_STREAM;
}
/**
* @deprecated Replaced by {@code MediaTypes.APPLICATION_PDF}.
* @return {@code MediaTypes.APPLICATION_PDF}
*/
@Deprecated
public String applicationPdf() {
return APPLICATION_PDF;
}
/**
* @deprecated Replaced by {@code MediaTypes.APPLICATION_XHTML_XML}.
* @return {@code MediaTypes.APPLICATION_XHTML_XML}
*/
@Deprecated
public String applicationXhtmlXml() {
return APPLICATION_XHTML_XML;
}
/**
* @deprecated Replaced by {@code MediaTypes.APPLICATION_XML}.
* @return {@code MediaTypes.APPLICATION_XML}
*/
@Deprecated
public String applicationXml() {
return APPLICATION_XML;
}
/**
* @deprecated Replaced by {@code MediaTypes.IMAGE_GIF}.
* @return {@code MediaTypes.IMAGE_GIF}
*/
@Deprecated
public String imageGif() {
return IMAGE_GIF;
}
/**
* @deprecated Replaced by {@code MediaTypes.IMAGE_JPEG}.
* @return {@code MediaTypes.IMAGE_JPEG}
*/
@Deprecated
public String imageJpeg() {
return IMAGE_JPEG;
}
/**
* @deprecated Replaced by {@code MediaTypes.IMAGE_PNG}.
* @return {@code MediaTypes.IMAGE_PNG}
*/
@Deprecated
public String imagePng() {
return IMAGE_PNG;
}
/**
* @deprecated Replaced by {@code MediaTypes.MULTIPART_FORM_DATA}.
* @return {@code MediaTypes.MULTIPART_FORM_DATA}
*/
@Deprecated
public String multipartFormData() {
return MULTIPART_FORM_DATA;
}
/**
* @deprecated Replaced by {@code MediaTypes.TEXT_HTML}.
* @return {@code MediaTypes.TEXT_HTML}
*/
@Deprecated
public String textHtml() {
return TEXT_HTML;
}
/**
* @deprecated Replaced by {@code MediaTypes.TEXT_MARKDOWN}.
* @return {@code MediaTypes.TEXT_MARKDOWN}
*/
@Deprecated
public String textMarkdown() {
return TEXT_MARKDOWN;
}
/**
* @deprecated Replaced by {@code MediaTypes.TEXT_PLAIN}.
* @return {@code MediaTypes.TEXT_PLAIN}
*/
@Deprecated
public String textPlain() {
return TEXT_PLAIN;
}
/**
* @deprecated Replaced by {@code MediaTypes.TEXT_XML}.
* @return {@code MediaTypes.TEXT_XML}
*/
@Deprecated
public String textXml() {
return TEXT_XML;
}
}

View File

@@ -16,9 +16,6 @@
package org.springframework.cloud.contract.spec.internal;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Contains most commonly used messaging headers.
*
@@ -26,12 +23,10 @@ import org.apache.commons.logging.LogFactory;
* @author Tim Ysewyn
* @since 1.1.2
*/
public class MessagingHeaders {
public final class MessagingHeaders {
private static final Log log = LogFactory.getLog(MessagingHeaders.class);
public MessagingHeaders() {
log.warn("WARNING: MessagingHeaders shouldn't be instantiated. Use its static methods instead.");
private MessagingHeaders() {
throw new IllegalStateException("You can't instantiate an utility class");
}
/**
@@ -39,14 +34,4 @@ public class MessagingHeaders {
*/
public static final String MESSAGING_CONTENT_TYPE = "contentType";
/**
* The Content-Type header name of a message.
* @return the Content-Type header name
* @deprecated Replaced by {@code MessagingHeaders.MESSAGING_CONTENT_TYPE}.
*/
@Deprecated
public String messagingContentType() {
return MESSAGING_CONTENT_TYPE;
}
}

View File

@@ -78,16 +78,6 @@ public class OutputMessage extends Common implements RegexCreatingProperty<Serve
this.assertThat = new ExecutionProperty(assertThat);
}
/**
* @deprecated - use the server dsl property
* @param clientDslProperty client property
* @return dsl property
*/
@Deprecated
public DslProperty value(ClientDslProperty clientDslProperty) {
return value(new ServerDslProperty(clientDslProperty.getServerValue(), clientDslProperty.getClientValue()));
}
public DslProperty value(ServerDslProperty serverDslProperty) {
Object concreteValue = serverDslProperty.getClientValue();
Object dynamicValue = serverDslProperty.getServerValue();
@@ -100,16 +90,6 @@ public class OutputMessage extends Common implements RegexCreatingProperty<Serve
return new DslProperty(concreteValue, dynamicValue);
}
/**
* @deprecated - use the server dsl property
* @param client client value
* @return dsl proprty
*/
@Deprecated
public DslProperty $(ClientDslProperty client) {
return value(client);
}
public DslProperty $(ServerDslProperty property) {
return value(property);
}
@@ -297,18 +277,6 @@ public class OutputMessage extends Common implements RegexCreatingProperty<Serve
consumer.accept(this.headers);
}
/**
* The message headers part of the contract.
* @param consumer function to manipulate the message headers
* @deprecated Deprecated in favor of bodyMatchers to support other future
* bodyMatchers too
*/
@Deprecated
public void testMatchers(Consumer<ResponseBodyMatchers> consumer) {
log.warn("testMatchers method is deprecated. Please use bodyMatchers instead");
bodyMatchers(consumer);
}
/**
* The stub matchers part of the contract.
* @param consumer function to manipulate the body matchers
@@ -328,18 +296,6 @@ public class OutputMessage extends Common implements RegexCreatingProperty<Serve
consumer.call();
}
/**
* The message headers part of the contract.
* @param consumer function to manipulate the message headers
* @deprecated Deprecated in favor of bodyMatchers to support other future
* bodyMatchers too
*/
@Deprecated
public void testMatchers(@DelegatesTo(ResponseBodyMatchers.class) Closure consumer) {
log.warn("testMatchers method is deprecated. Please use bodyMatchers instead");
bodyMatchers(consumer);
}
/**
* The stub matchers part of the contract.
* @param consumer function to manipulate the body matchers

View File

@@ -79,16 +79,6 @@ public class Request extends Common implements RegexCreatingProperty<ClientDslPr
this.method = toDslProperty(method);
}
/**
* Name of the HTTP method.
* @param httpMethod HTTP method name
* @deprecated In favor of {@code method(String method)}
*/
@Deprecated
public void method(HttpMethods.HttpMethod httpMethod) {
this.method = toDslProperty(httpMethod.getMethodName());
}
/**
* Name of the HTTP method.
* @param method HTTP method name
@@ -668,17 +658,6 @@ public class Request extends Common implements RegexCreatingProperty<ClientDslPr
consumer.accept(this.cookies);
}
/**
* @param consumer function to manipulate the body matchers
* @deprecated Deprecated in favor of bodyMatchers to support other future
* bodyMatchers too
*/
@Deprecated
public void stubMatchers(Consumer<BodyMatchers> consumer) {
log.warn("stubMatchers method is deprecated. Please use bodyMatchers instead");
bodyMatchers(consumer);
}
/**
* Allows to set matchers for the body.
* @param consumer function to manipulate the URL
@@ -755,17 +734,6 @@ public class Request extends Common implements RegexCreatingProperty<ClientDslPr
consumer.call();
}
/**
* @param consumer function to manipulate the body matchers
* @deprecated Deprecated in favor of bodyMatchers to support other future
* bodyMatchers too
*/
@Deprecated
public void stubMatchers(@DelegatesTo(BodyMatchers.class) Closure consumer) {
log.warn("stubMatchers method is deprecated. Please use bodyMatchers instead");
bodyMatchers(consumer);
}
/**
* Allows to set matchers for the body.
* @param consumer function to manipulate the URL

View File

@@ -479,11 +479,6 @@ public class Response extends Common implements RegexCreatingProperty<ServerDslP
return HttpStatus.FOUND;
}
@Deprecated
public int MOVED_TEMPORARILY() {
return HttpStatus.MOVED_TEMPORARILY;
}
public int SEE_OTHER() {
return HttpStatus.SEE_OTHER;
}
@@ -492,11 +487,6 @@ public class Response extends Common implements RegexCreatingProperty<ServerDslP
return HttpStatus.NOT_MODIFIED;
}
@Deprecated
public int USE_PROXY() {
return HttpStatus.USE_PROXY;
}
public int TEMPORARY_REDIRECT() {
return HttpStatus.TEMPORARY_REDIRECT;
}
@@ -561,20 +551,10 @@ public class Response extends Common implements RegexCreatingProperty<ServerDslP
return HttpStatus.PAYLOAD_TOO_LARGE;
}
@Deprecated
public int REQUEST_ENTITY_TOO_LARGE() {
return HttpStatus.REQUEST_ENTITY_TOO_LARGE;
}
public int URI_TOO_LONG() {
return HttpStatus.URI_TOO_LONG;
}
@Deprecated
public int REQUEST_URI_TOO_LONG() {
return HttpStatus.REQUEST_URI_TOO_LONG;
}
public int UNSUPPORTED_MEDIA_TYPE() {
return HttpStatus.UNSUPPORTED_MEDIA_TYPE;
}
@@ -591,21 +571,6 @@ public class Response extends Common implements RegexCreatingProperty<ServerDslP
return HttpStatus.I_AM_A_TEAPOT;
}
@Deprecated
public int INSUFFICIENT_SPACE_ON_RESOURCE() {
return HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE;
}
@Deprecated
public int METHOD_FAILURE() {
return HttpStatus.METHOD_FAILURE;
}
@Deprecated
public int DESTINATION_LOCKED() {
return HttpStatus.DESTINATION_LOCKED;
}
public int UNPROCESSABLE_ENTITY() {
return HttpStatus.UNPROCESSABLE_ENTITY;
}
@@ -731,17 +696,6 @@ public class Response extends Common implements RegexCreatingProperty<ServerDslP
consumer.accept(this.cookies);
}
/**
* @deprecated Deprecated in favor of bodyMatchers to support other future
* bodyMatchers too
* @param consumer function to manipulate the URL
*/
@Deprecated
public void testMatchers(Consumer<ResponseBodyMatchers> consumer) {
log.warn("testMatchers method is deprecated. Please use bodyMatchers instead");
bodyMatchers(consumer);
}
/**
* Allows to set matchers for the body.
* @param consumer function to manipulate the URL
@@ -771,17 +725,6 @@ public class Response extends Common implements RegexCreatingProperty<ServerDslP
consumer.call();
}
/**
* @deprecated Deprecated in favor of bodyMatchers to support other future
* bodyMatchers too
* @param consumer function to manipulate the URL
*/
@Deprecated
public void testMatchers(@DelegatesTo(ResponseBodyMatchers.class) Closure consumer) {
log.warn("testMatchers method is deprecated. Please use bodyMatchers instead");
bodyMatchers(consumer);
}
/**
* Allows to set matchers for the body.
* @param consumer function to manipulate the URL