Class MvcLink
java.lang.Object
org.springframework.hateoas.server.mvc.MvcLink
Syntactic sugar to create
Link
instances from MvcUriComponentsBuilder
invocations.- Author:
- Oliver Drotbohm
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Link
Creates a newLink
from the givenMvcUriComponentsBuilder
invocation defaulting to theIanaLinkRelations.SELF
link relation.static Link
of
(Object invocation, LinkRelation relation) Creates a newLink
from the givenMvcUriComponentsBuilder
invocation.static Link
Creates a newLink
from the given lazyMvcUriComponentsBuilder
invocation defaulting to theIanaLinkRelations.SELF
link relation.static Link
of
(Supplier<Object> invocation, LinkRelation relation) Creates a newLink
from the given lazyMvcUriComponentsBuilder
invocation.static <T> T
Syntactic sugar forMvcUriComponentsBuilder.on(Class)
to avoid the additional static import.
-
Constructor Details
-
MvcLink
public MvcLink()
-
-
Method Details
-
of
Creates a newLink
from the givenMvcUriComponentsBuilder
invocation defaulting to theIanaLinkRelations.SELF
link relation.- Parameters:
invocation
- must not be null.- Returns:
- will never be null.
- Since:
- 1.3
-
of
Creates a newLink
from the given lazyMvcUriComponentsBuilder
invocation defaulting to theIanaLinkRelations.SELF
link relation.- Parameters:
invocation
- must not be null.- Returns:
- will never be null.
- Since:
- 1.3
-
of
Creates a newLink
from the givenMvcUriComponentsBuilder
invocation.- Parameters:
invocation
- must not be null.relation
- must not be null.- Returns:
- will never be null.
-
of
Creates a newLink
from the given lazyMvcUriComponentsBuilder
invocation.- Parameters:
invocation
- must not be null.relation
- must not be null.- Returns:
- will never be null.
-
on
Syntactic sugar forMvcUriComponentsBuilder.on(Class)
to avoid the additional static import.- Parameters:
controller
- must not be null.- Returns:
- will never be null.
- Since:
- 1.3
-