Package org.elasticsearch.rest
Class RestHandler.Route.RouteBuilder
java.lang.Object
org.elasticsearch.rest.RestHandler.Route.RouteBuilder
- Enclosing class:
- RestHandler.Route
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
deprecated
(String deprecationMessage, org.apache.logging.log4j.Level deprecationLevel, RestApiVersion deprecatedInVersion) Marks that the route being built has been deprecated (for some reason -- the deprecationMessage), and notes the major version in which that deprecation occurred.deprecated
(String deprecationMessage, RestApiVersion deprecatedInVersion) Marks that the route being built has been deprecated (for some reason -- the deprecationMessage), and notes the major version in which that deprecation occurred.replaces
(RestRequest.Method method, String path, RestApiVersion replacedInVersion) Marks that the route being built replaces another route, and notes the major version in which that replacement occurred.
-
Method Details
-
deprecated
public RestHandler.Route.RouteBuilder deprecated(String deprecationMessage, RestApiVersion deprecatedInVersion) Marks that the route being built has been deprecated (for some reason -- the deprecationMessage), and notes the major version in which that deprecation occurred.For example:
Route.builder(GET, "_upgrade") .deprecated("The _upgrade API is no longer useful and will be removed.", RestApiVersion.V_7) .build()
- Parameters:
deprecationMessage
- the user-visible explanation of this deprecationdeprecatedInVersion
- the major version in which the deprecation occurred- Returns:
- a reference to this object.
-
deprecated
public RestHandler.Route.RouteBuilder deprecated(String deprecationMessage, org.apache.logging.log4j.Level deprecationLevel, RestApiVersion deprecatedInVersion) Marks that the route being built has been deprecated (for some reason -- the deprecationMessage), and notes the major version in which that deprecation occurred.For example:
Route.builder(GET, "_upgrade") .deprecated("The _upgrade API is no longer useful and will be removed.", RestApiVersion.V_7) .build()
- Parameters:
deprecationMessage
- the user-visible explanation of this deprecationdeprecationLevel
- the level at which to log the deprecationdeprecatedInVersion
- the major version in which the deprecation occurred- Returns:
- a reference to this object.
-
replaces
public RestHandler.Route.RouteBuilder replaces(RestRequest.Method method, String path, RestApiVersion replacedInVersion) Marks that the route being built replaces another route, and notes the major version in which that replacement occurred.For example:
Route.builder(GET, "/_security/user/") .replaces(GET, "/_xpack/security/user/", RestApiVersion.V_7).build()
- Parameters:
method
- the method being replacedpath
- the path being replacedreplacedInVersion
- the major version in which the replacement occurred- Returns:
- a reference to this object.
-
build
-