HalLinkProvider
moved to HalLinkProvider
, please update the imports.@Deprecated
public class HalLinkProvider
extends java.lang.Object
implements javax.ws.rs.core.Feature
Usage:
@Path("") interface TestApi { @Path("/testPath/{testArg}") @GET String testMethod(@PathParam("testArg") String testArg, @QueryParam("query") query); } // Get the generated HALLink HALLink HalLink = linkTo(methodOn(TestApi.class).testMethod("ResourceID", "detailed")).asHalLink(); // Get the generated URI URI Uri = linkTo(methodOn(TestApi.class).testMethod("ResourceID", "detailed")).asURI();
The example would create the following URI: "baseUri/testPath/ResourceID?query=detailed"
The builder will use the `UriInfo` of the current request context to create absolute URIs. If no request context is available, it will fall back to a simple path without host that does not include any configured root or context path.
Constructor and Description |
---|
HalLinkProvider()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
configure(javax.ws.rs.core.FeatureContext context)
Deprecated.
|
static LinkResult |
linkTo(java.lang.Object invocation)
Deprecated.
use
HalLinkProvider.linkTo(Object)
instead |
static <T> T |
methodOn(java.lang.Class<T> type)
Deprecated.
use
HalLinkProvider.linkTo(Object)
instead |
@Deprecated public static LinkResult linkTo(java.lang.Object invocation)
HalLinkProvider.linkTo(Object)
instead@Deprecated public static <T> T methodOn(java.lang.Class<T> type)
HalLinkProvider.linkTo(Object)
insteadpublic boolean configure(javax.ws.rs.core.FeatureContext context)
configure
in interface javax.ws.rs.core.Feature