Class RouteDescription
@RestOp-annotated method) in a route-index listing.
Companion of ResourceDescription (which describes a child resource); a RouteDescription
describes an operation mounted on a resource. Returned (as a RouteDescriptions list) by the
route-index op so the response is content-negotiated through the configured serializers — an
Accept: text/html request renders a browsable table with the path as a
clickable link (via @Html(link)), while application/json / text/xml
clients receive the same entries in their requested format.
The five serialized properties — path, methods, summary, description,
and deprecated — preserve the JSON shape emitted by earlier route-index snapshots so existing
API clients see an equivalent payload.
See Also:
- Since:
- 10.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeprecated(boolean value) Sets whether the operation is deprecated.description(String value) Sets the operation description.Returns the operation description.Returns the HTTP methods the operation responds to.getPath()Returns the mount path of the operation.Returns the operation summary.booleanReturns whether the operation is deprecated.Sets the HTTP methods the operation responds to.Sets the mount path of the operation.Sets the operation summary.
-
Constructor Details
-
RouteDescription
public RouteDescription()No-arg bean constructor. -
RouteDescription
public RouteDescription(String path, List<String> methods, String summary, String description, boolean deprecated) Constructor.- Parameters:
path- The mount path of the operation (e.g."/items/{id}").methods- The HTTP methods the operation responds to (e.g.["GET"]).summary- The operation summary, or an empty string when none is declared.description- The operation description, or an empty string when none is declared.deprecated- Whether the operation (or its declaring class) is@Deprecated.
-
-
Method Details
-
getPath
Returns the mount path of the operation.Rendered as a clickable link in HTML output via
@Html(link).- Returns:
- The mount path.
-
path
Sets the mount path of the operation.- Parameters:
value- The new value.- Returns:
- This object.
-
getMethods
Returns the HTTP methods the operation responds to.- Returns:
- The HTTP methods.
-
methods
Sets the HTTP methods the operation responds to.- Parameters:
value- The new value.- Returns:
- This object.
-
getSummary
Returns the operation summary.- Returns:
- The summary, or an empty string when none is declared.
-
summary
Sets the operation summary.- Parameters:
value- The new value.- Returns:
- This object.
-
getDescription
Returns the operation description.- Returns:
- The description, or an empty string when none is declared.
-
description
Sets the operation description.- Parameters:
value- The new value.- Returns:
- This object.
-
isDeprecated
Returns whether the operation is deprecated.- Returns:
true if the operation (or its declaring class) is@Deprecated.
-
deprecated
Sets whether the operation is deprecated.- Parameters:
value- The new value.- Returns:
- This object.
-