Uses of Class
org.springframework.hateoas.mediatype.hal.HalModelBuilder
Package
Description
HAL-specific extensions, SPIs and Jackson customizations.
-
Uses of HalModelBuilder in org.springframework.hateoas.mediatype.hal
Modifier and TypeMethodDescriptionEmbeds the given entity into theRepresentationModel
.HalModelBuilder.embed
(Object entity, LinkRelation linkRelation) Embed the entity and associate it with theLinkRelation
.HalModelBuilder.embed
(Collection<?> collection) Embeds the given collection in theRepresentationModel
.HalModelBuilder.embed
(Collection<?> collection, Class<?> type) Embeds the given collection in theRepresentationModel
and theLinkRelation
derived from the given type.HalModelBuilder.embed
(Collection<?> collection, LinkRelation relation) Embeds the given collection in theRepresentationModel
for the givenLinkRelation
.Embeds the givenStream
in theRepresentationModel
.Embeds the givenStream
in theRepresentationModel
and theLinkRelation
derived from the given type.HalModelBuilder.embed
(Stream<?> stream, LinkRelation relation) static HalModelBuilder
HalModelBuilder.emptyHalModel()
Creates a newHalModelBuilder
without a primary payload.Embed the entity, but with no relation.default HalModelBuilder
HalModelBuilder.PreviewBuilder.forLink
(String href, LinkRelation relation) Concludes the set up of a preview for theLink
consisting ot the given href andLinkRelation
.Concludes the set up of a preview for the givenLink
.static HalModelBuilder
HalModelBuilder.halModel()
Creates a newHalModelBuilder
.static HalModelBuilder
HalModelBuilder.halModel
(EmbeddedWrappers wrappers) Creates a newHalModelBuilder
using the givenEmbeddedWrappers
.static HalModelBuilder
HalModelBuilder.halModelOf
(Object entity) Creates a newHalModelBuilder
with the given entity as primary payload.HalModelBuilder.link
(String href, LinkRelation relation) Add aLink
to the whole thing.Adds the givenLink
s to theRepresentationModel
to be built.