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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LinkCreates a newLinkfrom the givenMvcUriComponentsBuilderinvocation defaulting to theIanaLinkRelations.SELFlink relation.static Linkof(Object invocation, LinkRelation relation) Creates a newLinkfrom the givenMvcUriComponentsBuilderinvocation.static LinkCreates a newLinkfrom the given lazyMvcUriComponentsBuilderinvocation defaulting to theIanaLinkRelations.SELFlink relation.static Linkof(Supplier<Object> invocation, LinkRelation relation) Creates a newLinkfrom the given lazyMvcUriComponentsBuilderinvocation.static <T> TSyntactic sugar forMvcUriComponentsBuilder.on(Class)to avoid the additional static import.
-
Constructor Details
-
MvcLink
public MvcLink()
-
-
Method Details
-
of
Creates a newLinkfrom the givenMvcUriComponentsBuilderinvocation defaulting to theIanaLinkRelations.SELFlink relation.- Parameters:
invocation- must not be null.- Returns:
- will never be null.
- Since:
- 1.3
-
of
Creates a newLinkfrom the given lazyMvcUriComponentsBuilderinvocation defaulting to theIanaLinkRelations.SELFlink relation.- Parameters:
invocation- must not be null.- Returns:
- will never be null.
- Since:
- 1.3
-
of
Creates a newLinkfrom the givenMvcUriComponentsBuilderinvocation.- Parameters:
invocation- must not be null.relation- must not be null.- Returns:
- will never be null.
-
of
Creates a newLinkfrom the given lazyMvcUriComponentsBuilderinvocation.- 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
-