Package org.elasticsearch.rest
Class RestHandler.Route.RouteBuilder
org.elasticsearch.rest.RestHandler.Route.RouteBuilder
- Enclosing class:
- RestHandler.Route
public static class RestHandler.Route.RouteBuilder
extends
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
deprecationMessage, org.elasticsearch.core.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, path, org.elasticsearch.core.RestApiVersion replacedInVersion)
Marks that the route being built replaces another route, and notes the major version in which that replacement occurred.Methods inherited from class java.lang.
, , , , , , , , , ,
-
Method Details
-
deprecated
public deprecationMessage, org.elasticsearch.core.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.
-
replaces
public RestHandler.Route.RouteBuilder replaces(RestRequest.Method method, path, org.elasticsearch.core.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
-