Uses of Class
org.springframework.hateoas.Link
Package
Description
Value objects to ease creating
Link
s and link driven representations for REST
webservices.Client side support.
Spring container configuration support.
Value objects to build Collection+JSON representations.
HAL-specific extensions, SPIs and Jackson customizations.
HAL-FORMS extension media type.
UBER media type objects.
Vnd.Error media type.
Server-side components for hypermedia handling.
Implementations of core API interfaces.
Spring MVC helper classes to build
Link
s and assemble
RepresentationModel
types.Spring WebFlux components to build
Link
s and assemble
RepresentationModel
types.-
Uses of Link in org.springframework.hateoas
Modifier and TypeMethodDescriptionLink.andAffordance
(Affordance affordance) Create newLink
with an additionalAffordance
.Link.andAffordances
(List<Affordance> affordances) Create newLink
with additionalAffordance
s.Turns the current template into aLink
by expanding it using the given parameters.Turns the current template into aLink
by expanding it using the given parameters.AffordanceModel.getLink()
Links.getRequiredLink
(String rel) Returns theLink
with the given relation.Links.getRequiredLink
(LinkRelation relation) Returns theLink
with the given relation.RepresentationModel.getRequiredLink
(String relation) Returns the link with the given relation.RepresentationModel.getRequiredLink
(LinkRelation relation) Returns the link with the given relation.static Link
Creates a new link to the given URI with the self relation.static Link
Creates a newLink
to the given href with the given relation.static Link
Link.of
(String href, LinkRelation relation) Creates a newLink
to the given href andLinkRelation
.static Link
Link.of
(UriTemplate template, String relation) Creates a newLink
to the givenUriTemplate
and link relation.static Link
Link.of
(UriTemplate template, LinkRelation relation) static Link
Link.withAffordances
(List<Affordance> affordances) Creates a newLink
with the givenAffordance
s.Link.withDeprecation
(String deprecation) Create a newLink
by copying all attributes and applying the new deprecation.Create a newLink
by copying all attributes and applying the new href.Link.withHreflang
(String hreflang) Create a newLink
by copying all attributes and applying the new hreflang.Create a newLink
by copying all attributes and applying the new media.Create a newLink
by copying all attributes and applying the new name.Link.withProfile
(String profile) Create a newLink
by copying all attributes and applying the new profile.Creates a newLink
with the same href but givenLinkRelation
.Link.withRel
(LinkRelation relation) Creates a newLink
with the same href but givenLinkRelation
.Link.withSelfRel()
Returns aLink
pointing to the same URI but with theself
relation.Create a newLink
by copying all attributes and applying the new title.Create a newLink
by copying all attributes and applying the new type.Modifier and TypeMethodDescriptionLinks.collector()
Returns aLink
with the given relation if contained in the currentLinks
instance,Optional.empty()
otherwise.Links.getLink
(LinkRelation rel) Returns theLink
with the given rel.Returns the link with the given relation.RepresentationModel.getLink
(LinkRelation relation) Returns the link with the givenLinkRelation
.Returns allLink
s with the given relation.RepresentationModel.getLinks
(LinkRelation relation) Returns allLink
s with the given relation.PagedModel.getNextLink()
Returns the Link pointing to the next page (if set).SlicedModel.getNextLink()
Returns theLink
pointing to the next slice (if set).PagedModel.getPreviousLink()
Returns the Link pointing to the previous page (if set).SlicedModel.getPreviousLink()
Returns theLink
pointing to the previous slice (if set).Links.iterator()
Links.stream()
Links.toList()
Modifier and TypeMethodDescriptionAdds the given link to the resource.Adds all givenLink
s to the resource.final Links
Adds the given links if the given condition is true.boolean
static <T> CollectionModel<T>
Creates a new empty collection model with the given links.static <T> PagedModel<T>
Creates an emptyPagedModel
with the given links.static <T> PagedModel<T>
PagedModel.empty
(PagedModel.PageMetadata metadata, Link... links) Creates an emptyPagedModel
with the givenPagedModel.PageMetadata
and links.static <T> SlicedModel<T>
Creates an emptySlicedModel
with the given links.static <T> SlicedModel<T>
SlicedModel.empty
(SlicedModel.SliceMetadata metadata, Link... links) Creates an emptySlicedModel
with the givenSlicedModel.SliceMetadata
and links.Links.merge
(Links.MergeMode mode, Link... links) Merges the currentLinks
with the given ones applying the givenLinks.MergeMode
.static <T> CollectionModel<T>
Creates aCollectionModel
instance with the given content andLink
s (optional).static <T> EntityModel<T>
Creates a newEntityModel
with the given content andLink
s (optional).static Links
static <T> PagedModel<T>
PagedModel.of
(Collection<T> content, PagedModel.PageMetadata metadata, Link... links) static <T> SlicedModel<T>
SlicedModel.of
(Collection<T> content, SlicedModel.SliceMetadata metadata, Link... links) boolean
AffordanceModel.pointsToTargetOf
(Link link) Returns whether theAffordance
points to the target of the givenLink
.Modifier and TypeMethodDescriptionAdds all givenLink
s to the resource.Adds allLink
s produced by the given Supplier if the guard is true.Adds theLink
produced by the given Supplier if the guard is true.final Links
Adds the given links if the given condition is true.boolean
boolean
Links.containsSameLinksAs
(Iterable<Link> links) static <T> CollectionModel<T>
Creates a new empty collection model with the given links.static <T> PagedModel<T>
Creates an emptyPagedModel
with the given links.static <T> PagedModel<T>
PagedModel.empty
(PagedModel.PageMetadata metadata, Iterable<Link> links) Creates an emptyPagedModel
with the givenPagedModel.PageMetadata
and links.static <T> SlicedModel<T>
Creates an emptySlicedModel
with the given links.static <T> SlicedModel<T>
SlicedModel.empty
(SlicedModel.SliceMetadata metadata, Iterable<Link> links) Creates an emptySlicedModel
with the givenSlicedModel.SliceMetadata
and links.RepresentationModel.mapLink
(LinkRelation relation, Function<Link, Link> mapper) Replaces the link(s) with the givenLinkRelation
with the mapper applied to each of the links.RepresentationModel.mapLink
(LinkRelation relation, Function<Link, Link> mapper) Replaces the link(s) with the givenLinkRelation
with the mapper applied to each of the links.RepresentationModel.mapLinkIf
(boolean condition, LinkRelation relation, Function<Link, Link> mapper) Replaces the link(s) with the givenLinkRelation
with the mapper applied to each of the links if the given condition is true.RepresentationModel.mapLinkIf
(boolean condition, LinkRelation relation, Function<Link, Link> mapper) Replaces the link(s) with the givenLinkRelation
with the mapper applied to each of the links if the given condition is true.Links.merge
(Links.MergeMode mode, Iterable<Link> links) Merges the currentLinks
with the given ones applying the givenLinks.MergeMode
.Links.merge
(Links.MergeMode mode, Stream<Link> links) Merges the currentLinks
with the given ones applying the givenLinks.MergeMode
.static <T> EntityModel<T>
Creates a newEntityModel
with the given content andLink
s.static Links
static <T> PagedModel<T>
PagedModel.of
(Collection<T> content, PagedModel.PageMetadata metadata, Iterable<Link> links) static <T> RepresentationModel<?>
Creates a newRepresentationModel
for the given content object and links.static <T> SlicedModel<T>
SlicedModel.of
(Collection<T> content, SlicedModel.SliceMetadata metadata, Iterable<Link> links) ModifierConstructorDescriptionAffordanceModel
(String name, Link link, HttpMethod httpMethod, AffordanceModel.InputPayloadMetadata input, List<QueryParameter> queryMethodParameters, AffordanceModel.PayloadMetadata output) RepresentationModel
(Link initialLink) ModifierConstructorDescriptionprotected
EntityModel
(T content, Iterable<Link> links) Creates a newEntityModel
with the given content andLink
s.protected
PagedModel
(Collection<T> content, PagedModel.PageMetadata metadata, Iterable<Link> links) protected
PagedModel
(Collection<T> content, PagedModel.PageMetadata metadata, Iterable<Link> links, ResolvableType fallbackType) RepresentationModel
(Iterable<Link> initialLinks) protected
SlicedModel
(Collection<T> content, SlicedModel.SliceMetadata metadata, Iterable<Link> links) protected
SlicedModel
(Collection<T> content, SlicedModel.SliceMetadata metadata, Iterable<Link> links, ResolvableType fallbackType) -
Uses of Link in org.springframework.hateoas.client
Modifier and TypeMethodDescriptionTraverson.TraversalBuilder.asLink()
Returns theLink
found for the last rel in the rels configured to follow.Traverson.TraversalBuilder.asTemplatedLink()
Returns the templatedLink
found for the last relation in the rels configured to follow.protected Link
JsonPathLinkDiscoverer.extractLink
(Object element, LinkRelation rel) Callback for eachLinkDiscoverer
to extract relevant attributes and generate aLink
.default Link
LinkDiscoverer.findRequiredLinkWithRel
(LinkRelation relation, InputStream representation) Finds a single link with the given relation type in the givenInputStream
representation.default Link
LinkDiscoverer.findRequiredLinkWithRel
(LinkRelation relation, String representation) Finds a single link with the given relation in the givenString
representation.Modifier and TypeMethodDescriptionJsonPathLinkDiscoverer.findLinkWithRel
(LinkRelation relation, InputStream representation) JsonPathLinkDiscoverer.findLinkWithRel
(LinkRelation relation, String representation) LinkDiscoverer.findLinkWithRel
(String relation, InputStream representation) Finds a single link with the given relation type in the givenInputStream
representation.LinkDiscoverer.findLinkWithRel
(String relation, String representation) Finds a single link with the given relation type in the givenString
representation.LinkDiscoverer.findLinkWithRel
(LinkRelation relation, InputStream representation) Finds a single link with the givenLinkRelation
in the givenInputStream
representation.LinkDiscoverer.findLinkWithRel
(LinkRelation relation, String representation) Finds a single link with the givenLinkRelation
in the givenString
representation. -
Uses of Link in org.springframework.hateoas.mediatype
Modifier and TypeMethodDescriptionConfiguredAffordance.getTarget()
Returns the affordance's target.AffordanceOperations.toLink()
Returns aLink
equipped with theAffordance
currently under construction.Affordances.toLink()
Modifier and TypeMethodDescriptionstatic Affordances
ConfigurableAffordance.withTarget
(Link target) Create a newConfigurableAffordance
by copying all attributes and replacing the target. -
Uses of Link in org.springframework.hateoas.mediatype.collectionjson
Modifier and TypeMethodDescriptionCollectionJsonLinkDiscoverer.findLinkWithRel
(LinkRelation relation, InputStream representation) CollectionJsonLinkDiscoverer.findLinkWithRel
(LinkRelation relation, String representation) -
Uses of Link in org.springframework.hateoas.mediatype.hal
Modifier and TypeClassDescriptionprotected static class
Value object to get the curieLink
rendered in JSON.class
Custom mixin to avoid rel attributes being rendered for HAL.Modifier and TypeMethodDescriptionprotected Link
HalLinkDiscoverer.extractLink
(Object element, LinkRelation rel) static Link
Modifier and TypeMethodDescriptionJackson2HalModule.HalLinkListDeserializer.deserialize
(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt) Modifier and TypeMethodDescriptionConcludes the set up of a preview for the givenLink
.CurieProvider.getNamespacedRelFrom
(Link link) Returns the rel to be rendered for the givenLink
.DefaultCurieProvider.getNamespacedRelFrom
(Link link) Add aLink
to the whole thing. -
Uses of Link in org.springframework.hateoas.mediatype.hal.forms
Modifier and TypeMethodDescriptionHalFormsOptions.Remote.getLink()
Returns theLink
pointing to the resource returning option values.Modifier and TypeMethodDescriptionstatic HalFormsOptions.Remote
Creates a newHalFormsOptions.Remote
options representation using the givenLink
. -
Uses of Link in org.springframework.hateoas.mediatype.uber
Modifier and TypeMethodDescriptionUberLinkDiscoverer.findLinkWithRel
(LinkRelation rel, InputStream representation) UberLinkDiscoverer.findLinkWithRel
(LinkRelation rel, String representation) -
Uses of Link in org.springframework.hateoas.mediatype.vnderrors
Modifier and TypeMethodDescriptionDeprecated.Deprecated.ModifierConstructorDescriptionDeprecated.Deprecated.Deprecated.Creates a newVndErrors
instance containing a singleVndErrors.VndError
with the given logref, message and optionalLink
s. -
Uses of Link in org.springframework.hateoas.server
Modifier and TypeMethodDescriptionEntityLinks.linkToCollectionResource
(Class<?> type) Creates aLink
pointing to the collection resource of the given type.TypedEntityLinks.ExtendedTypedEntityLinks.linkToCollectionResource()
Creates aLink
pointing to the collection resource of the configured type.EntityLinks.linkToItemResource
(Class<?> type, Object id) Creates aLink
pointing to item resource backing the given entity type and id.default <T> Link
EntityLinks.linkToItemResource
(T entity, Function<T, Object> identifierExtractor) Creates aLink
pointing to item resource backing the given entity and identifier extractor.TypedEntityLinks.linkToItemResource
(T entity) Creates aLink
pointing to item resource backing the given entity.default Link
Creates theLink
built by the current builder instance with the given link relation.LinkBuilder.withRel
(LinkRelation rel) Creates theLink
built by the current builder instance with the givenLinkRelation
.LinkBuilder.withSelfRel()
Creates theLink
built by the current builder instance with the default self link relation. -
Uses of Link in org.springframework.hateoas.server.core
Modifier and TypeMethodDescriptionControllerEntityLinks.linkToCollectionResource
(Class<?> entity) DelegatingEntityLinks.linkToCollectionResource
(Class<?> type) ControllerEntityLinks.linkToItemResource
(Class<?> entity, Object id) DelegatingEntityLinks.linkToItemResource
(Class<?> type, Object id) LinkBuilderSupport.withRel
(LinkRelation rel) LinkBuilderSupport.withSelfRel()
-
Uses of Link in org.springframework.hateoas.server.mvc
Modifier and TypeMethodDescriptionstatic Link
Creates a newLink
from the givenMvcUriComponentsBuilder
invocation defaulting to theIanaLinkRelations.SELF
link relation.static Link
MvcLink.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
MvcLink.of
(Supplier<Object> invocation, LinkRelation relation) Creates a newLink
from the given lazyMvcUriComponentsBuilder
invocation. -
Uses of Link in org.springframework.hateoas.server.reactive
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Link>
WebFluxLinkBuilder.WebFluxLink.toMono()
Returns the underlyingMono
ofLink
for further handling within a reactive pipeline.reactor.core.publisher.Mono<Link>
Modifier and TypeMethodDescriptionCreates a newWebFluxLinkBuilder.WebFluxLink
with the currentLink
instance transformed using the given mapper.Creates a newWebFluxLinkBuilder.WebFluxLink
with the currentLink
instance transformed using the given mapper.WebFluxLinkBuilder.WebFluxBuilder.toLink
(Function<WebFluxLinkBuilder, reactor.core.publisher.Mono<Link>> finisher) General callback to produce aLink
from the givenWebFluxLinkBuilder
.reactor.core.publisher.Mono<Link>
reactor.core.publisher.Mono<Link>
VndError(String, String, Object, Link...)
(with proper ordering of arguments)